conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
OAuth.showPopup(
loginUrl,
_.bind(credentialRequestCompleteCallback, null, credentialToken)
);
});
=======
Oauth.showPopup(
loginUrl,
_.bind(credentialRequestCompleteCallback, null, credentialToken)
);
>>>>>>>
OAuth.showPopup(
loginUrl,
_.bind(credentialRequestCompleteCallback, null, credentialToken)
); |
<<<<<<<
var oldValue = self.keys[key];
if (value === oldValue)
=======
if (typeof value !== 'string' &&
typeof value !== 'number' &&
typeof value !== 'boolean' &&
value !== null && value !== undefined)
throw new Error("Session.set: value can't be an object");
var old_value = self.keys[key];
if (value === old_value)
>>>>>>>
if (typeof value !== 'string' &&
typeof value !== 'number' &&
typeof value !== 'boolean' &&
value !== null && value !== undefined)
throw new Error("Session.set: value can't be an object");
var oldValue = self.keys[key];
if (value === oldValue) |
<<<<<<<
// Has key, credential, and createdAt fields.
Oauth._pendingCredentials = new Meteor.Collection(
=======
// Has token, credential, and createdAt fields.
OAuth._pendingCredentials = new Meteor.Collection(
>>>>>>>
// Has key, credential, and createdAt fields.
OAuth._pendingCredentials = new Meteor.Collection(
<<<<<<<
Oauth._pendingCredentials._ensureIndex('key', {unique: 1});
Oauth._pendingCredentials._ensureIndex('createdAt');
=======
OAuth._pendingCredentials._ensureIndex('token', {unique: 1});
OAuth._pendingCredentials._ensureIndex('createdAt');
>>>>>>>
OAuth._pendingCredentials._ensureIndex('key', {unique: 1});
OAuth._pendingCredentials._ensureIndex('createdAt');
<<<<<<<
// Stores the key and credential in the _pendingCredentials collection
// XXX After oauth token encryption is added to Meteor, apply it here too
=======
var OAuthEncryption = Package["oauth-encryption"] && Package["oauth-encryption"].OAuthEncryption;
var usingOAuthEncryption = function () {
return OAuthEncryption && OAuthEncryption.keyIsLoaded();
};
// Stores the token and credential in the _pendingCredentials collection
>>>>>>>
// Stores the key and credential in the _pendingCredentials collection
// XXX After oauth token encryption is added to Meteor, apply it here too
var OAuthEncryption = Package["oauth-encryption"] && Package["oauth-encryption"].OAuthEncryption;
var usingOAuthEncryption = function () {
return OAuthEncryption && OAuthEncryption.keyIsLoaded();
};
// Stores the token and credential in the _pendingCredentials collection
<<<<<<<
Oauth._storePendingCredential = function (key, credential) {
=======
OAuth._storePendingCredential = function (credentialToken, credential) {
>>>>>>>
OAuth._storePendingCredential = function (key, credential) {
<<<<<<<
Oauth._pendingCredentials.insert({
key: key,
=======
OAuth._pendingCredentials.insert({
token: credentialToken,
>>>>>>>
OAuth._pendingCredentials.insert({
key: key, |
<<<<<<<
};
UI._parentData = Blaze._parentData;
=======
};
UI.getElementData = function (el) {
return Blaze.getElementDataVar(el).get();
};
UI._parentData = Blaze._parentData;
>>>>>>>
};
UI._parentData = Blaze._parentData;
UI.getElementData = function (el) {
return Blaze.getElementDataVar(el).get();
}; |
<<<<<<<
// Will be updated by main before we listen.
var boilerplateFunc = null;
var boilerplateBaseData = null;
var boilerplateByAttributes = {};
=======
>>>>>>>
<<<<<<<
var htmlAttributes = getHtmlAttributes(request);
// The only thing that changes from request to request (for now) are the
// HTML attributes (used by, eg, appcache), so we can memoize based on that.
var attributeKey = JSON.stringify(htmlAttributes);
if (!_.has(boilerplateByAttributes, attributeKey)) {
try {
var boilerplateData = _.extend({htmlAttributes: htmlAttributes},
boilerplateBaseData);
boilerplateByAttributes[attributeKey] = "<!DOCTYPE html>\n" +
Blaze.toHTML(Blaze.With(boilerplateData, boilerplateFunc));
} catch (e) {
Log.error("Error running template: " + e.stack);
res.writeHead(500, headers);
res.end();
return undefined;
}
=======
var boilerplate;
try {
boilerplate = getBoilerplate(request);
} catch (e) {
Log.error("Error running template: " + e);
res.writeHead(500, headers);
res.end();
return undefined;
>>>>>>>
var boilerplate;
try {
boilerplate = getBoilerplate(request);
} catch (e) {
Log.error("Error running template: " + e);
res.writeHead(500, headers);
res.end();
return undefined; |
<<<<<<<
};
=======
}
// Like Perl's quotemeta: quotes all regexp metacharacters. See
// https://github.com/substack/quotemeta/blob/master/index.js
exports.quotemeta = function (str) {
return String(str).replace(/(\W)/g, '\\$1');
};
>>>>>>>
};
// Like Perl's quotemeta: quotes all regexp metacharacters. See
// https://github.com/substack/quotemeta/blob/master/index.js
exports.quotemeta = function (str) {
return String(str).replace(/(\W)/g, '\\$1');
}; |
<<<<<<<
var runLog = require('./run-log.js').runLog;
var packageCache = require('./package-cache.js');
var PackageSource = require('./package-source.js');
var compiler = require('./compiler.js');
=======
var runLog = require('./run-log.js');
>>>>>>>
var runLog = require('./run-log.js');
var packageCache = require('./package-cache.js');
var PackageSource = require('./package-source.js');
var compiler = require('./compiler.js');
<<<<<<<
// XXX Instead of packaging the boilerplate in the client program, the
// template should be part of WebApp, and we should make sure that all
// information that it needs is in the manifest (ie, make sure to include head
// and body). Then it will just need to do one level of templating instead
// of two. Alternatively, use spacebars with uniload.load here.
generateHtmlBoilerplate: function () {
var self = this;
var html = [];
html.push('<!DOCTYPE html>\n' +
'<html##HTML_ATTRIBUTES##>\n' +
'<head>\n');
_.each(self.css, function (css) {
html.push(' <link rel="stylesheet" href="##BUNDLED_JS_CSS_PREFIX##');
html.push(_.escape(css.url));
html.push('">\n');
});
html.push('\n\n##RUNTIME_CONFIG##\n\n');
_.each(self.js, function (js) {
html.push(' <script type="text/javascript" src="##BUNDLED_JS_CSS_PREFIX##');
html.push(_.escape(js.url));
html.push('"></script>\n');
});
html.push('\n\n##RELOAD_SAFETYBELT##');
html.push('\n\n');
html.push(self.head.join('\n')); // unescaped!
html.push('\n' +
'</head>\n' +
'<body>\n');
html.push(self.body.join('\n')); // unescaped!
html.push('\n' +
'</body>\n' +
'</html>\n');
return new Buffer(html.join(''), 'utf8');
},
=======
>>>>>>> |
<<<<<<<
/*
// @export Template
=======
>>>>>>>
/* |
<<<<<<<
"spacebars-tests - template_tests - UI._parentData from helper",
=======
"spacebars-tests - template_tests - UI._parentData from helpers",
>>>>>>>
"spacebars-tests - template_tests - UI._parentData from helpers",
<<<<<<<
);
Tinytest.add(
"spacebars-tests - template_tests - created/rendered/destroyed by each",
function (test) {
var outerTmpl =
Template.spacebars_test_template_created_rendered_destroyed_each;
var innerTmpl =
Template.spacebars_test_template_created_rendered_destroyed_each_sub;
var buf = '';
innerTmpl.created = function () { buf += 'C' + String(this.data).toLowerCase(); };
innerTmpl.rendered = function () { buf += 'R' + String(this.data).toLowerCase(); };
innerTmpl.destroyed = function () { buf += 'D' + String(this.data).toLowerCase(); };
var R = ReactiveVar([{_id: 'A'}]);
outerTmpl.items = function () {
return R.get();
};
var div = renderToDiv(outerTmpl);
divRendersTo(test, div, '<div>A</div>');
test.equal(buf, 'CaRa');
R.set([{_id: 'B'}]);
divRendersTo(test, div, '<div>B</div>');
test.equal(buf, 'CaRaDaCbRb');
R.set([{_id: 'C'}]);
divRendersTo(test, div, '<div>C</div>');
test.equal(buf, 'CaRaDaCbRbDbCcRc');
$(div).remove();
test.equal(buf, 'CaRaDaCbRbDbCcRcDc');
});
=======
);
Tinytest.add(
"spacebars-tests - template_tests - UI.render/UI.insert",
function (test) {
var div = document.createElement("DIV");
document.body.appendChild(div);
var created = false, rendered = false, destroyed = false;
var R = ReactiveVar('aaa');
var tmpl = Template.spacebars_test_ui_render;
tmpl.greeting = function () { return this.greeting || 'Hello'; };
tmpl.r = function () { return R.get(); };
tmpl.created = function () { created = true; };
tmpl.rendered = function () { rendered = true; };
tmpl.destroyed = function () { destroyed = true; };
test.equal([created, rendered, destroyed], [false, false, false]);
var renderedTmpl = UI.render(tmpl);
test.equal([created, rendered, destroyed], [true, false, false]);
UI.insert(renderedTmpl, div);
// Flush now. We fire the rendered callback in an afterFlush block,
// to ensure that the DOM is completely updated.
Deps.flush();
test.equal([created, rendered, destroyed], [true, true, false]);
UI.render(tmpl); // can run a second time without throwing
UI.insert(UI.renderWithData(tmpl, {greeting: 'Bye'}), div);
test.equal(canonicalizeHtml(div.innerHTML),
"<span>Hello aaa</span><span>Bye aaa</span>");
R.set('bbb');
Deps.flush();
test.equal(canonicalizeHtml(div.innerHTML),
"<span>Hello bbb</span><span>Bye bbb</span>");
test.equal([created, rendered, destroyed], [true, true, false]);
$(div).remove();
test.equal([created, rendered, destroyed], [true, true, true]);
});
Tinytest.add(
"spacebars-tests - template_tests - UI.insert fails on jQuery objects",
function (test) {
var tmpl = Template.spacebars_test_ui_render;
test.throws(function () {
UI.insert(UI.render(tmpl), $('body'));
}, /'parentElement' must be a DOM node/);
test.throws(function () {
UI.insert(UI.render(tmpl), document.body, $('body'));
}, /'nextNode' must be a DOM node/);
});
Tinytest.add(
"spacebars-tests - template_tests - UI.getElementData",
function (test) {
var div = document.createElement("DIV");
var tmpl = Template.spacebars_test_ui_getElementData;
UI.insert(UI.renderWithData(tmpl, {foo: "bar"}), div);
var span = div.querySelector('SPAN');
test.isTrue(span);
test.equal(UI.getElementData(span), {foo: "bar"});
});
>>>>>>>
);
Tinytest.add(
"spacebars-tests - template_tests - created/rendered/destroyed by each",
function (test) {
var outerTmpl =
Template.spacebars_test_template_created_rendered_destroyed_each;
var innerTmpl =
Template.spacebars_test_template_created_rendered_destroyed_each_sub;
var buf = '';
innerTmpl.created = function () { buf += 'C' + String(this.data).toLowerCase(); };
innerTmpl.rendered = function () { buf += 'R' + String(this.data).toLowerCase(); };
innerTmpl.destroyed = function () { buf += 'D' + String(this.data).toLowerCase(); };
var R = ReactiveVar([{_id: 'A'}]);
outerTmpl.items = function () {
return R.get();
};
var div = renderToDiv(outerTmpl);
divRendersTo(test, div, '<div>A</div>');
test.equal(buf, 'CaRa');
R.set([{_id: 'B'}]);
divRendersTo(test, div, '<div>B</div>');
test.equal(buf, 'CaRaDaCbRb');
R.set([{_id: 'C'}]);
divRendersTo(test, div, '<div>C</div>');
test.equal(buf, 'CaRaDaCbRbDbCcRc');
$(div).remove();
test.equal(buf, 'CaRaDaCbRbDbCcRcDc');
});
Tinytest.add(
"spacebars-tests - template_tests - UI.render/UI.insert",
function (test) {
var div = document.createElement("DIV");
document.body.appendChild(div);
var created = false, rendered = false, destroyed = false;
var R = ReactiveVar('aaa');
var tmpl = Template.spacebars_test_ui_render;
tmpl.greeting = function () { return this.greeting || 'Hello'; };
tmpl.r = function () { return R.get(); };
tmpl.created = function () { created = true; };
tmpl.rendered = function () { rendered = true; };
tmpl.destroyed = function () { destroyed = true; };
test.equal([created, rendered, destroyed], [false, false, false]);
var renderedTmpl = UI.render(tmpl);
test.equal([created, rendered, destroyed], [true, false, false]);
UI.insert(renderedTmpl, div);
// Flush now. We fire the rendered callback in an afterFlush block,
// to ensure that the DOM is completely updated.
Deps.flush();
test.equal([created, rendered, destroyed], [true, true, false]);
UI.render(tmpl); // can run a second time without throwing
UI.insert(UI.renderWithData(tmpl, {greeting: 'Bye'}), div);
test.equal(canonicalizeHtml(div.innerHTML),
"<span>Hello aaa</span><span>Bye aaa</span>");
R.set('bbb');
Deps.flush();
test.equal(canonicalizeHtml(div.innerHTML),
"<span>Hello bbb</span><span>Bye bbb</span>");
test.equal([created, rendered, destroyed], [true, true, false]);
$(div).remove();
test.equal([created, rendered, destroyed], [true, true, true]);
});
Tinytest.add(
"spacebars-tests - template_tests - UI.insert fails on jQuery objects",
function (test) {
var tmpl = Template.spacebars_test_ui_render;
test.throws(function () {
UI.insert(UI.render(tmpl), $('body'));
}, /'parentElement' must be a DOM node/);
test.throws(function () {
UI.insert(UI.render(tmpl), document.body, $('body'));
}, /'nextNode' must be a DOM node/);
});
Tinytest.add(
"spacebars-tests - template_tests - UI.getElementData",
function (test) {
var div = document.createElement("DIV");
var tmpl = Template.spacebars_test_ui_getElementData;
UI.insert(UI.renderWithData(tmpl, {foo: "bar"}), div);
var span = div.querySelector('SPAN');
test.isTrue(span);
test.equal(UI.getElementData(span), {foo: "bar"});
}); |
<<<<<<<
// @export Random
Random = {};
=======
>>>>>>> |
<<<<<<<
resultsDeps.changed();
Deps.flush();
=======
_resultsChanged();
Meteor.flush();
Meteor.default_connection._unsubscribeAll();
>>>>>>>
resultsDeps.changed();
Deps.flush();
Meteor.default_connection._unsubscribeAll(); |
<<<<<<<
// Our connection is going to be closed, but we don't want to call the
// onReconnect handler until the result comes back for this method, because
// the token will have been deleted on the server. Instead, wait until we get
// a new token and call the reconnect handler with that.
// XXX this is messy.
// XXX what if login gets called before the callback runs?
var origOnReconnect = Accounts.connection.onReconnect;
var userId = Meteor.userId();
Accounts.connection.onReconnect = null;
Accounts.connection.apply('logoutOtherClients', [], { wait: true },
=======
// Call the `logoutOtherClients` method. Store the login token that we get
// back and use it to log in again. The server is not supposed to close
// connections on the old token for 10 seconds, so we should have time to
// store our new token and log in with it before being disconnected. If we get
// disconnected, then we'll immediately reconnect with the new token. If for
// some reason we get disconnected before storing the new token, then the
// worst that will happen is that we'll have a flicker from trying to log in
// with the old token before storing and logging in with the new one.
Meteor.apply('logoutOtherClients', [], { wait: true },
>>>>>>>
// Call the `logoutOtherClients` method. Store the login token that we get
// back and use it to log in again. The server is not supposed to close
// connections on the old token for 10 seconds, so we should have time to
// store our new token and log in with it before being disconnected. If we get
// disconnected, then we'll immediately reconnect with the new token. If for
// some reason we get disconnected before storing the new token, then the
// worst that will happen is that we'll have a flicker from trying to log in
// with the old token before storing and logging in with the new one.
Accounts.connection.apply('logoutOtherClients', [], { wait: true },
<<<<<<<
Accounts.connection.onReconnect = origOnReconnect;
if (! error)
=======
if (error) {
callback && callback(error);
} else {
var userId = Meteor.userId();
>>>>>>>
if (error) {
callback && callback(error);
} else {
var userId = Meteor.userId();
<<<<<<<
Accounts.connection.onReconnect();
callback && callback(error);
=======
// If the server hasn't disconnected us yet by deleting our
// old token, then logging in now with the new valid token
// will prevent us from getting disconnected. If the server
// has already disconnected us due to our old invalid token,
// then we would have already tried and failed to login with
// the old token on reconnect, and we have to make sure a
// login method gets sent here with the new token.
Meteor.loginWithToken(result.token, function (err) {
if (err &&
storedLoginToken() &&
storedLoginToken().token === result.token) {
makeClientLoggedOut();
}
callback && callback(err);
});
}
>>>>>>>
// If the server hasn't disconnected us yet by deleting our
// old token, then logging in now with the new valid token
// will prevent us from getting disconnected. If the server
// has already disconnected us due to our old invalid token,
// then we would have already tried and failed to login with
// the old token on reconnect, and we have to make sure a
// login method gets sent here with the new token.
Meteor.loginWithToken(result.token, function (err) {
if (err &&
storedLoginToken() &&
storedLoginToken().token === result.token) {
makeClientLoggedOut();
}
callback && callback(err);
});
} |
<<<<<<<
var supported = function (expected, selector, options) {
var cursor = OplogCollection.find(selector, options);
=======
var oplogEnabled =
!!MongoInternals.defaultRemoteCollectionDriver().mongo._oplogHandle;
var supported = function (expected, selector) {
var cursor = OplogCollection.find(selector);
>>>>>>>
var oplogEnabled =
!!MongoInternals.defaultRemoteCollectionDriver().mongo._oplogHandle;
var supported = function (expected, selector, options) {
var cursor = OplogCollection.find(selector, options); |
<<<<<<<
var ctx = Facet._globals.ctx;
if (previous_batch_opts.attributes) {
for (var key in previous_batch_opts.attributes) {
ctx.disableVertexAttribArray(previous_batch_opts.program[key]);
=======
if (!previous_batch._ctx)
return;
var ctx = previous_batch._ctx;
if (previous_batch.attributes) {
for (var key in previous_batch.attributes) {
ctx.disableVertexAttribArray(previous_batch.program[key]);
>>>>>>>
if (!previous_batch_opts._ctx)
return;
var ctx = previous_batch_opts._ctx;
if (previous_batch_opts.attributes) {
for (var key in previous_batch_opts.attributes) {
ctx.disableVertexAttribArray(previous_batch_opts.program[key]);
<<<<<<<
var ctx = Facet._globals.ctx;
if (batch_opts.batch_id !== previous_batch_opts.batch_id) {
var attributes = batch_opts.attributes || {};
var uniforms = batch_opts.uniforms || {};
var program = batch_opts.program;
var primitives = batch_opts.primitives;
=======
if (batch.batch_id !== previous_batch.batch_id) {
var attributes = batch.attributes || {};
var uniforms = batch.uniforms || {};
var program = batch.program;
var primitives = batch.primitives;
>>>>>>>
if (batch_opts.batch_id !== previous_batch_opts.batch_id) {
var attributes = batch_opts.attributes || {};
var uniforms = batch_opts.uniforms || {};
var program = batch_opts.program;
var primitives = batch_opts.primitives;
<<<<<<<
var result = {
=======
return {
_ctx: ctx,
>>>>>>>
var result = {
_ctx: ctx, |
<<<<<<<
var url = Npm.require('url');
// unique id for this instantiation of the server. If this changes
// between client reconnects, the client will reload. You can set the
// environment variable "SERVER_ID" to control this. For example, if
// you want to only force a reload on major changes, you can use a
// custom serverId which you only change when something worth pushing
// to clients immediately happens.
__meteor_runtime_config__.serverId =
process.env.SERVER_ID ? process.env.SERVER_ID : Random.id();
=======
>>>>>>>
var url = Npm.require('url'); |
<<<<<<<
// for the purpose of splitting attributes in a string like
// 'a="b" c="d"', assume they are separated by a single space
// and values are double-quoted, but allow for spaces inside
// the quotes. Split on space following quote.
var attrList = attrs.replace(/" /g, '"\u0000').split('\u0000');
// put attributes in alphabetical order
attrList.sort();
=======
>>>>>>>
// for the purpose of splitting attributes in a string like
// 'a="b" c="d"', assume they are separated by a single space
// and values are double-quoted, but allow for spaces inside
// the quotes. Split on space following quote.
var attrList = attrs.replace(/" /g, '"\u0000').split('\u0000');
// put attributes in alphabetical order
attrList.sort(); |
<<<<<<<
Tinytest.add("spacebars-tests - template_tests - tables", function (test) {
=======
// Make sure that if you bind an event on "div p", for example,
// both the div and the p need to be in the template. jQuery's
// `$(elem).find(...)` works this way, but the browser's
// querySelector doesn't.
Tinytest.add(
"spacebars - template - event map selector scope",
function (test) {
var tmpl = Template.spacebars_test_event_selectors1;
var tmpl2 = Template.spacebars_test_event_selectors2;
var buf = [];
tmpl2.events({
'click div p': function (evt) { buf.push(evt.currentTarget.className); }
});
var div = renderToDiv(tmpl);
document.body.appendChild(div);
test.equal(buf.join(), '');
clickIt(div.querySelector('.p1'));
test.equal(buf.join(), '');
clickIt(div.querySelector('.p2'));
test.equal(buf.join(), 'p2');
document.body.removeChild(div);
}
);
if (document.addEventListener) {
// see note about non-bubbling events in the "capuring events"
// templating test for why we use the VIDEO tag. (It would be
// nice to get rid of the network dependency, though.)
// We skip this test in IE 8.
Tinytest.add(
"spacebars - template - event map selector scope (capturing)",
function (test) {
var tmpl = Template.spacebars_test_event_selectors_capturing1;
var tmpl2 = Template.spacebars_test_event_selectors_capturing2;
var buf = [];
tmpl2.events({
'play div video': function (evt) { buf.push(evt.currentTarget.className); }
});
var div = renderToDiv(tmpl);
document.body.appendChild(div);
test.equal(buf.join(), '');
simulateEvent(div.querySelector(".video1"),
"play", {}, {bubbles: false});
test.equal(buf.join(), '');
simulateEvent(div.querySelector(".video2"),
"play", {}, {bubbles: false});
test.equal(buf.join(), 'video2');
document.body.removeChild(div);
}
);
}
Tinytest.add("spacebars - template - tables", function (test) {
>>>>>>>
// Make sure that if you bind an event on "div p", for example,
// both the div and the p need to be in the template. jQuery's
// `$(elem).find(...)` works this way, but the browser's
// querySelector doesn't.
Tinytest.add(
"spacebars-tests - template_tests - event map selector scope",
function (test) {
var tmpl = Template.spacebars_test_event_selectors1;
var tmpl2 = Template.spacebars_test_event_selectors2;
var buf = [];
tmpl2.events({
'click div p': function (evt) { buf.push(evt.currentTarget.className); }
});
var div = renderToDiv(tmpl);
document.body.appendChild(div);
test.equal(buf.join(), '');
clickIt(div.querySelector('.p1'));
test.equal(buf.join(), '');
clickIt(div.querySelector('.p2'));
test.equal(buf.join(), 'p2');
document.body.removeChild(div);
}
);
if (document.addEventListener) {
// see note about non-bubbling events in the "capuring events"
// templating test for why we use the VIDEO tag. (It would be
// nice to get rid of the network dependency, though.)
// We skip this test in IE 8.
Tinytest.add(
"spacebars-tests - template_tests - event map selector scope (capturing)",
function (test) {
var tmpl = Template.spacebars_test_event_selectors_capturing1;
var tmpl2 = Template.spacebars_test_event_selectors_capturing2;
var buf = [];
tmpl2.events({
'play div video': function (evt) { buf.push(evt.currentTarget.className); }
});
var div = renderToDiv(tmpl);
document.body.appendChild(div);
test.equal(buf.join(), '');
simulateEvent(div.querySelector(".video1"),
"play", {}, {bubbles: false});
test.equal(buf.join(), '');
simulateEvent(div.querySelector(".video2"),
"play", {}, {bubbles: false});
test.equal(buf.join(), 'video2');
document.body.removeChild(div);
}
);
}
Tinytest.add("spacebars-tests - template_tests - tables", function (test) {
<<<<<<<
"spacebars-tests - template_tests - access template instance from helper",
=======
"spacebars - ui hooks - nested domranges",
function (test) {
var tmpl = Template.spacebars_test_ui_hooks_nested;
var rv = new ReactiveVar(true);
tmpl.foo = function () {
return rv.get();
};
var subtmpl = Template.spacebars_test_ui_hooks_nested_sub;
var uiHookCalled = false;
subtmpl.rendered = function () {
this.firstNode.parentNode._uihooks = {
removeElement: function (node) {
uiHookCalled = true;
}
};
};
var div = renderToDiv(tmpl);
document.body.appendChild(div);
Deps.flush();
var htmlBeforeRemove = canonicalizeHtml(div.innerHTML);
rv.set(false);
Deps.flush();
test.isTrue(uiHookCalled);
var htmlAfterRemove = canonicalizeHtml(div.innerHTML);
test.equal(htmlBeforeRemove, htmlAfterRemove);
document.body.removeChild(div);
}
);
Tinytest.add(
"spacebars - access template instance from helper",
>>>>>>>
"spacebars-tests - template_tests - ui hooks - nested domranges",
function (test) {
var tmpl = Template.spacebars_test_ui_hooks_nested;
var rv = new ReactiveVar(true);
tmpl.foo = function () {
return rv.get();
};
var subtmpl = Template.spacebars_test_ui_hooks_nested_sub;
var uiHookCalled = false;
subtmpl.rendered = function () {
this.firstNode.parentNode._uihooks = {
removeElement: function (node) {
uiHookCalled = true;
}
};
};
var div = renderToDiv(tmpl);
document.body.appendChild(div);
Deps.flush();
var htmlBeforeRemove = canonicalizeHtml(div.innerHTML);
rv.set(false);
Deps.flush();
test.isTrue(uiHookCalled);
var htmlAfterRemove = canonicalizeHtml(div.innerHTML);
test.equal(htmlBeforeRemove, htmlAfterRemove);
document.body.removeChild(div);
}
);
Tinytest.add(
"spacebars-tests - template_tests - access template instance from helper", |
<<<<<<<
// api.add_files(['template.js']);
=======
api.add_files(['template.js']);
api.add_files(['render.js']); // xcxc filename?
>>>>>>>
api.add_files(['render.js']); |
<<<<<<<
// XXX HACK: If a sockjs connection, save off the URL. This is
// temporary and will go away in the near future.
self._socketUrl = socket.url;
// The `ConnectionHandle` for this session, passed to
// `Meteor.server.onConnection` callbacks.
=======
// This object is the public interface to the session. In the public
// API, it is called the `connection` object. Internally we call it
// a `connectionHandle` to avoid ambiguity.
>>>>>>>
// XXX HACK: If a sockjs connection, save off the URL. This is
// temporary and will go away in the near future.
self._socketUrl = socket.url;
// This object is the public interface to the session. In the public
// API, it is called the `connection` object. Internally we call it
// a `connectionHandle` to avoid ambiguity. |
<<<<<<<
=======
try {
var ast = Handlebars.to_json_ast(contents);
} catch (e) {
if (e instanceof Handlebars.ParseError) {
if (typeof(e.line) === "number")
// subtract one from e.line because it is one-based but we
// need it to be an offset from contentsStartIndex
throwParseError(e.message, contentsStartIndex, e.line - 1);
else
// No line number available from Handlebars parser, so
// generate the parse error at the <template> tag itself
throwParseError("error in template: " + e.message, tagStartIndex);
}
else
throw e;
}
var code = 'Package.handlebars.Handlebars.json_ast_to_func(' +
JSON.stringify(ast) + ')';
>>>>>>> |
<<<<<<<
Tinytest.add("ui - render - isolate GC", function (test) {
=======
// IE strips malformed styles like "bar::d" from the `style`
// attribute. We detect this to adjust expectations for the StyleHandler
// test below.
var malformedStylesAllowed = function () {
var div = document.createElement("div");
div.setAttribute("style", "bar::d;");
return (div.getAttribute("style") === "bar::d;");
};
Tinytest.add("ui - render - closure GC", function (test) {
>>>>>>>
// IE strips malformed styles like "bar::d" from the `style`
// attribute. We detect this to adjust expectations for the StyleHandler
// test below.
var malformedStylesAllowed = function () {
var div = document.createElement("div");
div.setAttribute("style", "bar::d;");
return (div.getAttribute("style") === "bar::d;");
};
Tinytest.add("ui - render - isolate GC", function (test) {
<<<<<<<
=======
Tinytest.add("ui - UI.insert fails on jQuery objects", function (test) {
var tmpl = UI.Component.extend({
render: function () {
return SPAN();
}
});
test.throws(function () {
UI.insert(UI.render(tmpl), $('body'));
}, /'parentElement' must be a DOM node/);
test.throws(function () {
UI.insert(UI.render(tmpl), document.body, $('body'));
}, /'nextNode' must be a DOM node/);
});
Tinytest.add("ui - UI.getDataContext", function (test) {
var div = document.createElement("DIV");
var tmpl = UI.Component.extend({
render: function () {
return SPAN();
}
});
UI.insert(UI.renderWithData(tmpl, {foo: "bar"}), div);
var span = $(div).children('SPAN')[0];
test.isTrue(span);
test.equal(UI.getElementData(span), {foo: "bar"});
});
>>>>>>>
Tinytest.add("ui - UI.insert fails on jQuery objects", function (test) {
var tmpl = UI.Component.extend({
render: function () {
return SPAN();
}
});
test.throws(function () {
UI.insert(UI.render(tmpl), $('body'));
}, /'parentElement' must be a DOM node/);
test.throws(function () {
UI.insert(UI.render(tmpl), document.body, $('body'));
}, /'nextNode' must be a DOM node/);
});
Tinytest.add("ui - UI.getDataContext", function (test) {
var div = document.createElement("DIV");
var tmpl = UI.Component.extend({
render: function () {
return SPAN();
}
});
UI.insert(UI.renderWithData(tmpl, {foo: "bar"}), div);
var span = $(div).children('SPAN')[0];
test.isTrue(span);
test.equal(UI.getElementData(span), {foo: "bar"});
}); |
<<<<<<<
var serverCatalog = require('./catalog.js').serverCatalog;
=======
var stats = require('./stats.js');
>>>>>>>
var serverCatalog = require('./catalog.js').serverCatalog;
var stats = require('./stats.js'); |
<<<<<<<
}()).actualVersion;
/**
* This extends the basic functionality of every Node. Will check if a Node has a className
* @param {string} className The class to check for
* @return {Boolean}
*/
Node.prototype.hasClass = function (className) {
if (this.classList) {
return this.classList.contains(className);
} else {
return (-1 < this.className.indexOf(className));
}
};
/**
* This extends the basic functionality of every Node. Will add the className if not yet added.
* @param {string} className The class to add
* @return {Boolean}
*/
Node.prototype.addClass = function (className) {
if (this.classList) {
this.classList.add(className);
} else if (!this.hasClass(className)) {
var classes = this.className.split(" ");
classes.push(className);
this.className = classes.join(" ");
}
return this;
};
/**
* This extends the basic functionality of every Node. Will remove the className if not yet removed.
* @param {string} className The class to remove
* @return {Boolean}
*/
Node.prototype.removeClass = function (className) {
if (this.classList) {
this.classList.remove(className);
} else {
var classes = this.className.split(" ");
classes.splice(classes.indexOf(className), 1);
this.className = classes.join(" ");
}
return this;
};
=======
}()).actualVersion;
/**
* Sets a variable for mobile devices
*/
var mobileDetect = {
Android: function() { return navigator.userAgent.match(/Android/i); },
BlackBerry: function() { return navigator.userAgent.match(/BlackBerry/i); },
iOS: function() { return navigator.userAgent.match(/iPhone|iPad|iPod/i); },
Opera: function() { return navigator.userAgent.match(/Opera Mini/i); },
Windows: function() { return navigator.userAgent.match(/IEMobile/i); },
any: function() { return (mobileDetect.Android() || mobileDetect.BlackBerry() || mobileDetect.iOS() || mobileDetect.Opera() || mobileDetect.Windows()); }
};
var isMobile = mobileDetect.any();
>>>>>>>
}()).actualVersion;
/**
* Sets a variable for mobile devices
*/
var mobileDetect = {
Android: function() { return navigator.userAgent.match(/Android/i); },
BlackBerry: function() { return navigator.userAgent.match(/BlackBerry/i); },
iOS: function() { return navigator.userAgent.match(/iPhone|iPad|iPod/i); },
Opera: function() { return navigator.userAgent.match(/Opera Mini/i); },
Windows: function() { return navigator.userAgent.match(/IEMobile/i); },
any: function() { return (mobileDetect.Android() || mobileDetect.BlackBerry() || mobileDetect.iOS() || mobileDetect.Opera() || mobileDetect.Windows()); }
}
};
var isMobile = mobileDetect.any(); |
<<<<<<<
var // jQuery and jQueryUI version
=======
var // jQuery and jQueryUI version
// jqver = '3.3.1',
jqver = '1.12.4', // current Typesetter version
uiver = '1.12.1', // current Typesetter version
>>>>>>>
var // jQuery and jQueryUI version
<<<<<<<
'elfinder' : 'js/elfinder.min',
'encoding-japanese': '//cdn.rawgit.com/polygonplanet/encoding.js/1.0.26/encoding.min'
=======
// 'jquery' : '//cdnjs.cloudflare.com/ajax/libs/jquery/'+(old? '1.12.4' : jqver)+'/jquery.min',
'jquery' : '../js/jquery', // loads our jQuery once again.
// actually, all required jQuery and jQuery.ui components are already loaded by Typesetter
// we have to tell require.js to look better after them (elfinder.full.js line 10-24?)
'jquery-ui': '//cdnjs.cloudflare.com/ajax/libs/jqueryui/'+uiver+'/jquery-ui.min',
/*
// the followiong doesn't work, seems as elFinder wants all in a single file/package
'jquery-ui' : '../jquery_ui/core',
'jquery-ui-selectable' : '../jquery_ui/selectable',
'jquery-ui-draggable' : '../jquery_ui/draggable',
'jquery-ui-droppable' : '../jquery_ui/droppable',
*/
'elfinder' : 'js/elfinder.full', // TODO: for production use 'js/elfinder.full.min',
// 'encoding-japanese' : '//cdn.rawgit.com/polygonplanet/encoding.js/1.0.26/encoding.min'
'encoding-japanese' : '../encoding.js/encoding.min'
>>>>>>>
'elfinder' : 'js/elfinder.full', // TODO: for production use 'js/elfinder.full.min',
// 'encoding-japanese' : '//cdn.rawgit.com/polygonplanet/encoding.js/1.0.26/encoding.min'
'encoding-japanese' : '../encoding.js/encoding.min' |
<<<<<<<
function getFilteredContent(data, filters) {
const content = [];
const applied = filters.applied || {};
const filterAcceptKeys = applied.acceptItems && Object.keys(applied.acceptItems);
=======
// Return filtered data, sorted by location, in a flat list
// (flattened so it's easy to present only a piece of the list at a time)
function getFlatFilteredEntries(data, filters) {
const entries = [];
const applied = filters.applied;
const filterAcceptKeys = applied && applied.acceptItems && Object.keys(applied.acceptItems);
>>>>>>>
// Return filtered data, sorted by location, in a flat list
// (flattened so it's easy to present only a piece of the list at a time)
function getFlatFilteredEntries(data, filters) {
const entries = [];
const applied = filters.applied || {};
const filterAcceptKeys = applied.acceptItems && Object.keys(applied.acceptItems);
<<<<<<<
var markerDistances = new Map(); // an associative array containing the marker referenced by the computed distance
var distances = []; // all the distances, so we can sort and then call markerDistances
for (const marker of primaryMarkers) {
=======
const markerDistances = new Map(); // an associative array containing the marker referenced by the computed distance
const distances = []; // all the distances, so we can sort and then call markerDistances
for (const marker of markers) {
>>>>>>>
const markerDistances = new Map(); // an associative array containing the marker referenced by the computed distance
const distances = []; // all the distances, so we can sort and then call markerDistances
for (const marker of primaryMarkers) { |
<<<<<<<
const contentTags = [];
const title = separator ? ce('h5', 'separator', ctn(name)) : ce('h5', null, ctn(name));
=======
const contentTags = [header];
>>>>>>>
const contentTags = [];
const title = ce('h5', separator ? 'separator' : null, ctn(entry.name));
// only show the link copier if the main dataset is makers
if (entry.row_id && gDataset === 'makers') {
const headerCopyEntryLink = createLinkToListItemIcon(entry.row_id, true);
ac(title, headerCopyEntryLink);
}
contentTags.push(title);
// TODO: Dedupe with addParagraph() in createMakerListItemEl().
const addParagraph = (name, value) => {
if (value) {
const row = ce('div', 'row');
ac(row, [
ce('label', 'col-12 col-md-3', ctn(name)),
linkifyElement(ce('p', 'col-12 col-md-9', multilineStringToNodes(value))),
]);
contentTags.push(row);
}
};
const addLine = (name, value) => {
if (value) {
const div = ce('div', 'row');
ac(div, [
ce('label', 'col-12 col-md-3', ctn(name)),
linkifyElement(ce('p', 'col-12 col-md-9', ctn(value))),
]);
contentTags.push(div);
}
};
addParagraph($.i18n('ftm-makers-website'), entry.website);
addParagraph($.i18n('ftm-makers-description'), entry.description);
addParagraph($.i18n('ftm-makers-contact'), entry.public_contact);
addLine($.i18n('ftm-makers-group-type'), addSpaceAfterComma(entry.group_type));
addLine($.i18n('ftm-makers-capabilities'), addSpaceAfterComma(entry.capabilities));
addLine($.i18n('ftm-makers-products'), addSpaceAfterComma(entry.products));
addLine($.i18n('ftm-makers-other-product'), addSpaceAfterComma(entry.other_product));
addLine($.i18n('ftm-makers-face-shield-type'), addSpaceAfterComma(entry.face_shield_type));
addLine($.i18n('ftm-makers-min-request'), addSpaceAfterComma(entry.min_request));
addLine($.i18n('ftm-makers-collecting-question'), entry.collecting_site);
addLine($.i18n('ftm-makers-shipping-question'), entry.shipping);
addLine($.i18n('ftm-makers-volunteers-question'), entry.accepting_volunteers);
addLine($.i18n('ftm-makers-other-type-of-space'), entry.other_type_of_space);
addLine($.i18n('ftm-makers-accepting-ppe-requests'), entry.accepting_ppe_requests);
addLine($.i18n('ftm-makers-org-collaboration'), addSpaceAfterComma(entry.org_collaboration));
addLine($.i18n('ftm-makers-other-capability'), addSpaceAfterComma(entry.other_capability));
return contentTags;
}
const initResidentialPopover = () => {
$('[data-toggle="popover"]').popover();
};
const initCopyLinkTooltip = () => {
$('.entry-copy-link').tooltip()
.on('click', (e) => {
copyLinkToClipboard(e.target.dataset.rowId);
$(e.target).attr('title', $.i18n('ftm-default-link-copied-tooltip'))
.tooltip('_fixTitle')
.tooltip('show');
});
};
function createRequesterMarkerContent(entry, separator) {
const {
org_type: orgType,
address,
name,
encrypted_email: encryptedEmail,
instructions,
accepting,
open_box: openBox,
rdi,
timestamp,
website,
row_id: rowId,
} = entry;
const header = separator ? ce('h5', 'separator', ctn(name)) : ce('h5', null, ctn(name));
const headerPartnerLink = createPartnerLinkIcon(entry.row_id);
if (headerPartnerLink) {
ac(header, headerPartnerLink);
}
<<<<<<<
function createLinkToListItemIcon(rowId, isMapPopup = false) {
const iconClass = isMapPopup ? 'icon-paperclip-link' : 'icon-file-link';
const linkToItem = ce('div', `icon ${iconClass} entry-copy-link`);
const tooltipText = $.i18n('ftm-default-copy-link-tooltip');
linkToItem.setAttribute('aria-label', tooltipText);
linkToItem.setAttribute('title', tooltipText);
linkToItem.dataset.rowId = rowId;
return linkToItem;
}
=======
function createPartnerLinkIcon(rowId) {
const { partnerName, partnerLinkUrl, partnerTooltip } = document.body.dataset;
if (partnerLinkUrl) {
const partnerLink = ce('div', `icon entry-partner-link icon-${partnerName}`);
const tooltipText = $.i18n(`ftm-link-partners-tooltip-${partnerName}`) || partnerTooltip;
partnerLink.setAttribute('aria-label', tooltipText);
partnerLink.setAttribute('title', tooltipText);
partnerLink.addEventListener('click', () => {
window.open(`${partnerLinkUrl}?id=${rowId}`, '_blank');
});
return partnerLink;
}
return null;
}
>>>>>>>
function createLinkToListItemIcon(rowId, isMapPopup = false) {
const iconClass = isMapPopup ? 'icon-paperclip-link' : 'icon-file-link';
const linkToItem = ce('div', `icon ${iconClass} entry-copy-link`);
const tooltipText = $.i18n('ftm-default-copy-link-tooltip');
linkToItem.setAttribute('aria-label', tooltipText);
linkToItem.setAttribute('title', tooltipText);
linkToItem.dataset.rowId = rowId;
return linkToItem;
}
function createPartnerLinkIcon(rowId) {
const { partnerName, partnerLinkUrl, partnerTooltip } = document.body.dataset;
if (partnerLinkUrl) {
const partnerLink = ce('div', `icon entry-partner-link icon-${partnerName}`);
const tooltipText = $.i18n(`ftm-link-partners-tooltip-${partnerName}`) || partnerTooltip;
partnerLink.setAttribute('aria-label', tooltipText);
partnerLink.setAttribute('title', tooltipText);
partnerLink.addEventListener('click', () => {
window.open(`${partnerLinkUrl}?id=${rowId}`, '_blank');
});
return partnerLink;
}
return null;
}
<<<<<<<
if (entry.row_id) {
const headerCopyEntryLink = createLinkToListItemIcon(entry.row_id, false);
children.push(headerCopyEntryLink);
}
if (document.body.dataset.partnerSite) {
const headerPartnerLink = ce('div', `icon entry-partner-link ${document.body.dataset.partnerStyleClass}`);
headerPartnerLink.setAttribute('aria-label', 'Partner site call to action');
=======
const headerPartnerLink = createPartnerLinkIcon(entry.row_id);
if (headerPartnerLink) {
>>>>>>>
if (entry.row_id) {
const headerCopyEntryLink = createLinkToListItemIcon(entry.row_id, false);
children.push(headerCopyEntryLink);
}
const headerPartnerLink = createPartnerLinkIcon(entry.row_id);
if (headerPartnerLink) {
<<<<<<<
$(entry.domElem).find('.entry-partner-link').on('click', () => {
window.open(`${document.body.dataset.partnerSite}?id=${entry.row}`, '_blank');
});
=======
>>>>>>> |
<<<<<<<
const generateBottomNav = () => {
const localeDropdown = document.getElementById('locales-dropdown-selector');
const countryDropdown = document.getElementById('countries-dropdown-selector');
if (localeDropdown && countryDropdown) {
locales.forEach((locale) => {
const element = document.createElement('a');
element.className = 'dropdown-item i18n';
const currentUrl = new URL(window.location.href);
currentUrl.searchParams.set('locale', locale.localeCode);
element.setAttribute('href', currentUrl.href);
element.textContent = $.i18n(locale.i18nString);
localeDropdown.appendChild(element);
});
countries.forEach((country) => {
const element = document.createElement('a');
element.className = 'dropdown-item i18n';
const currentUrl = new URL(window.location.href);
const pathname = currentUrl.pathname;
const updatedPath = pathname.replace(/(\/[a-z]{2}\/|\/)/, `/${country.countryCode}/`);
currentUrl.pathname = updatedPath;
element.setAttribute(
'href',
currentUrl.href
);
element.textContent = $.i18n(country.i18nString);
countryDropdown.appendChild(element);
});
}
};
function createFiltersListHTML() {
const filters = [];
filters.push(`<h4>${$.i18n('ftm-states')}</h4>`);
for (const state of Object.keys(data_by_location).sort()) {
filters.push(`
<div>
<input
id="state-${state}"
type="checkbox"
name="states"
value="${state}"
onchange="onFilterChange(this, true)"
/>
<label
id="state-${state}-label"
for="state-${state}"
>
${state}
</label>
</div>
`);
=======
// Builds the data structure for tracking which filters are set
// If all values in a category are false, it's treated as no filter - all items are included
// If one or more values in a category is true, the filter is set - only items matching the filter are included
// If two or more values in a category are true, the filter is the union of those values
// If multiple categories have set values, the result is the intersection of those categories
function createFilters() {
const filters = {
states: {}
};
for (const state of Object.keys(data_by_location)) {
filters.states[state] = { name: state, isSet: false };
>>>>>>>
const generateBottomNav = () => {
const localeDropdown = document.getElementById('locales-dropdown-selector');
const countryDropdown = document.getElementById('countries-dropdown-selector');
if (localeDropdown && countryDropdown) {
locales.forEach((locale) => {
const element = document.createElement('a');
element.className = 'dropdown-item i18n';
const currentUrl = new URL(window.location.href);
currentUrl.searchParams.set('locale', locale.localeCode);
element.setAttribute('href', currentUrl.href);
element.textContent = $.i18n(locale.i18nString);
localeDropdown.appendChild(element);
});
countries.forEach((country) => {
const element = document.createElement('a');
element.className = 'dropdown-item i18n';
const currentUrl = new URL(window.location.href);
const pathname = currentUrl.pathname;
const updatedPath = pathname.replace(/(\/[a-z]{2}\/|\/)/, `/${country.countryCode}/`);
currentUrl.pathname = updatedPath;
element.setAttribute(
'href',
currentUrl.href
);
element.textContent = $.i18n(country.i18nString);
countryDropdown.appendChild(element);
});
}
};
// Builds the data structure for tracking which filters are set
// If all values in a category are false, it's treated as no filter - all items are included
// If one or more values in a category is true, the filter is set - only items matching the filter are included
// If two or more values in a category are true, the filter is the union of those values
// If multiple categories have set values, the result is the intersection of those categories
function createFilters() {
const filters = {
states: {}
};
for (const state of Object.keys(data_by_location)) {
filters.states[state] = { name: state, isSet: false }; |
<<<<<<<
const ExchangeFunctions = require('./ExchangeFunctions')
=======
const commonComponents_navigationBarButtons = require('../../MMAppUICommonComponents/navigationBarButtons.web')
>>>>>>>
const ExchangeFunctions = require('./ExchangeFunctions')
const commonComponents_navigationBarButtons = require('../../MMAppUICommonComponents/navigationBarButtons.web') |
<<<<<<<
/** @type {chokidar.FSWatcher=} */
let watcher;
/** @type {chokidar.FSWatcher=} */
let watcher2;
let usedWatchers = [];
let fixturesPath;
let subdir = 0;
let options;
let osXFsWatch;
let win32Polling;
let slowerDelay;
const PERM_ARR = 0o755; // rwe, r+e, r+e
=======
let watcher,
watcher2,
usedWatchers = [],
fixturesPath,
subdir = 0,
options,
node010 = process.version.slice(0, 5) === 'v0.10',
osXFsWatch,
win32Polling,
slowerDelay,
mochaIt = it,
PERM_ARR = 0o755; // rwe, r+e, r+e; 755
>>>>>>>
/** @type {chokidar.FSWatcher=} */
let watcher;
/** @type {chokidar.FSWatcher=} */
let watcher2;
let usedWatchers = [];
let fixturesPath;
let subdir = 0;
let options;
let osXFsWatch;
let win32Polling;
let slowerDelay;
const PERM_ARR = 0o755; // rwe, r+e, r+e
<<<<<<<
=======
>>>>>>>
<<<<<<<
before(async () => {
let created = 0;
await rimraf(sysPath.join(__dirname, 'test-fixtures'));
const _content = fs.readFileSync(__filename, 'utf-8');
const _only = _content.match(/\sit\.only\(/g);
const itCount = _only && _only.length || _content.match(/\sit\(/g).length;
const testCount = itCount * 3;
fs.mkdirSync(fixturesPath, PERM_ARR);
while (subdir < testCount) {
subdir++;
fixturesPath = getFixturePath('');
fs.mkdirSync(fixturesPath, PERM_ARR);
fs.writeFileSync(sysPath.join(fixturesPath, 'change.txt'), 'b');
fs.writeFileSync(sysPath.join(fixturesPath, 'unlink.txt'), 'b');
}
subdir = 0;
});
beforeEach(function() {
subdir++;
fixturesPath = getFixturePath('');
});
after(async () => {
await rimraf(sysPath.join(__dirname, 'test-fixtures'));
});
afterEach(function() {
function disposeWatcher(watcher) {
if (!watcher || !watcher.close) return;
os === 'darwin' ? usedWatchers.push(watcher) : watcher.close();
}
disposeWatcher(watcher);
disposeWatcher(watcher2);
});
=======
before(async () => {
let created = 0;
await rimraf(sysPath.join(__dirname, 'test-fixtures'));
const _content = fs.readFileSync(__filename, 'utf-8');
const _only = _content.match(/\sit\.only\(/g);
const itCount = _only && _only.length || _content.match(/\sit\(/g).length;
const testCount = itCount * 3;
fs.mkdirSync(fixturesPath, PERM_ARR);
while (subdir < testCount) {
subdir++;
fixturesPath = getFixturePath('');
fs.mkdirSync(fixturesPath, PERM_ARR);
fs.writeFileSync(sysPath.join(fixturesPath, 'change.txt'), 'b');
fs.writeFileSync(sysPath.join(fixturesPath, 'unlink.txt'), 'b');
}
subdir = 0;
});
beforeEach(function() {
subdir++;
fixturesPath = getFixturePath('');
});
function disposeWatcher(watcher) {
if (!watcher || !watcher.close) return;
os === 'darwin' ? usedWatchers.push(watcher) : watcher.close();
}
afterEach(function() {
disposeWatcher(watcher);
disposeWatcher(watcher2);
});
>>>>>>>
before(async () => {
let created = 0;
await rimraf(sysPath.join(__dirname, 'test-fixtures'));
const _content = fs.readFileSync(__filename, 'utf-8');
const _only = _content.match(/\sit\.only\(/g);
const itCount = _only && _only.length || _content.match(/\sit\(/g).length;
const testCount = itCount * 3;
fs.mkdirSync(fixturesPath, PERM_ARR);
while (subdir < testCount) {
subdir++;
fixturesPath = getFixturePath('');
fs.mkdirSync(fixturesPath, PERM_ARR);
fs.writeFileSync(sysPath.join(fixturesPath, 'change.txt'), 'b');
fs.writeFileSync(sysPath.join(fixturesPath, 'unlink.txt'), 'b');
}
subdir = 0;
});
beforeEach(function() {
subdir++;
fixturesPath = getFixturePath('');
});
after(async () => {
await rimraf(sysPath.join(__dirname, 'test-fixtures'));
});
afterEach(function() {
function disposeWatcher(watcher) {
if (!watcher || !watcher.close) return;
os === 'darwin' ? usedWatchers.push(watcher) : watcher.close();
}
disposeWatcher(watcher);
disposeWatcher(watcher2);
}); |
<<<<<<<
emitRaw(rawEvent, path);
if (path && item !== path) {
fsWatchBroadcast(sysPath.resolve(path), 'listeners', path);
}
=======
emitRaw(rawEvent, path, {watchedPath: item});
>>>>>>>
emitRaw(rawEvent, path, {watchedPath: item});
if (path && item !== path) {
fsWatchBroadcast(sysPath.resolve(path), 'listeners', path);
} |
<<<<<<<
return file === target || !target && previous.indexOf(file) === -1;
=======
return !previous.has(file);
>>>>>>>
return file === target || !target && !previous.has(file); |
<<<<<<<
this._emitReady();
return this.watchers.push(watcher);
=======
return this._watchers.push(watcher);
>>>>>>>
this._emitReady();
return this._watchers.push(watcher); |
<<<<<<<
const ProvidePlugin = require('webpack/lib/ProvidePlugin');
=======
const HtmlElementsPlugin = require('./html-elements-plugin');
>>>>>>>
const HtmlElementsPlugin = require('./html-elements-plugin');
<<<<<<<
helpers.root('node_modules/primeng') // https://github.com/primefaces/primeng/issues/201
=======
helpers.root('node_modules/@ngrx'),
helpers.root('node_modules/@angular2-material'),
>>>>>>>
helpers.root('node_modules/@ngrx'),
helpers.root('node_modules/@angular2-material'),
helpers.root('node_modules/primeng') // https://github.com/primefaces/primeng/issues/201
<<<<<<<
}),
/*
* Plugin: ProvidePlugin
*/
new ProvidePlugin({
jQuery: 'jquery',
$: 'jquery',
jquery: 'jquery',
fullCalendar: 'fullcalendar'
})
=======
}),
/*
* Plugin: HtmlHeadConfigPlugin
* Description: Generate html tags based on javascript maps.
*
* If a publicPath is set in the webpack output configuration, it will be automatically added to
* href attributes, you can disable that by adding a "=href": false property.
* You can also enable it to other attribute by settings "=attName": true.
*
* The configuration supplied is map between a location (key) and an element definition object (value)
* The location (key) is then exported to the template under then htmlElements property in webpack configuration.
*
* Example:
* Adding this plugin configuration
* new HtmlElementsPlugin({
* headTags: { ... }
* })
*
* Means we can use it in the template like this:
* <%= webpackConfig.htmlElements.headTags %>
*
* Dependencies: HtmlWebpackPlugin
*/
new HtmlElementsPlugin({
headTags: require('./head-config.common')
}),
>>>>>>>
}),
/*
* Plugin: ProvidePlugin
*/
new ProvidePlugin({
jQuery: 'jquery',
$: 'jquery',
jquery: 'jquery',
fullCalendar: 'fullcalendar'
}),
/*
* Plugin: HtmlHeadConfigPlugin
* Description: Generate html tags based on javascript maps.
*
* If a publicPath is set in the webpack output configuration, it will be automatically added to
* href attributes, you can disable that by adding a "=href": false property.
* You can also enable it to other attribute by settings "=attName": true.
*
* The configuration supplied is map between a location (key) and an element definition object (value)
* The location (key) is then exported to the template under then htmlElements property in webpack configuration.
*
* Example:
* Adding this plugin configuration
* new HtmlElementsPlugin({
* headTags: { ... }
* })
*
* Means we can use it in the template like this:
* <%= webpackConfig.htmlElements.headTags %>
*
* Dependencies: HtmlWebpackPlugin
*/
new HtmlElementsPlugin({
headTags: require('./head-config.common')
}), |
<<<<<<<
=======
/**
* Webpack Plugins
*/
var CopyWebpackPlugin = require('copy-webpack-plugin');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var ForkCheckerPlugin = require('awesome-typescript-loader').ForkCheckerPlugin;
/**
* Webpack Constants
*/
const ENV = process.env.ENV = process.env.NODE_ENV = 'development';
const HMR = helpers.hasProcessFlag('hot');
const METADATA = {
title: 'Angular2 Webpack Starter by @gdi2990 from @AngularClass',
baseUrl: '/',
host: process.env.HOST || 'localhost',
port: process.env.PORT || 3000,
ENV: ENV,
HMR: HMR
};
/**
* Webpack configuration
*
* See: http://webpack.github.io/docs/configuration.html#cli
*/
module.exports = {
// Static metadata for index.html
//
// See: (custom attribute)
metadata: METADATA,
>>>>>>>
/**
* Webpack configuration
*
* See: http://webpack.github.io/docs/configuration.html#cli
*/ |
<<<<<<<
obj.__read = undefined;
if (options)
obj.__options = undefined;
=======
delete obj.__read;
>>>>>>>
obj.__read = undefined; |
<<<<<<<
var segmentCount = 0;
var pathCount = 0;
var reportSegments = false && !window.silent;
var reportWindings = false && !window.silent;
var textAngle = 0;
var fontSize = 1 / paper.project.activeLayer.scaling.x;
function labelSegment(seg, text, color) {
var point = seg.point;
var key = Math.round(point.x / 10) + ',' + Math.round(point.y / 10);
var offset = segmentOffset[key] || 0;
segmentOffset[key] = offset + 1;
var text = new PointText({
point: point.add(new Point(fontSize, fontSize / 2)
.rotate(textAngle).add(0, offset * fontSize * 1.2)),
content: text,
justification: 'left',
fillColor: color,
fontSize: fontSize
});
text.pivot = text.globalToLocal(text.point);
text.rotation = textAngle;
}
function drawSegment(seg, text, index, color) {
if (!reportSegments)
return;
new Path.Circle({
center: seg.point,
radius: fontSize / 2,
strokeColor: color,
strokeScaling: false
});
var inter = seg._intersection;
labelSegment(seg, '#' + (pathCount + 1) + '.'
+ (path ? path._segments.length + 1 : 1)
+ ' ' + (segmentCount++) + '/' + index + ': ' + text
+ ' v: ' + !!seg._visited
+ ' p: ' + seg._path._id
+ ' x: ' + seg._point.x
+ ' y: ' + seg._point.y
+ ' op: ' + operator(seg._winding)
+ ' o: ' + (inter && inter._overlap || 0)
+ ' w: ' + seg._winding
, color);
}
for (var i = 0; i < (reportWindings ? segments.length : 0); i++) {
var seg = segments[i];
path = seg._path,
id = path._id,
point = seg.point,
inter = seg._intersection;
if (!(id in pathIndices))
pathIndices[id] = ++pathIndex;
labelSegment(seg, '#' + pathIndex + '.' + (i + 1)
+ ' i: ' + !!inter
+ ' x: ' + seg._point.x
+ ' y: ' + seg._point.y
+ ' o: ' + (inter && inter._overlap || 0)
+ ' w: ' + seg._winding
, 'green');
}
=======
>>>>>>>
var segmentCount = 0;
var pathCount = 0;
var reportSegments = false && !window.silent;
var reportWindings = false && !window.silent;
var textAngle = 0;
var fontSize = 1 / paper.project.activeLayer.scaling.x;
function labelSegment(seg, text, color) {
var point = seg.point;
var key = Math.round(point.x / 10) + ',' + Math.round(point.y / 10);
var offset = segmentOffset[key] || 0;
segmentOffset[key] = offset + 1;
var text = new PointText({
point: point.add(new Point(fontSize, fontSize / 2)
.rotate(textAngle).add(0, offset * fontSize * 1.2)),
content: text,
justification: 'left',
fillColor: color,
fontSize: fontSize
});
text.pivot = text.globalToLocal(text.point);
text.rotation = textAngle;
}
function drawSegment(seg, text, index, color) {
if (!reportSegments)
return;
new Path.Circle({
center: seg.point,
radius: fontSize / 2,
strokeColor: color,
strokeScaling: false
});
var inter = seg._intersection;
labelSegment(seg, '#' + (pathCount + 1) + '.'
+ (path ? path._segments.length + 1 : 1)
+ ' ' + (segmentCount++) + '/' + index + ': ' + text
+ ' v: ' + !!seg._visited
+ ' p: ' + seg._path._id
+ ' x: ' + seg._point.x
+ ' y: ' + seg._point.y
+ ' op: ' + operator(seg._winding)
+ ' o: ' + (inter && inter._overlap || 0)
+ ' w: ' + seg._winding
, color);
}
for (var i = 0; i < (reportWindings ? segments.length : 0); i++) {
var seg = segments[i];
path = seg._path,
id = path._id,
point = seg.point,
inter = seg._intersection;
if (!(id in pathIndices))
pathIndices[id] = ++pathIndex;
labelSegment(seg, '#' + pathIndex + '.' + (i + 1)
+ ' i: ' + !!inter
+ ' x: ' + seg._point.x
+ ' y: ' + seg._point.y
+ ' o: ' + (inter && inter._overlap || 0)
+ ' w: ' + seg._winding
, 'green');
} |
<<<<<<<
function netlifyPlugin(conf) {
return {
=======
module.exports = {
name: 'netlify-plugin-a11y',
>>>>>>>
module.exports = { |
<<<<<<<
var task = require ('./base'),
ejs = require ('ejs'),
=======
var task = require ('task/base'),
>>>>>>>
var task = require ('./base'),
<<<<<<<
var templateIO = project.root.fileIO (this.file);
=======
// TODO: add absolute paths
// no more presentation files in strange places
var templateIO = project.root.fileIO ('share', 'presentation', this.file);
>>>>>>>
// TODO: add absolute paths
// no more presentation files in strange places
var templateIO = project.root.fileIO ('share', 'presentation', this.file); |
<<<<<<<
// TODO:
// 1. detect instance name after reading var/instance
// 2. load configuration
// 3. load local fixup for configuration and override default
=======
// TODO: detect instance from var/instance
root.fileIO ('var/instance').readFile (function (data, err) {
});
// TODO: read config
// TODO: read config fixup
>>>>>>>
// TODO:
// 1. detect instance name after reading var/instance
// 2. load configuration
// 3. load local fixup for configuration and override default
// TODO: detect instance from var/instance
root.fileIO ('var/instance').readFile (function (data, err) {
});
// TODO: read config
// TODO: read config fixup
<<<<<<<
=======
var EventEmitter = require ('events').EventEmitter;
require ('util').inherits (project, EventEmitter);
common.extend (project.prototype, {
});
>>>>>>>
var EventEmitter = require ('events').EventEmitter;
require ('util').inherits (project, EventEmitter);
common.extend (project.prototype, {
}); |
<<<<<<<
/**
* Checks if the EnumItem is the same as the passing object.
* @param {EnumItem || String || Number} key The object to check with.
* @return {Boolean} The check result.
*/
is: function(key) {
if (key instanceof EnumItem || (typeof(key) === 'object' && key.key !== undefined && key.value !== undefined)) {
return this.key === key.key;
} else if (typeof(key) === 'string') {
return this.key === key;
} else {
return this.value === key;
=======
EnumItem.prototype = {
/*constructor reference so that, this.constructor===EnumItem//=>true */
constructor: EnumItem,
/**
* Checks if the flagged EnumItem has the passing object.
* @param {EnumItem || String || Number} value The object to check with.
* @return {Boolean} The check result.
*/
has: function(value) {
if (value instanceof EnumItem || (typeof(value) === 'object' && value.key !== undefined && value.value !== undefined)) {
return (this.value & value.value) !== 0;
} else if (typeof(value) === 'string') {
return this.key.indexOf(value) >= 0;
} else {
return (this.value & value) !== 0;
}
},
/**
* Checks if the EnumItem is the same as the passing object.
* @param {EnumItem || String || Number} key The object to check with.
* @return {Boolean} The check result.
*/
is: function(key) {
if (key instanceof EnumItem || (typeof(key) === 'object' && key.key !== undefined && key.value !== undefined)) {
return this.key === key.key;
} else if (typeof(key) === 'string') {
return this.key === key;
} else {
return this.value === key;
}
},
/**
* Returns String representation of this EnumItem.
* @return {String} String representation of this EnumItem.
*/
toString: function() {
return this.key;
},
/**
* Returns JSON object representation of this EnumItem.
* @return {String} JSON object representation of this EnumItem.
*/
toJSON: function() {
return this.key;
},
/**
* Returns the value to compare with.
* @return {String} The value to compare with.
*/
valueOf: function() {
return this.value;
>>>>>>>
/**
* Checks if the EnumItem is the same as the passing object.
* @param {EnumItem || String || Number} key The object to check with.
* @return {Boolean} The check result.
*/
is: function(key) {
if (key instanceof EnumItem || (typeof(key) === 'object' && key.key !== undefined && key.value !== undefined)) {
return this.key === key.key;
} else if (typeof(key) === 'string') {
return this.key === key;
} else {
return this.value === key;
<<<<<<<
=======
this._options = options || {};
this._options.separator = this._options.separator || ' | ';
this._options.endianness = this._options.endianness || endianness;
>>>>>>>
<<<<<<<
/*constructor reference so that, this.constructor===Enum//=>true */
constructor: Enum,
/**
* Returns the appropriate EnumItem key.
* @param {EnumItem || String || Number} key The object to get with.
* @return {String} The get result.
*/
getKey: function(value) {
var item = this.get(value);
if (item) {
return item.key;
} else {
return 'Undefined';
}
},
/**
* Returns the appropriate EnumItem value.
* @param {EnumItem || String || Number} key The object to get with.
* @return {Number} The get result.
*/
getValue: function(key) {
var item = this.get(key);
if (item) {
return item.value;
} else {
return null;
}
},
/**
* Returns the appropriate EnumItem.
* @param {EnumItem || String || Number} key The object to get with.
* @return {EnumItem} The get result.
*/
get: function(key) {
if (key === null || key === undefined) return null;
if (key instanceof EnumItem || (typeof(key) === 'object' && key.key !== undefined && key.value !== undefined)) {
var foundIndex = this.enums.indexOf(key);
if (foundIndex >= 0) {
return key;
=======
/* implement the "ref type interface", so that Enum types can
* be used in `node-ffi` function declarations and invokations.
* In C, these Enums act as `uint32_t` types.
*
* https://github.com/TooTallNate/ref#the-type-interface
*/
size: 4,
indirection: 1,
/**
* Returns the appropriate EnumItem key.
* @param {EnumItem || String || Number} key The object to get with.
* @return {String} The get result.
*/
getKey: function(value) {
var item = this.get(value);
if (item) {
return item.key;
} else {
return 'Undefined';
>>>>>>>
/*constructor reference so that, this.constructor===Enum//=>true */
constructor: Enum,
/* implement the "ref type interface", so that Enum types can
* be used in `node-ffi` function declarations and invokations.
* In C, these Enums act as `uint32_t` types.
*
* https://github.com/TooTallNate/ref#the-type-interface
*/
size: 4,
indirection: 1,
/**
* Returns the appropriate EnumItem key.
* @param {EnumItem || String || Number} key The object to get with.
* @return {String} The get result.
*/
getKey: function(value) {
var item = this.get(value);
if (item) {
return item.key;
} else {
return 'Undefined';
}
},
/**
* Returns the appropriate EnumItem value.
* @param {EnumItem || String || Number} key The object to get with.
* @return {Number} The get result.
*/
getValue: function(key) {
var item = this.get(key);
if (item) {
return item.value;
} else {
return null;
}
},
/**
* Returns the appropriate EnumItem.
* @param {EnumItem || String || Number} key The object to get with.
* @return {EnumItem} The get result.
*/
get: function(key, offset) {
if (key === null || key === undefined) return null;
// Buffer instance support, part of the ref Type interface
if (Buffer.isBuffer(key)) {
key = key['readUInt32' + this._options.endianness](offset || 0);
}
if (key instanceof EnumItem || (typeof(key) === 'object' && key.key !== undefined && key.value !== undefined)) {
var foundIndex = this.enums.indexOf(key);
if (foundIndex >= 0) {
return key;
<<<<<<<
return this.get(key.key);
} else if (typeof(key) === 'string') {
if (key.indexOf(this._options.separator) > 0) {
var parts = key.split(this._options.separator);
=======
},
/**
* Returns the appropriate EnumItem.
* @param {EnumItem || String || Number} key The object to get with.
* @return {EnumItem} The get result.
*/
get: function(key, offset) {
if (key === null || key === undefined) return null;
// Buffer instance support, part of the ref Type interface
if (Buffer.isBuffer(key)) {
key = key['readUInt32' + this._options.endianness](offset || 0);
}
if (key instanceof EnumItem || (typeof(key) === 'object' && key.key !== undefined && key.value !== undefined)) {
var foundIndex = this.enums.indexOf(key);
if (foundIndex >= 0) {
return key;
}
if (!this.isFlaggable || (this.isFlaggable && key.key.indexOf(this._options.separator) < 0)) {
return null;
}
return this.get(key.key);
} else if (typeof(key) === 'string') {
if (key.indexOf(this._options.separator) > 0) {
var parts = key.split(this._options.separator);
>>>>>>>
return this.get(key.key);
} else if (typeof(key) === 'string') {
if (key.indexOf(this._options.separator) > 0) {
var parts = key.split(this._options.separator);
<<<<<<<
=======
return this.get(result || null);
}
},
/**
* Sets the Enum "value" onto the give `buffer` at the specified `offset`.
* Part of the ref "Type interface".
*
* @param {Buffer} buffer The Buffer instance to write to.
* @param {Number} offset The offset in the buffer to write to. Default 0.
* @param {EnumItem || String || Number} value The EnumItem to write.
*/
set: function (buffer, offset, value) {
var item = this.get(value);
if (item) {
return buffer['writeUInt32' + this._options.endianness](item.value, offset || 0);
}
},
/**
* Define freezeEnums() as a property of the prototype.
* make enumerable items nonconfigurable and deep freeze the properties. Throw Error on property setter.
*/
freezeEnums: function() {
function freezer(o) {
var props = Object.getOwnPropertyNames(o);
props.forEach( function(p){
if (!Object.getOwnPropertyDescriptor(o, p).configurable) {
return;
}
Object.defineProperties(o, p, {writable:false, configurable:false});
})
return o;
>>>>>>> |
<<<<<<<
var dest = './temp/cc.json';
fs.writeFile(dest, JSON.stringify(contract.cc), function(e){
=======
var dest = __dirname + '/temp/cc.json';
fs.writeFile(dest, JSON.stringify(contract), function(e){
>>>>>>>
var dest = __dirname + '/temp/cc.json';
fs.writeFile(dest, JSON.stringify(contract.cc), function(e){
<<<<<<<
var dest = './temp/file.zip';
var unzip_dest = './temp/unzip/' + dir;
=======
try {
// Query the entry
stats = fs.lstatSync(__dirname + '/temp');
// Is it a directory?
if (stats.isDirectory()) {
console.log("The temporary directory exists.")
}
else
{
console.log("It's a file... what?")
}
}
catch (e) {
console.log("Error when trying to use temp directory: " + e)
fs.mkdirSync(__dirname + "/temp");
}
var dest = __dirname + '/temp/file.zip';
var unzip_dest = __dirname + '/temp/unzip/' + path;
>>>>>>>
var temp_dest = __dirname + '/temp'; // ./temp
var dest = __dirname + '/temp/file.zip'; // ./temp/file.zip
var unzip_dest = temp_dest + '/unzip'; // ./temp/unzip
var unzip_cc_dest = unzip_dest + '/' + dir; // ./temp/unzip/DIRECTORY
<<<<<<<
fs.access('temp/unzip/' + dir, cb_file_exists); //does this shit exist yet?
=======
fs.access(__dirname + '/temp/unzip', cb_file_exists); //does this shit exist yet?
>>>>>>>
try{fs.mkdirSync(temp_dest);}
catch(e){}
fs.access(unzip_cc_dest, cb_file_exists); //does this shit exist yet? |
<<<<<<<
var defaultProps = {};
if(this.props.itemDivider)
defaultProps = {
=======
if(this.props['item-divider'])
var defaultProps = {
>>>>>>>
var defaultProps = {};
if(this.props['item-divider'])
defaultProps = { |
<<<<<<<
footerHeight: 55,
footerDefaultBg: platform === "ios" ? "#F8F8F8" : "#4179F7",
footerPaddingBottom: 0,
=======
footerHeight: isIphoneX ? 89 : 55,
footerDefaultBg: platform === "ios" ? "#F8F8F8" : "#3F51B5",
footerPaddingBottom: isIphoneX ? 34 : 0,
>>>>>>>
footerHeight: 55,
footerDefaultBg: platform === "ios" ? "#F8F8F8" : "#3F51B5",
footerPaddingBottom: 0, |
<<<<<<<
brandPrimary: (Platform.OS === 'ios') ? '#007aff' : '#3F51B5',
brandInfo: '#5bc0de',
=======
brandPrimary: '#5067FF',
brandInfo: '#62B1F6',
>>>>>>>
brandPrimary: (Platform.OS === 'ios') ? '#007aff' : '#3F51B5',
brandInfo: '#62B1F6', |
<<<<<<<
let squareThumbs = false;
if (this.thumbnailPresent()) {
React.Children.forEach(this.props.children, (child) => {
if (child && child.props.square) {
=======
var squareThumbs = false;
if (this.thumbnailPresent() || this.gravatarPresent()) {
React.Children.forEach(this.props.children, function (child) {
if(child.props.square)
>>>>>>>
let squareThumbs = false;
if (this.thumbnailPresent() || this.gravatarPresent()) {
React.Children.forEach(this.props.children, (child) => {
if (child && child.props.square) {
<<<<<<<
};
} else
if (child.type === Text) {
if ((this.props.header) || (this.props.footer)) {
defaultProps = {
style: this.getInitialStyle().dividerItemText
};
} else if (child.props.note && this.thumbnailPresent()) {
=======
}
}
else if(child.type == Text) {
if ((this.props.header) || (this.props.footer)) {
defaultProps = {
style: this.getInitialStyle().dividerItemText
}
}
else {
if(child.props.note && (this.thumbnailPresent() || this.gravatarPresent())) {
>>>>>>>
};
} else
if (child.type === Text) {
if ((this.props.header) || (this.props.footer)) {
defaultProps = {
style: this.getInitialStyle().dividerItemText
};
} else if (child.props.note && (this.thumbnailPresent() || this.gravatarPresent())) {
<<<<<<<
};
} else if (child.type === Image) {
=======
}
}
else if(child.type == Gravatar) {
defaultProps = {
style: this.getInitialStyle().gravatar
}
}
else if(child.type == Image ) {
>>>>>>>
};
} else if(child.type == Gravatar) {
defaultProps = {
style: this.getInitialStyle().gravatar
};
} else if (child.type === Image) {
<<<<<<<
let newChildren = [];
let childrenArray = React.Children.toArray(this.props.children);
childrenArray = childrenArray.filter(child => !!child);
if (!this.thumbnailPresent() && !this.iconPresent()) {
newChildren = childrenArray.map((child, i) =>
React.cloneElement(child, { ...this.getChildProps(child), key: i })
);
} else {
=======
var newChildren = [];
if((!this.thumbnailPresent() || !this.thumbnailPresent()) && !this.iconPresent()) {
newChildren = React.Children.map(this.props.children, (child, i) => {
return React.cloneElement(child, {...this.getChildProps(child), key: i});
});
}
else {
>>>>>>>
let newChildren = [];
let childrenArray = React.Children.toArray(this.props.children);
childrenArray = childrenArray.filter(child => !!child);
if ((!this.thumbnailPresent() || !this.gravatarPresent()) && !this.iconPresent()) {
newChildren = childrenArray.map((child, i) =>
React.cloneElement(child, { ...this.getChildProps(child), key: i })
);
} else { |
<<<<<<<
return computeProps(this.props, defaultProps);
}
render() {
const variables = this.context.theme
? this.context.theme["@@shoutem.theme/themeStyle"].variables
: variable;
const platformStyle = variables.platformStyle;
const platform = variables.platform;
return (
<TouchableOpacity
ref={c => (this._root = c)}
{...this.prepareRootProps(variables)}
>
<IconNB
style={{
color: this.props.checked === true ? variables.checkboxTickColor : 'transparent',
fontSize: variables.CheckboxFontSize,
lineHeight: variables.CheckboxIconSize
}}
name={
platform === "ios" && platformStyle !== "material"
? "ios-checkmark-outline"
: "md-checkmark"
}
/>
</TouchableOpacity>
);
}
=======
return computeProps(this.props, defaultProps);
}
render() {
const variables = this.context.theme ? this.context.theme["@@shoutem.theme/themeStyle"].variables : variable;
const platformStyle = variables.platformStyle;
const platform = variables.platform;
return (
<TouchableOpacity ref={c => (this._root = c)} {...this.prepareRootProps(variables)}>
<IconNB
style={{
color: variables.checkboxTickColor,
fontSize: variables.CheckboxFontSize,
lineHeight: variables.CheckboxIconSize,
}}
name={platform === "ios" && platformStyle !== "material" ? "ios-checkmark-outline" : "md-checkmark"}
/>
</TouchableOpacity>
);
}
>>>>>>>
return computeProps(this.props, defaultProps);
}
render() {
const variables = this.context.theme ? this.context.theme["@@shoutem.theme/themeStyle"].variables : variable;
const platformStyle = variables.platformStyle;
const platform = variables.platform;
return (
<TouchableOpacity ref={c => (this._root = c)} {...this.prepareRootProps(variables)}>
<IconNB
style={{
color: this.props.checked === true ? variables.checkboxTickColor : 'transparent',
fontSize: variables.CheckboxFontSize,
lineHeight: variables.CheckboxIconSize,
}}
name={platform === "ios" && platformStyle !== "material" ? "ios-checkmark-outline" : "md-checkmark"}
/>
</TouchableOpacity>
);
} |
<<<<<<<
var ldefined = ltype !== 'undefined' || (stack && (0 < stack.length) && stack[stack.length - 1].lhs && stack[stack.length - 1].lhs.hasOwnProperty(key));
var rdefined = rtype !== 'undefined' || (stack && (0 < stack.length) && stack[stack.length - 1].rhs && stack[stack.length - 1].rhs.hasOwnProperty(key));
=======
var ldefined = ltype !== 'undefined' || (stack.length && stack[stack.length - 1].lhs && Object.getOwnPropertyDescriptor(stack[stack.length - 1].lhs, key));
var rdefined = rtype !== 'undefined' || (stack.length && stack[stack.length - 1].rhs && Object.getOwnPropertyDescriptor(stack[stack.length - 1].rhs, key));
>>>>>>>
var ldefined = ltype !== 'undefined' ||
(stack && (0 < stack.length) && stack[stack.length - 1].lhs &&
Object.getOwnPropertyDescriptor(stack[stack.length - 1].lhs, key));
var rdefined = rtype !== 'undefined' ||
(stack && (0 < stack.length) && stack[stack.length - 1].rhs &&
Object.getOwnPropertyDescriptor(stack[stack.length - 1].rhs, key)); |
<<<<<<<
var ldefined = ltype !== 'undefined' || (stack && (0 < stack.length) && stack[stack.length - 1].lhs && stack[stack.length - 1].lhs.hasOwnProperty(key));
var rdefined = rtype !== 'undefined' || (stack && (0 < stack.length) && stack[stack.length - 1].rhs && stack[stack.length - 1].rhs.hasOwnProperty(key));
=======
var ldefined = ltype !== 'undefined' || (stack.length && stack[stack.length - 1].lhs && Object.getOwnPropertyDescriptor(stack[stack.length - 1].lhs, key));
var rdefined = rtype !== 'undefined' || (stack.length && stack[stack.length - 1].rhs && Object.getOwnPropertyDescriptor(stack[stack.length - 1].rhs, key));
>>>>>>>
var ldefined = ltype !== 'undefined' ||
(stack && (0 < stack.length) && stack[stack.length - 1].lhs &&
Object.getOwnPropertyDescriptor(stack[stack.length - 1].lhs, key));
var rdefined = rtype !== 'undefined' ||
(stack && (0 < stack.length) && stack[stack.length - 1].rhs &&
Object.getOwnPropertyDescriptor(stack[stack.length - 1].rhs, key)); |
<<<<<<<
color: '#58575C',
alignSelf: 'center',
fontWeight: '100',
flex: 1,
textAlign: 'right',
=======
color: '#999'
},
itemSubNote: {
fontSize: 15,
color: '#999'
},
thumbnail: {
},
fullImage: {
width: 300,
height: 300
>>>>>>>
color: '#58575C',
alignSelf: 'center',
fontWeight: '100',
flex: 1,
textAlign: 'right',
},
itemSubNote: {
fontSize: 15,
color: '#999'
},
thumbnail: {
},
fullImage: {
width: 300,
height: 300 |
<<<<<<<
componentWillReceiveProps({ dataSource }) {
if (dataSource.length !== this.props.dataSource.length) {
if (dataSource.length <= 1) {
this.setState({
...this.state,
selectedItem: dataSource[0],
selectedItem2: undefined,
disabled: dataSource.length === 0,
lastCard: dataSource.length === 1
});
return;
}
const visibleIndex = dataSource.indexOf(this.state.selectedItem);
const currentIndex = visibleIndex < 0 ? visibleIndex + 1 : visibleIndex;
const nextIndex = currentIndex + 1 === dataSource.length ? 0 : currentIndex + 1;
this.setState({
selectedItem: dataSource[currentIndex],
selectedItem2: dataSource[nextIndex],
});
}
}
getInitialStyle() {
return {
topCard: {
position: "absolute",
top: 0,
right: 0,
left: 0
}
};
}
=======
getInitialStyle() {
return {
topCard: {
position: 'absolute',
top: 0,
right: 0,
left: 0,
},
};
}
>>>>>>>
componentWillReceiveProps({ dataSource }) {
if (dataSource.length !== this.props.dataSource.length) {
if (dataSource.length <= 1) {
this.setState({
...this.state,
selectedItem: dataSource[0],
selectedItem2: undefined,
disabled: dataSource.length === 0,
lastCard: dataSource.length === 1
});
return;
}
const visibleIndex = dataSource.indexOf(this.state.selectedItem);
const currentIndex = visibleIndex < 0 ? visibleIndex + 1 : visibleIndex;
const nextIndex = currentIndex + 1 === dataSource.length ? 0 : currentIndex + 1;
this.setState({
selectedItem: dataSource[currentIndex],
selectedItem2: dataSource[nextIndex],
});
}
}
getInitialStyle() {
return {
topCard: {
position: 'absolute',
top: 0,
right: 0,
left: 0,
},
};
} |
<<<<<<<
var mergedStyle = {};
var btnType = {
color: ((this.props.bordered) && (this.props.primary)) ? this.getTheme().btnPrimaryBg :
((this.props.bordered) && (this.props.success)) ? this.getTheme().btnSuccessBg :
((this.props.bordered) && (this.props.danger)) ? this.getTheme().btnDangerBg :
((this.props.bordered) && (this.props.warning)) ? this.getTheme().btnWarningBg :
((this.props.bordered) && (this.props.info)) ? this.getTheme().btnInfoBg :
this.getTheme().inverseTextColor,
fontSize: (this.props.large) ? this.getTheme().btnTextSizeLarge : (this.props.small) ? this.getTheme().btnTextSizeSmall : this.getTheme().btnTextSize,
lineHeight: (this.props.large) ? 32 : (this.props.small) ? 15 : 22
}
return _.merge(mergedStyle, btnType, this.props.textStyle);
=======
var mergedStyle = {};
var btnType = {
paddingLeft: 3,
color: (((this.props.bordered) && (this.props.primary)) || ((this.props.transparent) && (this.props.primary))) ? this.getTheme().btnPrimaryBg :
(((this.props.bordered) && (this.props.success)) || ((this.props.transparent) && (this.props.success))) ? this.getTheme().btnSuccessBg :
(((this.props.bordered) && (this.props.danger)) || ((this.props.transparent) && (this.props.danger))) ? this.getTheme().btnDangerBg :
(((this.props.bordered) && (this.props.warning)) || ((this.props.transparent) && (this.props.warning))) ? this.getTheme().btnWarningBg :
(((this.props.bordered) && (this.props.info)) || ((this.props.transparent) && (this.props.info))) ? this.getTheme().btnInfoBg :
((this.props.bordered) || (this.props.transparent)) ? this.getTheme().btnPrimaryBg :
this.getTheme().inverseTextColor,
fontSize: (this.props.large) ? this.getTheme().btnTextSizeLarge : (this.props.small) ? this.getTheme().btnTextSizeSmall : this.getTheme().btnTextSize,
lineHeight: (this.props.large) ? 32 : (this.props.small) ? 15 : 22
}
return _.merge(mergedStyle, btnType, this.props.textStyle);
>>>>>>>
var mergedStyle = {};
var btnType = {
paddingLeft: 3,
color: (((this.props.bordered) && (this.props.primary)) || ((this.props.transparent) && (this.props.primary))) ? this.getTheme().btnPrimaryBg :
(((this.props.bordered) && (this.props.success)) || ((this.props.transparent) && (this.props.success))) ? this.getTheme().btnSuccessBg :
(((this.props.bordered) && (this.props.danger)) || ((this.props.transparent) && (this.props.danger))) ? this.getTheme().btnDangerBg :
(((this.props.bordered) && (this.props.warning)) || ((this.props.transparent) && (this.props.warning))) ? this.getTheme().btnWarningBg :
(((this.props.bordered) && (this.props.info)) || ((this.props.transparent) && (this.props.info))) ? this.getTheme().btnInfoBg :
((this.props.bordered) || (this.props.transparent)) ? this.getTheme().btnPrimaryBg :
this.getTheme().inverseTextColor,
fontSize: (this.props.large) ? this.getTheme().btnTextSizeLarge : (this.props.small) ? this.getTheme().btnTextSizeSmall : this.getTheme().btnTextSize,
lineHeight: (this.props.large) ? 32 : (this.props.small) ? 15 : 22
}
return _.merge(mergedStyle, btnType, this.props.textStyle);
<<<<<<<
color: ((this.props.bordered) && (this.props.primary)) ? this.getTheme().btnPrimaryBg :
((this.props.bordered) && (this.props.success)) ? this.getTheme().btnSuccessBg :
((this.props.bordered) && (this.props.danger)) ? this.getTheme().btnDangerBg :
((this.props.bordered) && (this.props.warning)) ? this.getTheme().btnWarningBg :
((this.props.bordered) && (this.props.info)) ? this.getTheme().btnInfoBg :
this.getTheme().inverseTextColor,
fontSize: (this.props.large) ? this.getTheme().iconSizeLarge : (this.props.small) ? this.getTheme().iconSizeSmall : this.getTheme().iconFontSize
=======
color: (((this.props.bordered) && (this.props.primary)) || ((this.props.transparent) && (this.props.primary))) ? this.getTheme().btnPrimaryBg :
(((this.props.bordered) && (this.props.success)) || ((this.props.transparent) && (this.props.success))) ? this.getTheme().btnSuccessBg :
(((this.props.bordered) && (this.props.danger)) || ((this.props.transparent) && (this.props.danger))) ? this.getTheme().btnDangerBg :
(((this.props.bordered) && (this.props.warning)) || ((this.props.transparent) && (this.props.warning))) ? this.getTheme().btnWarningBg :
(((this.props.bordered) && (this.props.info)) || ((this.props.transparent) && (this.props.info))) ? this.getTheme().btnInfoBg :
((this.props.bordered) || (this.props.transparent)) ? this.getTheme().btnPrimaryBg :
this.getTheme().inverseTextColor,
fontSize: (this.props.large) ? this.getTheme().iconSizeLarge : (this.props.small) ? this.getTheme().iconSizeSmall : this.getTheme().iconFontSize,
>>>>>>>
color: (((this.props.bordered) && (this.props.primary)) || ((this.props.transparent) && (this.props.primary))) ? this.getTheme().btnPrimaryBg :
(((this.props.bordered) && (this.props.success)) || ((this.props.transparent) && (this.props.success))) ? this.getTheme().btnSuccessBg :
(((this.props.bordered) && (this.props.danger)) || ((this.props.transparent) && (this.props.danger))) ? this.getTheme().btnDangerBg :
(((this.props.bordered) && (this.props.warning)) || ((this.props.transparent) && (this.props.warning))) ? this.getTheme().btnWarningBg :
(((this.props.bordered) && (this.props.info)) || ((this.props.transparent) && (this.props.info))) ? this.getTheme().btnInfoBg :
((this.props.bordered) || (this.props.transparent)) ? this.getTheme().btnPrimaryBg :
this.getTheme().inverseTextColor,
fontSize: (this.props.large) ? this.getTheme().iconSizeLarge : (this.props.small) ? this.getTheme().iconSizeSmall : this.getTheme().iconFontSize |
<<<<<<<
const Icomoon = createIconSetFromIcoMoon(icoMoonConfig);
class IconNB extends Component {
=======
class IconNB extends React.PureComponent {
>>>>>>>
const Icomoon = createIconSetFromIcoMoon(icoMoonConfig);
class IconNB extends React.PureComponent {
<<<<<<<
return <this.Icon ref={(c) => (this._root = c)} {...this.props} />;
=======
return <this.Icon ref={this.setRoot} {...this.props} />;
>>>>>>>
return <this.Icon ref={this.setRoot} {...this.props} />; |
<<<<<<<
getSelectedItem() {
return _.find(this.props.children, child => child.props.value === this.props.selectedValue);
}
modifyHeader() {
const childrenArray = React.Children.toArray(this.props.headerComponent.props.children);
const newChildren = [];
childrenArray.forEach((child) => {
if (child.type === Button) {
newChildren.push(React.cloneElement(child,
{ onPress: () => { this._setModalVisible(false); } }));
} else {
newChildren.push(child);
}
});
return <Header {...this.props.headerComponent.props} > {newChildren}</Header>;
}
=======
>>>>>>>
getSelectedItem() {
return _.find(this.props.children, child => child.props.value === this.props.selectedValue);
}
<<<<<<<
...View.propTypes,
renderButton: React.PropTypes.func
=======
...ViewPropTypes,
>>>>>>>
...ViewPropTypes,
renderButton: React.PropTypes.func |
<<<<<<<
QUnit.test('SQL/MongoDB export + MongoDB import', function(assert) {
=======
QUnit.test('SQL/MongoDB/Loopback export', function(assert) {
>>>>>>>
QUnit.test('SQL/MongoDB/Loopback export/import', function(assert) {
<<<<<<<
assert.deepEqual($('#container9').queryBuilder('getRulesFromMongo',basic_rules_mongodb), basic_rules, 'Should return object with rules');
=======
assert.deepEqual($('#container9').queryBuilder('getLoopback'), basic_rules_loopback, 'Should create Loopback query');
>>>>>>>
assert.deepEqual($('#container9').queryBuilder('getRulesFromMongo',basic_rules_mongodb), basic_rules, 'Should return object with rules');
assert.deepEqual($('#container9').queryBuilder('getLoopback'), basic_rules_loopback, 'Should create Loopback query'); |
<<<<<<<
// DEFAULT CONFIG
// ===============================
$.fn.queryBuilder.defaults.set({
mongoOperators: {
equal: function(v){ return v[0]; },
not_equal: function(v){ return {'$ne': v[0]}; },
in: function(v){ return {'$in': v}; },
not_in: function(v){ return {'$nin': v}; },
less: function(v){ return {'$lt': v[0]}; },
less_or_equal: function(v){ return {'$lte': v[0]}; },
greater: function(v){ return {'$gt': v[0]}; },
greater_or_equal: function(v){ return {'$gte': v[0]}; },
between: function(v){ return {'$gte': v[0], '$lte': v[1]}; },
begins_with: function(v){ return {'$regex': '^' + escapeRegExp(v[0])}; },
not_begins_with: function(v){ return {'$regex': '^(?!' + escapeRegExp(v[0]) + ')'}; },
contains: function(v){ return {'$regex': escapeRegExp(v[0])}; },
not_contains: function(v){ return {'$regex': '^((?!' + escapeRegExp(v[0]) + ').)*$', '$options': 's'}; },
ends_with: function(v){ return {'$regex': escapeRegExp(v[0]) + '$'}; },
not_ends_with: function(v){ return {'$regex': '(?<!' + escapeRegExp(v[0]) + ')$'}; },
is_empty: function(v){ return ''; },
is_not_empty: function(v){ return {'$ne': ''}; },
is_null: function(v){ return null; },
is_not_null: function(v){ return {'$ne': null}; }
},
mongoRuleOperators: {
$ne: function(v) {
v = v.$ne;
return {
'val': v,
'op': v === null ? 'is_not_null' : (v === '' ? 'is_not_empty' : 'not_equal')
};
},
eq: function(v) {
return {
'val': v,
'op': v === null ? 'is_null' : (v === '' ? 'is_empty' : 'equal')
};
},
$regex: function(v) {
v = v.$regex;
if (v.slice(0,4) == '^(?!' && v.slice(-1) == ')') {
return { 'val': v.slice(4,-1), 'op': 'not_begins_with' };
}
else if (v.slice(0,5) == '^((?!' && v.slice(-5) == ').)*$') {
return { 'val': v.slice(5,-5), 'op': 'not_contains' };
}
else if (v.slice(0,4) == '(?<!' && v.slice(-2) == ')$') {
return { 'val': v.slice(4,-2), 'op': 'not_ends_with' };
}
else if (v.slice(-1) == '$') {
return { 'val': v.slice(0,-1), 'op': 'ends_with' };
}
else if (v.slice(0,1) == '^') {
return { 'val': v.slice(1), 'op': 'begins_with' };
}
else {
return { 'val': v, 'op': 'contains' };
}
},
between : function(v) { return {'val': [v.$gte, v.$lte], 'op': 'between'}; },
$in : function(v) { return {'val': v.$in, 'op': 'in'}; },
$nin : function(v) { return {'val': v.$nin, 'op': 'not_in'}; },
$lt : function(v) { return {'val': v.$lt, 'op': 'less'}; },
$lte : function(v) { return {'val': v.$lte, 'op': 'less_or_equal'}; },
$gt : function(v) { return {'val': v.$gt, 'op': 'greater'}; },
$gte : function(v) { return {'val': v.$gte, 'op': 'greater_or_equal'}; }
}
});
=======
========================
$.fn.queryBuilder.defaults.set({
mongoOperators: {
equal: function(v){ return v[0]; },
not_equal: function(v){ return {'$ne': v[0]}; },
in: function(v){ return {'$in': v}; },
not_in: function(v){ return {'$nin': v}; },
less: function(v){ return {'$lt': v[0]}; },
less_or_equal: function(v){ return {'$lte': v[0]}; },
greater: function(v){ return {'$gt': v[0]}; },
greater_or_equal: function(v){ return {'$gte': v[0]}; },
between: function(v){ return {'$gte': v[0], '$lte': v[1]}; },
begins_with: function(v){ return {'$regex': '^' + escapeRegExp(v[0])}; },
not_begins_with: function(v){ return {'$regex': '^(?!' + escapeRegExp(v[0]) + ')'}; },
contains: function(v){ return {'$regex': escapeRegExp(v[0])}; },
not_contains: function(v){ return {'$regex': '^((?!' + escapeRegExp(v[0]) + ').)*$', '$options': 's'}; },
ends_with: function(v){ return {'$regex': escapeRegExp(v[0]) + '$'}; },
not_ends_with: function(v){ return {'$regex': '(?<!' + escapeRegExp(v[0]) + ')$'}; },
is_empty: function(v){ return ''; },
is_not_empty: function(v){ return {'$ne': ''}; },
is_null: function(v){ return null; },
is_not_null: function(v){ return {'$ne': null}; }
}
});
=======
// PUBLIC METHODS
// ===============================
QueryBuilder.extend({
/**
* Get rules as MongoDB query
* @param data {object} (optional) rules
* @return {object}
*/
getMongo: function(data) {
data = (data===undefined) ? this.getRules() : data;
>>>>>>>
// PUBLIC METHODS
// ===============================
QueryBuilder.extend({
/**
* Get rules as MongoDB query
* @param data {object} (optional) rules
* @return {object}
*/
getMongo: function(data) {
data = (data===undefined) ? this.getRules() : data;
<<<<<<<
rule.value.forEach(function(v, i) {
values.push(changeType(v, rule.type, 'mongo'));
});
=======
if (ope.accept_values) {
if (!(rule.value instanceof Array)) {
rule.value = [rule.value];
>>>>>>>
if (ope.accept_values) {
if (!(rule.value instanceof Array)) {
rule.value = [rule.value];
<<<<<<<
return res;
}(data));
},
/**
* Convert MongoDB object to rules
* @param data {object} query object
* @return {object}
*/
getRulesFromMongo: function(data) {
if (data === undefined || data === null) {
return null;
}
var that = this,
conditions = ['$and','$or'];
return (function parse(data) {
var topKeys = Object.keys(data);
if (topKeys.length > 1) {
$.error('Invalid MongoDB query format.');
}
if (conditions.indexOf(topKeys[0].toLowerCase()) === -1) {
$.error('Unable to build Rule from MongoDB query with '+ topKeys[0] +' condition');
}
var condition = topKeys[0].toLowerCase() === conditions[0] ? 'AND' : 'OR',
rules = data[topKeys[0]],
parts = [];
$.each(rules, function(i, rule) {
var keys = Object.keys(rule);
if (conditions.indexOf(keys[0].toLowerCase()) !== -1) {
parts.push(parse(rule));
}
else {
var field = keys[0],
value = rule[field];
var operator = that.determineMongoOperator(value, field);
if (operator === undefined) {
$.error('Invalid MongoDB query format.');
}
var mdbrl = that.settings.mongoRuleOperators[operator];
if (mdbrl === undefined) {
$.error('JSON Rule operation unknown for operator '+ operator);
}
var opVal = mdbrl.call(that, value);
parts.push({
id: that.change('getMongoDBFieldID', field, value),
field: field,
operator: opVal.op,
value: opVal.val
});
}
});
var res = {};
if (parts.length > 0) {
res.condition = condition;
res.rules = parts;
}
return res;
}(data));
},
/**
* Find which operator is used in a MongoDB sub-object
* @param {mixed} value
* @param {string} field
* @return {string|undefined}
*/
determineMongoOperator: function(value, field) {
if (value !== null && typeof value === 'object') {
var subkeys = Object.keys(value);
if (subkeys.length === 1) {
return subkeys[0];
}
else {
if (value.$gte !==undefined && value.$lte !==undefined) {
return 'between';
}
else if (value.$regex !==undefined) { // optional $options
return '$regex';
}
else {
return;
}
}
}
else {
return 'eq';
}
},
/**
* Set rules from MongoDB object
* @param data {object}
*/
setRulesFromMongo: function(data) {
this.setRules(this.getRulesFromMongo(data));
}
});
// UTILITIES
// ===============================
/**
* Change type of a value to int, float or boolean
* @param value {mixed}
* @param type {string}
* @return {mixed}
*/
function changeType(value, type, db) {
switch (type) {
case 'integer': return parseInt(value);
case 'double': return parseFloat(value);
case 'boolean':
var bool = value.trim().toLowerCase() === "true" || value.trim() === '1' || value === 1;
if (db === 'sql') {
return bool ? 1 : 0;
}
else {
return bool;
}
break;
default: return value;
}
=======
========================
/**
* Change type of a value to int or float
* @param value {mixed}
* @param type {string}
* @return {mixed}
*/
function changeType(value, type) {
switch (type) {
case 'integer': return parseInt(value);
case 'double': return parseFloat(value);
default: return value;
}
=======
});
var res = {};
if (parts.length > 0) {
res['$'+data.condition.toLowerCase()] = parts;
}
return res;
}(data));
>>>>>>>
});
var res = {};
if (parts.length > 0) {
res['$'+data.condition.toLowerCase()] = parts;
}
return res;
}(data));
},
/**
* Convert MongoDB object to rules
* @param data {object} query object
* @return {object}
*/
getRulesFromMongo: function(data) {
if (data === undefined || data === null) {
return null;
}
var that = this,
conditions = ['$and','$or'];
return (function parse(data) {
var topKeys = Object.keys(data);
if (topKeys.length > 1) {
$.error('Invalid MongoDB query format.');
}
if (conditions.indexOf(topKeys[0].toLowerCase()) === -1) {
$.error('Unable to build Rule from MongoDB query with '+ topKeys[0] +' condition');
}
var condition = topKeys[0].toLowerCase() === conditions[0] ? 'AND' : 'OR',
rules = data[topKeys[0]],
parts = [];
$.each(rules, function(i, rule) {
var keys = Object.keys(rule);
if (conditions.indexOf(keys[0].toLowerCase()) !== -1) {
parts.push(parse(rule));
}
else {
var field = keys[0],
value = rule[field];
var operator = that.determineMongoOperator(value, field);
if (operator === undefined) {
$.error('Invalid MongoDB query format.');
}
var mdbrl = that.settings.mongoRuleOperators[operator];
if (mdbrl === undefined) {
$.error('JSON Rule operation unknown for operator '+ operator);
}
var opVal = mdbrl.call(that, value);
parts.push({
id: that.change('getMongoDBFieldID', field, value),
field: field,
operator: opVal.op,
value: opVal.val
});
}
});
var res = {};
if (parts.length > 0) {
res.condition = condition;
res.rules = parts;
}
return res;
}(data));
},
/**
* Find which operator is used in a MongoDB sub-object
* @param {mixed} value
* @param {string} field
* @return {string|undefined}
*/
determineMongoOperator: function(value, field) {
if (value !== null && typeof value === 'object') {
var subkeys = Object.keys(value);
if (subkeys.length === 1) {
return subkeys[0];
}
else {
if (value.$gte !==undefined && value.$lte !==undefined) {
return 'between';
}
else if (value.$regex !==undefined) { // optional $options
return '$regex';
}
else {
return;
}
}
}
else {
return 'eq';
}
},
/**
* Set rules from MongoDB object
* @param data {object}
*/
setRulesFromMongo: function(data) {
this.setRules(this.getRulesFromMongo(data)); |
<<<<<<<
=======
twttr.txt.regexen.atSigns = /[@@]/;
twttr.txt.regexen.extractMentions = regexSupplant(/(^|[^a-zA-Z0-9_!#$%&*@@])(#{atSigns})([a-zA-Z0-9_]{1,20})/g);
twttr.txt.regexen.extractReply = regexSupplant(/^(?:#{spaces})*#{atSigns}([a-zA-Z0-9_]{1,20})/);
twttr.txt.regexen.listName = /[a-zA-Z][a-zA-Z0-9_\-\u0080-\u00ff]{0,24}/;
twttr.txt.regexen.extractMentionsOrLists = regexSupplant(/(^|[^a-zA-Z0-9_!#$%&*@@])(#{atSigns})([a-zA-Z0-9_]{1,20})(\/[a-zA-Z][a-zA-Z0-9_\-]{0,24})?/g);
>>>>>>>
<<<<<<<
twttr.txt.regexen.validHashtag = regexSupplant(/(#{hashtagBoundary})(#{hashSigns})(#{hashtagAlphaNumeric}*#{hashtagAlpha}#{hashtagAlphaNumeric}*)/gi);
=======
twttr.txt.regexen.autoLinkHashtags = regexSupplant(/(#{hashtagBoundary})(#|#)(#{hashtagAlphaNumeric}*#{hashtagAlpha}#{hashtagAlphaNumeric}*)/gi);
twttr.txt.regexen.autoLinkUsernamesOrLists = /(^|[^a-zA-Z0-9_!#\$%&*@@]|RT:?)([@@]+)([a-zA-Z0-9_]{1,20})(\/[a-zA-Z][a-zA-Z0-9_\-]{0,24})?/g;
twttr.txt.regexen.autoLinkEmoticon = /(8\-\#|8\-E|\+\-\(|\`\@|\`O|\<\|:~\(|\}:o\{|:\-\[|\>o\<|X\-\/|\[:-\]\-I\-|\/\/\/\/Ö\\\\\\\\|\(\|:\|\/\)|∑:\*\)|\( \| \))/g;
// URL related hash regex collection
twttr.txt.regexen.validPrecedingChars = regexSupplant(/(?:[^-\/"'!=A-Za-z0-9_@@$##\.#{invalid_chars_group}]|^)/);
>>>>>>>
twttr.txt.regexen.validHashtag = regexSupplant(/(#{hashtagBoundary})(#{hashSigns})(#{hashtagAlphaNumeric}*#{hashtagAlpha}#{hashtagAlphaNumeric}*)/gi);
<<<<<<<
options.usernameUrlBase = options.usernameUrlBase || "http://twitter.com/";
options.listUrlBase = options.listUrlBase || "http://twitter.com/";
options.before = options.before || "";
var extraHtml = options.suppressNoFollow ? "" : HTML_ATTR_NO_FOLLOW;
// remap url entities to hash
var urlEntities, i, len;
if(options.urlEntities) {
urlEntities = {};
for(i = 0, len = options.urlEntities.length; i < len; i++) {
urlEntities[options.urlEntities[i].url] = options.urlEntities[i];
}
=======
options.usernameUrlBase = options.usernameUrlBase || "https://twitter.com/";
options.listUrlBase = options.listUrlBase || "https://twitter.com/";
if (!options.suppressNoFollow) {
var extraHtml = HTML_ATTR_NO_FOLLOW;
>>>>>>>
options.usernameUrlBase = options.usernameUrlBase || "https://twitter.com/";
options.listUrlBase = options.listUrlBase || "https://twitter.com/";
options.before = options.before || "";
var extraHtml = options.suppressNoFollow ? "" : HTML_ATTR_NO_FOLLOW;
// remap url entities to hash
var urlEntities, i, len;
if(options.urlEntities) {
urlEntities = {};
for(i = 0, len = options.urlEntities.length; i < len; i++) {
urlEntities[options.urlEntities[i].url] = options.urlEntities[i];
}
<<<<<<<
twttr.txt.htmlAttrForOptions = function(options) {
var htmlAttrs = "";
for (var k in options) {
var v = options[k];
if (OPTIONS_NOT_ATTRIBUTES[k]) continue;
if (BOOLEAN_ATTRIBUTES[k]) {
v = v ? k : null;
}
if (v == null) continue;
htmlAttrs += stringSupplant(" #{k}=\"#{v}\" ", {k: twttr.txt.htmlEscape(k), v: twttr.txt.htmlEscape(v.toString())});
=======
twttr.txt.autoLinkHashtags = function(text, options) {
options = clone(options || {});
options.urlClass = options.urlClass || DEFAULT_URL_CLASS;
options.hashtagClass = options.hashtagClass || DEFAULT_HASHTAG_CLASS;
options.hashtagUrlBase = options.hashtagUrlBase || "https://twitter.com/#!/search?q=%23";
if (!options.suppressNoFollow) {
var extraHtml = HTML_ATTR_NO_FOLLOW;
>>>>>>>
twttr.txt.htmlAttrForOptions = function(options) {
var htmlAttrs = "";
for (var k in options) {
var v = options[k];
if (OPTIONS_NOT_ATTRIBUTES[k]) continue;
if (BOOLEAN_ATTRIBUTES[k]) {
v = v ? k : null;
}
if (v == null) continue;
htmlAttrs += stringSupplant(" #{k}=\"#{v}\" ", {k: twttr.txt.htmlEscape(k), v: twttr.txt.htmlEscape(v.toString())}); |
<<<<<<<
console.log("Uploading outputs")
await helpers.uploadOutputs(taskID, tasks[taskID].vm)
=======
logger.log({
level: 'info',
message: `Revealed solution for task: ${taskID}`
})
>>>>>>>
await helpers.uploadOutputs(taskID, tasks[taskID].vm)
logger.log({
level: 'info',
message: `Revealed solution for task: ${taskID}. Ouputs have been uploaded.`
})
<<<<<<<
console.log("Finalizing task")
await incentiveLayer.finalizeTask(taskID, {from:account, gas:1000000})
=======
await incentiveLayer.finalizeTask(taskID, {from:account, gas:100000})
logger.log({
level: 'info',
message: `Finalized task ${taskID}`
})
>>>>>>>
await incentiveLayer.finalizeTask(taskID, {from:account, gas:1000000})
logger.log({
level: 'info',
message: `Finalized task ${taskID}`
}) |
<<<<<<<
data = toCamelCase(data, ['substitutions', 'customArgs', 'headers', 'sections']);
=======
data = toCamelCase(data, ['substitutions', 'dynamicTemplateData', 'customArgs', 'headers']);
>>>>>>>
data = toCamelCase(data, ['substitutions', 'dynamicTemplateData', 'customArgs', 'headers', 'sections']);
<<<<<<<
return toSnakeCase(json, ['substitutions', 'customArgs', 'headers', 'sections']);
=======
return toSnakeCase(json, ['substitutions', 'dynamicTemplateData', 'customArgs', 'headers']);
>>>>>>>
return toSnakeCase(json, ['substitutions', 'dynamicTemplateData', 'customArgs', 'headers', 'sections']); |
<<<<<<<
const setupAction = (NODE_ENV, action, options = {}) => (cliOptions = {}) => {
if (!process.env.NODE_ENV || process.env.NODE_ENV && process.env.NODE_ENV.trim().length === 0) {
process.env.NODE_ENV = NODE_ENV
log(`Setting NODE_ENV=${NODE_ENV}`)
} else {
log(`Using NODE_ENV=${NODE_ENV}`)
}
=======
const setupAction = (NODE_ENV, actionsToRun, options = {}) => (cliOptions = {}) => {
process.env.NODE_ENV = NODE_ENV
log(`Setting NODE_ENV=${NODE_ENV}`)
>>>>>>>
const setupAction = (NODE_ENV, actionsToRun, options = {}) => (cliOptions = {}) => {
if (!process.env.NODE_ENV || process.env.NODE_ENV && process.env.NODE_ENV.trim().length === 0) {
process.env.NODE_ENV = NODE_ENV
log(`Setting NODE_ENV=${NODE_ENV}`)
} else {
log(`Using NODE_ENV=${NODE_ENV}`)
} |
<<<<<<<
const body = ReactDOM.renderToString(<RouterContext {...renderProps} />);
const { stylesheet, favicon, bundle } = addHash(this.options, compilation.hash);
=======
const body = renderToString(component);
>>>>>>>
const body = renderToString(component);
<<<<<<<
/**
* @param {string} src
* @param {Compilation} compilation
*/
function findAsset(src, compilation) {
const asset = compilation.assets[src];
// Found it. It was a key within assets
if (asset) return asset;
// Didn't find it in assets, it must be a chunk
const webpackStatsJson = compilation.getStats().toJson();
let chunkValue = webpackStatsJson.assetsByChunkName[src];
// Uh oh, couldn't find it as a chunk value either. This indicates a failure
// to find the asset. The caller should handle a falsey value as it sees fit.
if (!chunkValue) return null;
// Webpack outputs an array for each chunk when using sourcemaps
if (chunkValue instanceof Array) {
chunkValue = chunkValue[0]; // Is the main bundle always the first element?
}
return compilation.assets[chunkValue];
}
/**
* Add hash to all options that includes '[hash]' ex: bundle.[hash].js
* NOTE: Only one hash for all files. So even if the css did not change it will get a new hash if the js changed.
*
* @param {Options} options
* @param {string} hash
*/
function addHash(options, hash) {
return Object.keys(options).reduce((previous, current) => {
previous[current] = (options[current] && hash ? options[current].replace('[hash]', hash) : options[current]);
return previous;
}, {});
}
/**
* Given a string location (i.e. path) return a relevant HTML filename.
* Ex: '/' -> 'index.html'
* Ex: '/about' -> 'about.html'
* Ex: '/about/' -> 'about/index.html'
* Ex: '/about/team' -> 'about/team.html'
*
* NOTE: Don't want leading slash
* i.e. 'path/to/file.html' instead of '/path/to/file.html'
*
* NOTE: There is a lone case where the users specifices a not found route that
* results in a '/*' location. In this case we output 404.html, since it's
* assumed that this is a 404 route. See the RR changelong for details:
* https://github.com/rackt/react-router/blob/1.0.x/CHANGES.md#notfound-route
*/
function getAssetKey(location: string): string {
const basename = path.basename(location);
const dirname = path.dirname(location).slice(1); // See NOTE above
let filename;
if (!basename || location.slice(-1) === '/') {
filename = 'index.html';
} else if (basename === '*') {
filename = '404.html';
} else {
filename = basename + '.html';
}
return dirname ? (dirname + path.sep + filename) : filename;
}
/**
* Test if a React Element is a React Router Route or not. Note that this tests
* the actual object (i.e. React Element), not a constructor. As such we
* immediately deconstruct out the type property as that is what we want to
* test.
*
* NOTE: Testing whether Component.type was an instanceof Route did not work.
*
* NOTE: This is a fragile test. The React Router API is notorious for
* introducing breaking changes, so of the RR team changed the manditory path
* and component props this would fail.
*/
function isRoute({ type: component }): boolean {
return component && component.propTypes.path && component.propTypes.component;
}
/**
* Test if a component is a valid React component.
*
* NOTE: This is a pretty wonky test. React.createElement wasn't doing it for
* me. It seemed to be giving false positives.
*
* @param {any} component
* @return {boolean}
*/
function isValidComponent(Component): boolean {
const { type } = React.createElement(Component);
return typeof type === 'object' || typeof type === 'function';
}
/**
* If not provided with any React Router Routes we try to render whatever asset
* was passed to the plugin as a React component. The use case would be anyone
* who doesn't need/want to add RR as a dependency to their app and instead only
* wants a single HTML file output.
*
* NOTE: In the case of a single component we use the static prop 'title' to get
* the page title. If this is not provided then the title will default to
* whatever is provided in the template.
*/
function renderSingleComponent(Component, options, render) { // eslint-disable-line no-shadow
const body = ReactDOM.renderToString(<Component />);
const { stylesheet, favicon, bundle } = options;
const doc = render({
title: Component.title, // See NOTE
body,
stylesheet,
favicon,
bundle,
});
return {
source() { return doc; },
size() { return doc.length; },
};
}
=======
>>>>>>> |
<<<<<<<
{ name: 'background-image-containment', type: t.bgContainment },
=======
{ name: 'background-image-smoothing', type: t.bools },
>>>>>>>
{ name: 'background-image-containment', type: t.bgContainment },
{ name: 'background-image-smoothing', type: t.bools },
<<<<<<<
'background-image-containment': 'inside',
=======
'background-image-smoothing': 'yes',
>>>>>>>
'background-image-containment': 'inside',
'background-image-smoothing': 'yes', |
<<<<<<<
describe("writtenNumber(n, { lang: 'uk', ... })", function() {
before(function() {
writtenNumber.defaults.lang = "uk";
});
it("gets exposed", function() {
should.exist(writtenNumber);
writtenNumber.should.be.instanceof(Function);
});
it("correctly converts numbers < 10", function() {
writtenNumber(0).should.equal("нуль");
writtenNumber(1).should.equal("один");
writtenNumber(2).should.equal("два");
writtenNumber(3).should.equal("три");
writtenNumber(9).should.equal("дев’ять");
});
it("correctly converts numbers < 20", function() {
writtenNumber(11).should.equal("одинадцять");
writtenNumber(13).should.equal("тринадцять");
writtenNumber(19).should.equal("дев’ятнадцять");
});
it("correctly converts numbers < 100", function() {
writtenNumber(20).should.equal("двадцять");
writtenNumber(21).should.equal("двадцять один");
writtenNumber(25).should.equal("двадцять п’ять");
writtenNumber(73).should.equal("сімдесят три");
writtenNumber(80).should.equal("вісімдесят");
writtenNumber(88).should.equal("вісімдесят вісім");
});
it("correctly converts numbers < 1000", function() {
writtenNumber(100).should.equal("сто");
writtenNumber(101).should.equal("сто один");
writtenNumber(110).should.equal("сто десять");
writtenNumber(111).should.equal("сто одинадцять");
writtenNumber(146).should.equal("сто сорок шість");
writtenNumber(200).should.equal("двісті");
writtenNumber(242).should.equal("двісті сорок два");
});
it("correctly converts numbers > 1000", function() {
writtenNumber(1000).should.equal("одна тисяча");
writtenNumber(2000).should.equal("дві тисячі");
writtenNumber(3000).should.equal("три тисячі");
writtenNumber(4000).should.equal("чотири тисячі");
writtenNumber(5000).should.equal("п’ять тисяч");
writtenNumber(1234).should.equal("одна тисяча двісті тридцять чотири");
writtenNumber(4323).should.equal("чотири тисячі триста двадцять три");
writtenNumber(1000000).should.equal("один мільйон");
writtenNumber(2000000).should.equal("два мільйони");
writtenNumber(2000001).should.equal("два мільйони один");
writtenNumber(5000000).should.equal("п’ять мільйонів");
writtenNumber(21000000).should.equal(
"двадцять один мільйон"
);
writtenNumber(111000000).should.equal(
"сто одинадцять мільйонів"
);
writtenNumber(214567891).should.equal(
"двісті чотирнадцять мільйонів п’ятсот шістдесят сім тисяч вісімсот дев’яносто один"
);
});
it("correctly converts numbers > 1 000 000 000", function() {
writtenNumber(1000000000).should.equal("один мільярд");
writtenNumber(2580000000).should.equal(
"два мільярди п’ятсот вісімдесят мільйонів"
);
writtenNumber(1000000000000).should.equal("один трильйон");
writtenNumber(3627000000000).should.equal(
"три трильйони шістсот двадцять сім мільярдів"
);
});
});
=======
describe("writtenNumber(n, { lang: 'ar', ... })", function () {
before(function () {writtenNumber.defaults.lang = "ar";
});
it("gets exposed", function () {
should.exist(writtenNumber);
writtenNumber.should.be.instanceof(Function);
});
it("doesn't blow up weirdly with invalid input", function () {
writtenNumber("asdfasdfasdf").should.equal("");
writtenNumber("0.as").should.equal("");
writtenNumber("0.123").should.equal("صفر");
writtenNumber("0.8").should.equal("واحد");
writtenNumber("2.8").should.equal("ثلاثة");
writtenNumber("asdf.8").should.equal("");
writtenNumber("120391938123..").should.equal("");
writtenNumber("1/3").should.equal("");
writtenNumber(1 / 3).should.equal("صفر");
writtenNumber("1/2").should.equal("");
writtenNumber("1.123/2").should.equal("");
});
it("correctly converts numbers < 10", function () {
writtenNumber(0).should.equal("صفر");
writtenNumber(3).should.equal("ثلاثة");
writtenNumber(6).should.equal("ستة");
});
it("correctly converts numbers < 20", function () {
writtenNumber(11).should.equal("أحد عشر");
writtenNumber(13).should.equal("ثلاثة عشر");
writtenNumber(19).should.equal("تسعة عشر");
});
it("correctly converts numbers < 100", function () {
writtenNumber(20).should.equal("عشرون");
writtenNumber(25).should.equal("خمسة وعشرون");
writtenNumber(40).should.equal("أربعون");
writtenNumber(88).should.equal("ثمانية وثمانون");
writtenNumber(73).should.equal("ثلاثة وسبعون");
writtenNumber(99).should.equal("تسعة وتسعون");
});
it("correctly converts numbers < 10000", function () {
writtenNumber(200).should.equal("مائتان");
writtenNumber(310).should.equal("ثلاثمائة وعشرة");
writtenNumber(242).should.equal("مائتان واثنان وأربعون");
writtenNumber(1234).should.equal("ألف ومائتان وأربعة وثلاثون");
writtenNumber(3000).should.equal("ثلاثة آلاف");
writtenNumber(4323).should.equal("أربعة آلاف وثلاثمائة وثلاثة وعشرون");
});
it("correctly converts numbers > 10000", function() {
writtenNumber(10000).should.equal("عشرة آلاف");
writtenNumber(11000).should.equal("أحد عشر ألف");
writtenNumber(4323000).should.equal("أربعة ملايين وثلاثمائة وثلاثة وعشرون ألف");
writtenNumber(4323055).should.equal("أربعة ملايين وثلاثمائة وثلاثة وعشرون ألف وخمسة وخمسون");
writtenNumber(1570025).should.equal("مليون وخمسمائة وسبعون ألف وخمسة وعشرون");
});
it("correctly converts numbers > 1 000 000 000", function() {
writtenNumber(1000000000).should.equal("مليار");
writtenNumber(2580000000).should.equal("ملياران وخمسمائة وثمانون مليون");
writtenNumber(1000000000000).should.equal("تريليون");
writtenNumber(3627000000000).should.equal("ثلاثة تريليون وستمائة وسبعة وعشرون مليار");
});
});
>>>>>>>
describe("writtenNumber(n, { lang: 'uk', ... })", function () {
before(function () {
writtenNumber.defaults.lang = "uk";
});
it("gets exposed", function () {
should.exist(writtenNumber);
writtenNumber.should.be.instanceof(Function);
});
it("correctly converts numbers < 10", function () {
writtenNumber(0).should.equal("нуль");
writtenNumber(1).should.equal("один");
writtenNumber(2).should.equal("два");
writtenNumber(3).should.equal("три");
writtenNumber(9).should.equal("дев’ять");
});
it("correctly converts numbers < 20", function () {
writtenNumber(11).should.equal("одинадцять");
writtenNumber(13).should.equal("тринадцять");
writtenNumber(19).should.equal("дев’ятнадцять");
});
it("correctly converts numbers < 100", function () {
writtenNumber(20).should.equal("двадцять");
writtenNumber(21).should.equal("двадцять один");
writtenNumber(25).should.equal("двадцять п’ять");
writtenNumber(73).should.equal("сімдесят три");
writtenNumber(80).should.equal("вісімдесят");
writtenNumber(88).should.equal("вісімдесят вісім");
});
it("correctly converts numbers < 1000", function () {
writtenNumber(100).should.equal("сто");
writtenNumber(101).should.equal("сто один");
writtenNumber(110).should.equal("сто десять");
writtenNumber(111).should.equal("сто одинадцять");
writtenNumber(146).should.equal("сто сорок шість");
writtenNumber(200).should.equal("двісті");
writtenNumber(242).should.equal("двісті сорок два");
});
it("correctly converts numbers > 1000", function () {
writtenNumber(1000).should.equal("одна тисяча");
writtenNumber(2000).should.equal("дві тисячі");
writtenNumber(3000).should.equal("три тисячі");
writtenNumber(4000).should.equal("чотири тисячі");
writtenNumber(5000).should.equal("п’ять тисяч");
writtenNumber(1234).should.equal("одна тисяча двісті тридцять чотири");
writtenNumber(4323).should.equal("чотири тисячі триста двадцять три");
writtenNumber(1000000).should.equal("один мільйон");
writtenNumber(2000000).should.equal("два мільйони");
writtenNumber(2000001).should.equal("два мільйони один");
writtenNumber(5000000).should.equal("п’ять мільйонів");
writtenNumber(21000000).should.equal(
"двадцять один мільйон"
);
writtenNumber(111000000).should.equal(
"сто одинадцять мільйонів"
);
writtenNumber(214567891).should.equal(
"двісті чотирнадцять мільйонів п’ятсот шістдесят сім тисяч вісімсот дев’яносто один"
);
});
it("correctly converts numbers > 1 000 000 000", function () {
writtenNumber(1000000000).should.equal("один мільярд");
writtenNumber(2580000000).should.equal(
"два мільярди п’ятсот вісімдесят мільйонів"
);
writtenNumber(1000000000000).should.equal("один трильйон");
writtenNumber(3627000000000).should.equal(
"три трильйони шістсот двадцять сім мільярдів"
);
});
});
describe("writtenNumber(n, { lang: 'ar', ... })", function () {
before(function () {
writtenNumber.defaults.lang = "ar";
});
it("gets exposed", function () {
should.exist(writtenNumber);
writtenNumber.should.be.instanceof(Function);
});
it("doesn't blow up weirdly with invalid input", function () {
writtenNumber("asdfasdfasdf").should.equal("");
writtenNumber("0.as").should.equal("");
writtenNumber("0.123").should.equal("صفر");
writtenNumber("0.8").should.equal("واحد");
writtenNumber("2.8").should.equal("ثلاثة");
writtenNumber("asdf.8").should.equal("");
writtenNumber("120391938123..").should.equal("");
writtenNumber("1/3").should.equal("");
writtenNumber(1 / 3).should.equal("صفر");
writtenNumber("1/2").should.equal("");
writtenNumber("1.123/2").should.equal("");
});
it("correctly converts numbers < 10", function () {
writtenNumber(0).should.equal("صفر");
writtenNumber(3).should.equal("ثلاثة");
writtenNumber(6).should.equal("ستة");
});
it("correctly converts numbers < 20", function () {
writtenNumber(11).should.equal("أحد عشر");
writtenNumber(13).should.equal("ثلاثة عشر");
writtenNumber(19).should.equal("تسعة عشر");
});
it("correctly converts numbers < 100", function () {
writtenNumber(20).should.equal("عشرون");
writtenNumber(25).should.equal("خمسة وعشرون");
writtenNumber(40).should.equal("أربعون");
writtenNumber(88).should.equal("ثمانية وثمانون");
writtenNumber(73).should.equal("ثلاثة وسبعون");
writtenNumber(99).should.equal("تسعة وتسعون");
});
it("correctly converts numbers < 10000", function () {
writtenNumber(200).should.equal("مائتان");
writtenNumber(310).should.equal("ثلاثمائة وعشرة");
writtenNumber(242).should.equal("مائتان واثنان وأربعون");
writtenNumber(1234).should.equal("ألف ومائتان وأربعة وثلاثون");
writtenNumber(3000).should.equal("ثلاثة آلاف");
writtenNumber(4323).should.equal("أربعة آلاف وثلاثمائة وثلاثة وعشرون");
});
it("correctly converts numbers > 10000", function () {
writtenNumber(10000).should.equal("عشرة آلاف");
writtenNumber(11000).should.equal("أحد عشر ألف");
writtenNumber(4323000).should.equal("أربعة ملايين وثلاثمائة وثلاثة وعشرون ألف");
writtenNumber(4323055).should.equal("أربعة ملايين وثلاثمائة وثلاثة وعشرون ألف وخمسة وخمسون");
writtenNumber(1570025).should.equal("مليون وخمسمائة وسبعون ألف وخمسة وعشرون");
});
it("correctly converts numbers > 1 000 000 000", function () {
writtenNumber(1000000000).should.equal("مليار");
writtenNumber(2580000000).should.equal("ملياران وخمسمائة وثمانون مليون");
writtenNumber(1000000000000).should.equal("تريليون");
writtenNumber(3627000000000).should.equal("ثلاثة تريليون وستمائة وسبعة وعشرون مليار");
});
}); |
<<<<<<<
var importFilename = typedExport.convertToOutputFilename(visitor.imports[key]);
return 'import ' + key + ' from \'' + importFilename + '\';';
=======
var importFilename = TypedExport.convertToOutputFilename(visitor.imports[key]);
return "import " + key + " from \"" + importFilename + '";';
>>>>>>>
var importFilename = TypedExport.convertToOutputFilename(visitor.imports[key]);
return 'import ' + key + ' from \'' + importFilename + '\';'; |
<<<<<<<
$(window).focus(() => {
this.chatConversationVw && this.isConvoOpen() &&
this.markConvoAsRead(this.chatConversationVw.model.get('guid'));
});
},
setAggregateUnreadCount: function() {
var unread = 0;
this.chatConversationsCl.forEach((md) => {
if (!this.model.isBlocked(md.id)) {
unread += md.get('unread');
}
});
app.setUnreadChatMessageCount(unread);
=======
//when language is changed, re-render
this.listenTo(options.model, 'change:language', function(){
this.render(true);
});
>>>>>>>
$(window).focus(() => {
this.chatConversationVw && this.isConvoOpen() &&
this.markConvoAsRead(this.chatConversationVw.model.get('guid'));
});
//when language is changed, re-render
this.listenTo(options.model, 'change:language', function(){
this.render(true);
});
},
setAggregateUnreadCount: function() {
var unread = 0;
this.chatConversationsCl.forEach((md) => {
if (!this.model.isBlocked(md.id)) {
unread += md.get('unread');
}
});
app.setUnreadChatMessageCount(unread); |
<<<<<<<
close: function(){
"use strict";
=======
close: function(){
__.each(this.subModels, function(subModel) {
subModel.off();
});
>>>>>>>
close: function(){
"use strict";
__.each(this.subModels, function(subModel) {
subModel.off();
}); |
<<<<<<<
socketView: this.socketView,
chatAppView: this.chatAppView
}));
$('body').addClass("userPage");
=======
socketView: this.socketView
}),"userPage");
>>>>>>>
socketView: this.socketView,
chatAppView: this.chatAppView
}),"userPage"); |
<<<<<<<
AllItems: "Todos los items", // not translated
FreeShipping: "Envío gratuito", // not translated
DomesticShippingPrice: "Precio de envío nacional", // not translated
InternationalShippingPrice: "Precio de envío internacional", // not translated
MinimumIs: "Mínimo", // not translated
Visibility: "Visibilidad", // not translated
Title: "Título", // not translated
DigitalItem: "Ítem digital", // not translated
PhysicalItem: "Ítem físico", // not translated
MinimumPrice: "Un mí,nimo es necesario para cubrir los costos de la transacción Bitcoin", //notTranslated
DomesticShippingTime: "Tiempo de envío nacional", // not translated
InternationalShippingTime: "Tiempo de envío internacional", // not translated
DisplayNSFWcontent: "Mostrar contenido no apto para el trabajo?", // not translated
Basic: "Básico", // not translated
Content: "Contenido", // not translated
StandardThemes: "Template estándar", // not translated
NoPhotosAdded: "No hay fotos", // not translated
Summary: "Resumen", // not translated
Funds: "Fondos", // not translated
Discussion: "Debate", // not translated
Quantity: "Cantidad", //not translated
ShippingTo: "Enviar a", //not translated
ModeratedBy: "Moderado por", //not translated
Submit: "Enviar", //not translated
maxLength20: "máximo 20 caracteres", //not translated
maxLength80: "máximo 80 caracteres", //not translated
maxLength200: "máximo 200 caracteres", //not translated
StoreModeratorsOptional: "Moderadores de la Tienda (Opcional)", // not translated
Searchformoderators: "Buscar moderadores", // not translated
Contributors: "Colaboradores", // not translated
Support: "Soporte", // not translated
Licensing: "Licencia", // not translated
On: "Activado", // not translated
Off: "Desactivado", // not translated
ClickToChange: "Click para cambiar", // not translated
NotProvided: "no proporcionado", // not translated
NotFollowingAnyone: "No sigue a nadie", // not translated
NoFollowers: "Sin seguidores", // not translated
NoReviews: "Sin reseñas", //notTranslated
Moderator: "Moderador", // not translated
=======
AllItems: "All Items", // not translated
FreeShipping: "Free Shipping", // not translated
DomesticShippingPrice: "Domestic Shipping Price", // not translated
InternationalShippingPrice: "International Shipping Price", // not translated
MinimumIs: "Minimum is", // not translated
Title: "Title", // not translated
DigitalItem: "Digital Item", // not translated
PhysicalItem: "Physical Item", // not translated
MinimumPrice: "A minimum is necessary to ensure Bitcoin transaction costs are covered", //notTranslated
DomesticShippingTime: "Domestic Shipping Time", // not translated
InternationalShippingTime: "International Shipping Time", // not translated
DisplayNSFWcontent: "Display NSFW content?", // not translated
Basic: "Basic", // not translated
Content: "Content", // not translated
StandardThemes: "Standard themes", // not translated
NoPhotosAdded: "No Photos Added", // not translated
Summary: "Summary", // not translated
Funds: "Funds", // not translated
Discussion: "Discussion", // not translated
Quantity: "Quantity", //not translated
ShippingTo: "Shipping To", //not translated
ModeratedBy: "Moderated by", //not translated
Submit: "Submit", //not translated
maxLength20: "max length 20 char", //not translated
maxLength80: "max length 80 char", //not translated
maxLength200: "max length 200 char", //not translated
StoreModeratorsOptional: "Store Moderators (Optional)", // not translated
Searchformoderators: "Search for moderators", // not translated
Contributors: "Contributors", // not translated
Support: "Support", // not translated
Licensing: "Licensing", // not translated
On: "On", // not translated
Off: "Off", // not translated
ClickToChange: "Click to change", // not translated
NotProvided: "not provided", // not translated
NotFollowingAnyone: "Not following anyone", // not translated
NoFollowers: "No followers", // not translated
NoReviews: "No reviews", //notTranslated
Moderator: "Moderator", // not translated
ActiveStore:"Store is Active", // not translated
ActiveStoreDetails: "Inactive stores and listings are not visible to other people", //not translated
>>>>>>>
AllItems: "Todos los items", // not translated
FreeShipping: "Envío gratuito", // not translated
DomesticShippingPrice: "Precio de envío nacional", // not translated
InternationalShippingPrice: "Precio de envío internacional", // not translated
MinimumIs: "Mínimo", // not translated
Visibility: "Visibilidad", // not translated
Title: "Título", // not translated
DigitalItem: "Ítem digital", // not translated
PhysicalItem: "Ítem físico", // not translated
MinimumPrice: "Un mí,nimo es necesario para cubrir los costos de la transacción Bitcoin", //notTranslated
DomesticShippingTime: "Tiempo de envío nacional", // not translated
InternationalShippingTime: "Tiempo de envío internacional", // not translated
DisplayNSFWcontent: "Mostrar contenido no apto para el trabajo?", // not translated
Basic: "Básico", // not translated
Content: "Contenido", // not translated
ActiveStore:"Store is Active", // not translated
ActiveStoreDetails: "Inactive stores and listings are not visible to other people", //not translated
<<<<<<<
ServerSettings: "Configuración del servidor", // not translated duplicated?
ShutDownServer: "Apagar servidor", // not translated
LoadingBitcoinPrices: "Cargando precios de Bitcoin...", // not translated
ThisUserIsBlocked: "Éste usuario está ocultdo porque lo tienes bloqueado", // not translated
ThisUserIsNSFW: "Éste usuario está ocultdo porque su página está marcada como no apta para el trabajo", // not translated
=======
ShutDownServer: "Shut Down the Server", // not translated
LoadingBitcoinPrices: "Loading Bitcoin Prices...", // not translated
ThisUserIsBlocked: "This user is hidden because they are on your blocked list", // not translated
ThisUserIsNSFW: "This user is hidden because their page is listed as NSFW", // not translated
>>>>>>>
ServerSettings: "Configuración del servidor", // not translated duplicated? |
<<<<<<<
baseModal.prototype.render.apply(self);
self.setState(self.tabState);
=======
// add blur to container
$('#obContainer').addClass('modalOpen').scrollTop(0);
self.delegateEvents(); //reapply events if this is a second render
self.$el.parent().fadeIn(300);
>>>>>>>
baseModal.prototype.render.apply(self);
<<<<<<<
this.$('#transactionDiscussionSendText').addClass("invalid");
app.simpleMessageModal.open({
title: window.polyglot.t('errorMessages.saveError'),
message: window.polyglot.t('errorMessages.missingError')
});
=======
this.discussionForm.addClass("formChecked");
messageModal.show(window.polyglot.t('errorMessages.saveError'), window.polyglot.t('errorMessages.missingError'));
>>>>>>>
this.discussionForm.addClass("formChecked");
app.simpleMessageModal.open({
title: window.polyglot.t('errorMessages.saveError'),
message: window.polyglot.t('errorMessages.missingError')
}); |
<<<<<<<
Signature: "PGP-signatur",
=======
Signature: "PGP Signature", //not translated
SignaturePlaceholder: "A PGP Signature is required if you enter a PGP Key", //not translated
>>>>>>>
Signature: "PGP-signatur",
SignaturePlaceholder: "A PGP Signature is required if you enter a PGP Key", //not translated
<<<<<<<
HandleResolver: "Håndtering af brugernavn", // This is related to the Handle phrase. A Handle is a unique name that starts with @ that users can register with OneName. For example, "@joshob1". If a user wants to use a different web service to resolve Handles, they can put in the URL of a Handle Resolver in this field.
ServerSettings: "Serverindstillinger",
=======
HandleResolver: "Handle Resolver", // ?
>>>>>>>
HandleResolver: "Håndtering af brugernavn", // This is related to the Handle phrase. A Handle is a unique name that starts with @ that users can register with OneName. For example, "@joshob1". If a user wants to use a different web service to resolve Handles, they can put in the URL of a Handle Resolver in this field.
ServerSettings: "Serverindstillinger", |
<<<<<<<
$ = require('jquery');
Backbone.$ = $;
var loadTemplate = require('../utils/loadTemplate'),
app = require('../App.js').getApp(),
pageVw = require('./pageVw'),
=======
loadTemplate = require('../utils/loadTemplate'),
baseVw = require('./baseVw'),
>>>>>>>
loadTemplate = require('../utils/loadTemplate'),
app = require('../App.js').getApp(),
pageVw = require('./pageVw'),
<<<<<<<
loadTemplate('./js/templates/home.html', function(loadedTemplate) {
self.$el.html(loadedTemplate());
self.setState(self.state, self.searchItemsText);
if (self.model.get('page').profile.vendor == true) {
self.$el.find('.js-homeCreateStore').addClass('hide');
self.$el.find('.js-homeMyPage').addClass('show');
self.$el.find('.js-homeCreateListing').addClass('show');
} else {
self.$el.find('.js-homeCreateStore').addClass('show');
self.$el.find('.js-homeCreateListing').addClass('hide');
}
=======
$('#content').html(this.$el);
>>>>>>>
$('#content').html(this.$el); |
<<<<<<<
remove: function() {
=======
changeAppBarStyle: function(e) {
app.appBar.setStyle($(e.target).val());
},
close: function(){
__.each(this.subModels, function(subModel) {
subModel.off();
});
__.each(this.subViews, function(subView) {
if (subView.close){
subView.close();
} else {
subView.unbind();
subView.remove();
}
});
>>>>>>>
changeAppBarStyle: function(e) {
app.appBar.setStyle($(e.target).val());
},
remove: function() { |
<<<<<<<
=======
Blocked: "Blocked", // not translated
Advanced: "Advanced", // not translated
General: "General", // not translated
>>>>>>>
Blocked: "Blocked", // not translated
Advanced: "Advanced", // not translated
General: "General", // not translated
<<<<<<<
=======
Blocked: "Blocked", // not translated
Advanced: "Advanced", // not translated
General: "General", // not translated
>>>>>>>
Blocked: "Blocked", // not translated
Advanced: "Advanced", // not translated
General: "General", // not translated
<<<<<<<
Loading: "Loading...", // not translated
Purchases:"Acquisti",
Sales: "Sales", // not translated
Cases: "Cases", // not translated
Discover: "Discover", // not translated
AllItems: "All Items", // not translated
DomesticShippingPrice: "Domestic Shipping Price", // not translated
InternationalShippingPrice: "International Shipping Price", // not translated
MinimumIs: "Minimum is", // not translated
Visibility: "Visibility", // not translated
Title: "Title", // not translated
DigitalItem: "Digital Item", // not translated
PhysicalItem: "Physical Item", // not translated
DomesticShippingTime: "Domestic Shipping Time", // not translated
InternationalShippingTime: "International Shipping Time", // not translated
DisplayNSFWcontent: "Display NSFW content?", // not translated
Content: "Content", // not translated
StandardThemes: "Standard themes", // not translated
NoPhotosAdded: "No Photos Added", // not translated
Summary: "Summary", // not translated
Funds: "Funds", // not translated
Discussion: "Discussion", // not translated
=======
Loading: "Caricamento...",
Purchases: "Acquisti",
Sales: "Vendite",
Cases: "Cause",
Discover: "Trova",
Blocked: "Bloccato",
Advanced: "Avanzato",
General: "Generale",
AllItems: "Tutti gli articoli",
DomesticShippingPrice: "Prezzo per invio nazionale",
InternationalShippingPrice: "Prezzo per invio internazionale",
MinimumIs: "Il minimo é",
Visibility: "Visibilità",
Title: "Titolo",
DigitalItem: "Articolo digitale",
PhysicalItem: "Articolo fisico",
DomesticShippingTime: "Tempo di invio nazionale",
InternationalShippingTime: "Tempo di invio internazionale",
DisplayNSFWcontent: "Mostrare contenuto NSFW?",
Basic: "Base",
Content: "Contenuto",
StandardThemes: "Temi standard",
NoPhotosAdded: "Nessuna foto aggiunta",
>>>>>>>
Loading: "Caricamento...",
Purchases: "Acquisti",
Sales: "Vendite",
Cases: "Cause",
Discover: "Trova",
Blocked: "Bloccato",
Advanced: "Avanzato",
General: "Generale",
AllItems: "Tutti gli articoli",
DomesticShippingPrice: "Prezzo per invio nazionale",
InternationalShippingPrice: "Prezzo per invio internazionale",
MinimumIs: "Il minimo é",
Visibility: "Visibilità",
Title: "Titolo",
DigitalItem: "Articolo digitale",
PhysicalItem: "Articolo fisico",
DomesticShippingTime: "Tempo di invio nazionale",
InternationalShippingTime: "Tempo di invio internazionale",
DisplayNSFWcontent: "Mostrare contenuto NSFW?",
Basic: "Base",
Content: "Contenuto",
StandardThemes: "Temi standard",
NoPhotosAdded: "Nessuna foto aggiunta",
Summary: "Summary", // not translated
Funds: "Funds", // not translated
Discussion: "Discussion", // not translated
<<<<<<<
=======
Blocked: "Bloqué",
Advanced: "Avancé",
General: "Général",
>>>>>>>
Blocked: "Bloqué",
Advanced: "Avancé",
General: "Général",
<<<<<<<
=======
Blocked: "Blocked", // not translated
Advanced: "Advanced", // not translated
General: "General", // not translated
>>>>>>>
Blocked: "Blocked", // not translated
Advanced: "Advanced", // not translated
General: "General", // not translated
<<<<<<<
=======
Blocked: "Blocked", // not translated
Advanced: "Advanced", // not translated
General: "General", // not translated
>>>>>>>
Blocked: "Blocked", // not translated
Advanced: "Advanced", // not translated
General: "General", // not translated
<<<<<<<
=======
Page: "Page", //not translated
>>>>>>>
Page: "Page", //not translated
<<<<<<<
=======
Blocked: "Blocked", // not translated
Advanced: "Advanced", // not translated
General: "General", // not translated
>>>>>>>
Blocked: "Blocked", // not translated
Advanced: "Advanced", // not translated
General: "General", // not translated
<<<<<<<
=======
Blocked: "Blocked", // not translated
Advanced: "Advanced", // not translated
General: "General", // not translated
>>>>>>>
Blocked: "Blocked", // not translated
Advanced: "Advanced", // not translated
General: "General", // not translated
<<<<<<<
=======
Blocked: "Blocked", // not translated
Advanced: "Advanced", // not translated
General: "General", // not translated
>>>>>>>
Blocked: "Blocked", // not translated
Advanced: "Advanced", // not translated
General: "General", // not translated
<<<<<<<
=======
Blocked: "Blocked", // not translated
Advanced: "Advanced", // not translated
General: "General", // not translated
>>>>>>>
Blocked: "Blocked", // not translated
Advanced: "Advanced", // not translated
General: "General", // not translated |
<<<<<<<
Shipping: "Forsendelse:",
CountryOfOrigin: "Oprindelsesland:",
CanBeShippedTo: "Kan sendes til dig i:",
=======
Shipping: "Forsendelse",
ShippingReturns: "Shipping & Returns", //not translated
CountryOfOrigin: "Country of Origin:", //not translated
CanBeShippedTo: "Can Ship to You In:", //not translated
>>>>>>>
Shipping: "Forsendelse:",
CountryOfOrigin: "Oprindelsesland:",
CanBeShippedTo: "Kan sendes til dig i:",
Shipping: "Forsendelse",
ShippingReturns: "Shipping & Returns", //not translated
CountryOfOrigin: "Oprindelsesland:",
CanBeShippedTo: "Kan sendes til dig i:", |
<<<<<<<
Summary: "Summary", // not translated
Funds: "Funds", // not translated
Discussion: "Discussion", // not translated
Quantity: "Quantity", //not translated
ShippingTo: "Shipping To", //not translated
ModeratedBy: "Moderated by", //not translated
Submit: "Submit", //not translated
maxLength20: "max length 20 char", //not translated
maxLength80: "max length 80 char", //not translated
maxLength200: "max length 200 char", //not translated
StoreModeratorsOptional: "Store Moderators (Optional)", // not translated
Searchformoderators: "Search for moderators", // not translated
Contributors: "Contributors", // not translated
Support: "Support", // not translated
Licensing: "Licensing", // not translated
On: "On", // not translated
Off: "Off", // not translated
ClickToChange: "Click to change", // not translated
NotProvided: "not provided", // not translated
NotFollowingAnyone: "Not following anyone", // not translated
NoFollowers: "No followers", // not translated
NoReviews: "No reviews", //notTranslated
Moderator: "Moderator", // not translated
Firewall: "Firewall", //notTranslated
ServerSettings: "Server Settings", //notTranslated
ReadOnly: "(This Field is Read Only)", //notTranslated
HandleResolver: "Handle Resolver", // not translated
ServerSettings: "Server Settings", // not translated
ShutDownServer: "Shut Down the Server", // not translated
LoadingBitcoinPrices: "Loading Bitcoin Prices...", // not translated
ThisUserIsBlocked: "This user is hidden because they are on your blocked list", // not translated
ThisUserIsNSFW: "This user is hidden because their page is listed as NSFW", // not translated
ShowBlockedUser: "Show this user's page except for NSFW listings", // not translated
ShowNSFWContent: "Show this user's page, and all NSFW listings", // not translated
ServerChangeWarningHeadline: "Caution: Record Your Settings", // not translated
ServerChangeWarning: "We recommend you make a copy of your previous settings, shown below. Your previous username and password will no longer be available beyond this point.", // not translated
moderatorSettings: { // not translated
DisputeResolution: "Dispute Resolution", //notTranslated
ServiceFee: "Service fee", // not translated
ServiceFeeNote: "Min: 0%, Max: 25%"//notTranslated
=======
Summary: "Sommario",
Funds: "Fondi",
Discussion: "Discussione",
Quantity: "Quantità",
ShippingTo: "Spedire a",
ModeratedBy: "Moderato da",
Submit: "Invio",
maxLength20: "lunghezza massima 20 caratteri",
maxLength80: "lunghezza massima 80 caratteri",
maxLength200: "lunghezza massima 200 caratteri",
StoreModeratorsOptional: "Moderatori negozio (Opzionale)",
Searchformoderators: "Ricerca per moderatori",
Contributors: "Contributori",
Support: "Supporto",
Licensing: "Licenze",
On: "On",
Off: "Off",
ClickToChange: "Clicca per cambiare",
NotProvided: "non fornito",
NotFollowingAnyone: "Non segui nessuno",
NoFollowers: "Nessun seguace",
Moderator: "Moderatore",
Firewall: "Firewall",
ServerSettings: "Impostazioni Server",
ReadOnly: "(Questo campo è di sola lettura)",
HandleResolver: "Recupero Nickname",
ServerSettings: "Impostazioni Server",
ShutDownServer: "Spegni il server",
LoadingBitcoinPrices: "Caricamento Prezzi Bitcoin...",
ThisUserIsBlocked: "Questo utente è nascosto perchè si trova nella tua lista bloccati",
ThisUserIsNSFW: "Questo utente è nascosto perchè la sua pagina è indicata come NSFW",
ShowBlockedUser: "Mostra la pagina di questo utente eccetto per il contenuto NSFW",
ShowNSFWContent: "Mostra la pagina di questo utente, e tutto il listino NSFW",
ServerChangeWarningHeadline: "Attenzione: registra le tue impostazioni",
ServerChangeWarning: "Ti raccomandiamo di fare una copia dei delle tue precedenti impostazioni, mostrate sotto. I tuoi precedenti nomeutente e password non saranno più disponibili dopo questo punto.",
moderatorSettings: {
DisputeResolution: "Risoluzione disputa",
ServiceFee: "Commissione servizio",
ServiceFeeNote: "Min: 0%, Max: 25%"
>>>>>>>
Summary: "Sommario",
Funds: "Fondi",
Discussion: "Discussione",
Quantity: "Quantità",
ShippingTo: "Spedire a",
ModeratedBy: "Moderato da",
Submit: "Invio",
maxLength20: "lunghezza massima 20 caratteri",
maxLength80: "lunghezza massima 80 caratteri",
maxLength200: "lunghezza massima 200 caratteri",
StoreModeratorsOptional: "Moderatori negozio (Opzionale)",
Searchformoderators: "Ricerca per moderatori",
Contributors: "Contributori",
Support: "Supporto",
Licensing: "Licenze",
On: "On",
Off: "Off",
ClickToChange: "Clicca per cambiare",
NotProvided: "non fornito",
NotFollowingAnyone: "Non segui nessuno",
NoFollowers: "Nessun seguace",
NoReviews: "No reviews", //notTranslated
Moderator: "Moderatore",
Firewall: "Firewall",
ServerSettings: "Impostazioni Server",
ReadOnly: "(Questo campo è di sola lettura)",
HandleResolver: "Recupero Nickname",
ServerSettings: "Impostazioni Server",
ShutDownServer: "Spegni il server",
LoadingBitcoinPrices: "Caricamento Prezzi Bitcoin...",
ThisUserIsBlocked: "Questo utente è nascosto perchè si trova nella tua lista bloccati",
ThisUserIsNSFW: "Questo utente è nascosto perchè la sua pagina è indicata come NSFW",
ShowBlockedUser: "Mostra la pagina di questo utente eccetto per il contenuto NSFW",
ShowNSFWContent: "Mostra la pagina di questo utente, e tutto il listino NSFW",
ServerChangeWarningHeadline: "Attenzione: registra le tue impostazioni",
ServerChangeWarning: "Ti raccomandiamo di fare una copia dei delle tue precedenti impostazioni, mostrate sotto. I tuoi precedenti nomeutente e password non saranno più disponibili dopo questo punto.",
moderatorSettings: {
DisputeResolution: "Risoluzione disputa",
ServiceFee: "Commissione servizio",
ServiceFeeNote: "Min: 0%, Max: 25%" |
<<<<<<<
Shipping: "Доставка:",
CountryOfOrigin: "Страна происхождения:",
CanBeShippedTo: "Возможна отправка в:",
=======
Shipping: "Доставка",
ShippingReturns: "Shipping & Returns", //not translated
CountryOfOrigin: "Country of Origin:", //not translated
CanBeShippedTo: "Can Ship to You In:", //not translated
>>>>>>>
Shipping: "Доставка",
ShippingReturns: "Shipping & Returns", //not translated
CountryOfOrigin: "Страна происхождения:",
CanBeShippedTo: "Возможна отправка в:", |
<<<<<<<
'GET /board': 'BoardController.home',
'GET /stickers': 'MerchController.stickers',
'POST /stickers/order': 'MerchController.order_stickers',
'GET /stickers/check_code/:code': 'MerchController.check_code',
=======
>>>>>>>
'GET /stickers': 'MerchController.stickers',
'POST /stickers/order': 'MerchController.order_stickers',
'GET /stickers/check_code/:code': 'MerchController.check_code', |
<<<<<<<
textArea.value = prettier.format(textArea.value, {
=======
const formattedText = window.prettier.format(textArea.value, {
>>>>>>>
const formattedText = prettier.format(textArea.value, { |
<<<<<<<
var express = require('express')
var fs = require('fs')
var Error = require('http-errors')
var compression = require('compression')
var Auth = require('./auth')
var Logger = require('./logger')
var Config = require('./config')
var Middleware = require('./middleware')
var Cats = require('./status-cats')
var Storage = require('./storage')
var PackageProvider = require('./packages')
=======
var express = require('express')
var Error = require('http-errors')
var compression = require('compression')
var Auth = require('./auth')
var Logger = require('./logger')
var Config = require('./config')
var Middleware = require('./middleware')
var Cats = require('./status-cats')
var Storage = require('./storage')
>>>>>>>
var express = require('express')
var Error = require('http-errors')
var compression = require('compression')
var Auth = require('./auth')
var Logger = require('./logger')
var Config = require('./config')
var Middleware = require('./middleware')
var Cats = require('./status-cats')
var Storage = require('./storage')
var PackageProvider = require('./packages')
<<<<<<<
var config = Config(config_hash)
var storage = Storage(config)
var auth = Auth(config)
var packages = PackageProvider(config)
var app = express()
var can = Middleware.allow(config, packages)
=======
var config = Config(config_hash)
var storage = Storage(config)
var auth = Auth(config)
var app = express()
>>>>>>>
var config = Config(config_hash)
var storage = Storage(config)
var auth = Auth(config)
var packages = PackageProvider(config)
var app = express() |
<<<<<<<
'vendor/npm/jquery-ui/jquery-ui.js': {
format: 'amd',
deps: ['jquery'],
},
'vendor/npm/gridstack/dist/gridstack.js': {
format: 'global',
deps: ['jquery', 'jquery-ui', 'lodash'],
},
"vendor/npm/gridstack/dist/gridstack.jQueryUI.js": {
format: 'global',
deps: ['gridstack'],
},
'vendor/npm/virtual-scroll/src/indx.js': {
format: 'cjs',
exports: 'VirtualScroll',
},
=======
>>>>>>>
'vendor/npm/jquery-ui/jquery-ui.js': {
format: 'amd',
deps: ['jquery'],
},
'vendor/npm/gridstack/dist/gridstack.js': {
format: 'global',
deps: ['jquery', 'jquery-ui', 'lodash'],
},
"vendor/npm/gridstack/dist/gridstack.jQueryUI.js": {
format: 'global',
deps: ['gridstack'],
}, |
<<<<<<<
function convertTargetToQuery(target) {
if (!target.metric || target.hide) {
=======
function convertTargetToQuery(target, interval) {
if (!target.metric) {
>>>>>>>
function convertTargetToQuery(target, interval) {
if (!target.metric || target.hide) { |
<<<<<<<
'./dashgrid/dashgrid',
=======
'./acl/acl',
'./folder_picker/picker',
'./folder_modal/folder'
>>>>>>>
'./dashgrid/dashgrid',
'./acl/acl',
'./folder_picker/picker',
'./folder_modal/folder' |
<<<<<<<
'specs/influxSeries-specs',
'specs/overview-ctrl-specs',
=======
'specs/dashboardViewStateSrv-specs',
'specs/influxSeries-specs'
>>>>>>>
'specs/influxSeries-specs',
'specs/dashboardViewStateSrv-specs',
'specs/overview-ctrl-specs', |
<<<<<<<
if (scope.openConfigureModal) {
scope.openConfigureModal();
scope.$apply();
return;
}
=======
// Create a temp scope so we can discard changes to it if needed
var tmpScope = scope.$new();
tmpScope.panel = angular.copy(scope.panel);
tmpScope.editSave = function(panel) {
// Correctly set the top level properties of the panel object
_.each(panel,function(v,k) {
scope.panel[k] = panel[k];
});
};
>>>>>>>
if (scope.openConfigureModal) {
scope.openConfigureModal();
scope.$apply();
return;
}
// Create a temp scope so we can discard changes to it if needed
var tmpScope = scope.$new();
tmpScope.panel = angular.copy(scope.panel);
tmpScope.editSave = function(panel) {
// Correctly set the top level properties of the panel object
_.each(panel,function(v,k) {
scope.panel[k] = panel[k];
});
}; |
<<<<<<<
'./inspectCtrl',
=======
'./opentsdbTargetCtrl',
>>>>>>>
'./inspectCtrl',
'./opentsdbTargetCtrl', |
<<<<<<<
addGridThresholds(options, panel);
=======
addTimeAxis(options);
thresholdManager.addPlotOptions(options, panel);
>>>>>>>
thresholdManager.addPlotOptions(options, panel);
<<<<<<<
function addXSeriesAxis(options) {
var ticks = _.map(data, function(series, index) {
return [index + 1, series.alias];
});
options.xaxis = {
timezone: dashboard.getTimezone(),
show: panel.xaxis.show,
mode: null,
min: 0,
max: ticks.length + 1,
label: "Datetime",
ticks: ticks
};
}
function addXTableAxis(options) {
var ticks = _.map(data, function(series, seriesIndex) {
return _.map(series.datapoints, function(point, pointIndex) {
var tickIndex = seriesIndex * series.datapoints.length + pointIndex;
return [tickIndex + 1, point[1]];
});
});
ticks = _.flatten(ticks, true);
options.xaxis = {
timezone: dashboard.getTimezone(),
show: panel.xaxis.show,
mode: null,
min: 0,
max: ticks.length + 1,
label: "Datetime",
ticks: ticks
};
}
function addGridThresholds(options, panel) {
if (_.isNumber(panel.grid.threshold1)) {
var limit1 = panel.grid.thresholdLine ? panel.grid.threshold1 : (panel.grid.threshold2 || null);
options.grid.markings.push({
yaxis: { from: panel.grid.threshold1, to: limit1 },
color: panel.grid.threshold1Color
});
if (_.isNumber(panel.grid.threshold2)) {
var limit2;
if (panel.grid.thresholdLine) {
limit2 = panel.grid.threshold2;
} else {
limit2 = panel.grid.threshold1 > panel.grid.threshold2 ? -Infinity : +Infinity;
}
options.grid.markings.push({
yaxis: { from: panel.grid.threshold2, to: limit2 },
color: panel.grid.threshold2Color
});
}
}
}
=======
>>>>>>>
function addXSeriesAxis(options) {
var ticks = _.map(data, function(series, index) {
return [index + 1, series.alias];
});
options.xaxis = {
timezone: dashboard.getTimezone(),
show: panel.xaxis.show,
mode: null,
min: 0,
max: ticks.length + 1,
label: "Datetime",
ticks: ticks
};
}
function addXTableAxis(options) {
var ticks = _.map(data, function(series, seriesIndex) {
return _.map(series.datapoints, function(point, pointIndex) {
var tickIndex = seriesIndex * series.datapoints.length + pointIndex;
return [tickIndex + 1, point[1]];
});
});
ticks = _.flatten(ticks, true);
options.xaxis = {
timezone: dashboard.getTimezone(),
show: panel.xaxis.show,
mode: null,
min: 0,
max: ticks.length + 1,
label: "Datetime",
ticks: ticks
};
} |
<<<<<<<
var template = "select [[group]][[group_comma]] [[func]]([[column]]) as [[column]]_[[func]] from [[series]] " +
=======
var template = "select [[func]](\"[[column]]\") as \"[[column]]_[[func]]\" from \"[[series]]\" " +
>>>>>>>
var template = "select [[group]][[group_comma]] [[func]](\"[[column]]\") as \"[[column]]_[[func]]\" from \"[[series]]\" " +
<<<<<<<
if (target.column.indexOf('-') !== -1 || target.column.indexOf('.') !== -1) {
template = "select [[group]][[group_comma]] [[func]](\"[[column]]\") as \"[[column]]_[[func]]\" from [[series]] " +
"where [[timeFilter]] [[condition_add]] [[condition_key]] [[condition_op]] [[condition_value]] " +
"group by time([[interval]])[[group_comma]] [[group]] order asc";
}
=======
>>>>>>>
<<<<<<<
return this.doInfluxRequest(query, target.alias).then(handleInfluxQueryResponse(additionalGroups));
=======
return this.doInfluxRequest(query, alias).then(handleInfluxQueryResponse);
>>>>>>>
return this.doInfluxRequest(query, alias).then(handleInfluxQueryResponse(additionalGroups));
<<<<<<<
_.each(series.columns, function(column, index) {
if (column === "time" || column === "sequence_number" || _.contains(additionalGroup, column)) {
return;
}
=======
var target = data.alias || series.name + "." + column;
var datapoints = [];
var value;
for(var i = 0; i < series.points.length; i++) {
value = isNaN(series.points[i][index]) ? null : series.points[i][index];
datapoints[i] = [value, series.points[i][timeCol]];
}
>>>>>>>
_.each(series.columns, function(column, index) {
if (column === "time" || column === "sequence_number" || _.contains(additionalGroup, column)) {
return;
} |
<<<<<<<
$scope.setVariableValue = function(param, option) {
templateValuesSrv.setVariableValue(param, option).then(function() {
dynamicDashboardSrv.update($scope.dashboard);
$rootScope.$broadcast('refresh');
});
=======
$scope.variableUpdated = function(variable) {
templateValuesSrv.variableUpdated(variable).then(function() {
$rootScope.$broadcast('refresh');
});
>>>>>>>
$scope.variableUpdated = function(variable) {
templateValuesSrv.variableUpdated(variable).then(function() {
dynamicDashboardSrv.update($scope.dashboard);
$rootScope.$broadcast('refresh');
}); |
<<<<<<<
this.dashboard.setViewMode(ctrl.panel, false, false);
=======
>>>>>>>
this.dashboard.setViewMode(ctrl.panel, false, false);
<<<<<<<
=======
$(window).scrollTop(0);
>>>>>>> |
<<<<<<<
var supportedLanguages = ["en", "nl", "da", "cn", "zhtw", "fa", "tr", "cz"];
=======
var supportedLanguages = ["en", "nl", "da", "cn", "zhtw", "fa", "tr", "ru"];
>>>>>>>
var supportedLanguages = ["en", "nl", "da", "cn", "zhtw", "fa", "tr", "ru", "cz"];
<<<<<<<
tr : "Türkçe",
cz : "Česky"
=======
tr : "Türkçe",
ru : "Русский"
>>>>>>>
tr : "Türkçe",
cz : "Česky"
ru : "Русский" |
<<<<<<<
Native["javax/microedition/io/file/FileSystemRegistry.getRoots.()[Ljava/lang/String;"] = function() {
var arrayAddr = J2ME.newStringArray(MIDP.fsRoots.length);
var array = J2ME.getArrayFromAddr(arrayAddr);
=======
Native["javax/microedition/io/file/FileSystemRegistry.getRoots.()[Ljava/lang/String;"] = function(addr) {
var array = J2ME.newStringArray(MIDP.fsRoots.length);
>>>>>>>
Native["javax/microedition/io/file/FileSystemRegistry.getRoots.()[Ljava/lang/String;"] = function(addr) {
var arrayAddr = J2ME.newStringArray(MIDP.fsRoots.length);
var array = J2ME.getArrayFromAddr(arrayAddr); |
<<<<<<<
load("polyfill/promise.js", "libs/encoding.js", "bld/native.js", "bld/j2me.js",
"libs/zipfile.js",
"blackBox.js",
"util.js",
"libs/jarstore.js",
"libs/long.js",
"native.js",
"midp/content.js",
"midp/midp.js",
"midp/frameanimator.js",
"midp/fs.js",
"midp/crypto.js",
"midp/text_editor.js",
"midp/device_control.js",
"midp/crypto.js",
"libs/forge/util.js",
"libs/forge/md5.js",
"libs/jsbn/jsbn.js",
"libs/jsbn/jsbn2.js"
// "bld/classes.jar.js"
);
=======
load("polyfill/promise.js", "libs/encoding.js", "libs/relooper.js", "bld/native.js", "bld/j2me.js");
>>>>>>>
load("polyfill/promise.js", "libs/encoding.js", "bld/native.js", "bld/j2me.js"); |
<<<<<<<
this.numCalled = 100;
this.compiled = null;
this.dontCompile = false;
=======
this.consumes = Signature.getINSlots(this.signature);
if (!this.isStatic) {
this.consumes++;
}
>>>>>>>
this.consumes = Signature.getINSlots(this.signature);
if (!this.isStatic) {
this.consumes++;
}
this.numCalled = 100;
this.compiled = null;
this.dontCompile = false; |
<<<<<<<
"nokia.connectivity-settings" ];
=======
"nokia.connectivity-settings", "nokia.file-ui",
"nokia.image-processing" ];
>>>>>>>
"nokia.connectivity-settings", "nokia.image-processing" ]; |
<<<<<<<
Native["java/lang/System.arraycopy.(Ljava/lang/Object;ILjava/lang/Object;II)V"] = function(src, srcOffset, dst, dstOffset, length) {
if (!src || !dst) {
=======
Native["java/lang/System.arraycopy.(Ljava/lang/Object;ILjava/lang/Object;II)V"] = function(addr, src, srcOffset, dst, dstOffset, length) {
if (!src || !dst)
>>>>>>>
Native["java/lang/System.arraycopy.(Ljava/lang/Object;ILjava/lang/Object;II)V"] = function(addr, src, srcOffset, dst, dstOffset, length) {
if (!src || !dst) {
<<<<<<<
Native["java/lang/Throwable.obtainBackTrace.()Ljava/lang/Object;"] = function() {
var resultAddr = 0;
// XXX: Untested.
=======
Native["java/lang/Throwable.obtainBackTrace.()Ljava/lang/Object;"] = function(addr) {
var result = null;
>>>>>>>
Native["java/lang/Throwable.obtainBackTrace.()Ljava/lang/Object;"] = function(addr) {
var resultAddr = 0;
// XXX: Untested.
<<<<<<<
Native["com/sun/cldc/isolate/Isolate.getIsolates0.()[Lcom/sun/cldc/isolate/Isolate;"] = function() {
var isolatesAddr = J2ME.newObjectArray(Runtime.all.size);
var isolates = J2ME.getArrayFromAddr(isolatesAddr);
=======
Native["com/sun/cldc/isolate/Isolate.getIsolates0.()[Lcom/sun/cldc/isolate/Isolate;"] = function(addr) {
var isolates = J2ME.newObjectArray(Runtime.all.keys().length);
>>>>>>>
Native["com/sun/cldc/isolate/Isolate.getIsolates0.()[Lcom/sun/cldc/isolate/Isolate;"] = function(addr) {
var isolatesAddr = J2ME.newObjectArray(Runtime.all.size);
var isolates = J2ME.getArrayFromAddr(isolatesAddr);
<<<<<<<
Native["java/lang/String.intern.()Ljava/lang/String;"] = function() {
var value = J2ME.getArrayFromAddr(this.value);
=======
Native["java/lang/String.intern.()Ljava/lang/String;"] = function(addr) {
>>>>>>>
Native["java/lang/String.intern.()Ljava/lang/String;"] = function(addr) {
var value = J2ME.getArrayFromAddr(this.value); |
<<<<<<<
var self = getHandle(addr);
return $.getRuntimeKlass(self.klass).classObject;
=======
return $.getRuntimeKlass(this.klass).classObject._address;
>>>>>>>
var self = getHandle(addr);
return $.getRuntimeKlass(self.klass).classObject._address;
<<<<<<<
return new self.runtimeKlass.templateKlass;
=======
return (new this.runtimeKlass.templateKlass)._address;
>>>>>>>
return (new self.runtimeKlass.templateKlass)._address;
<<<<<<<
newCtx.nativeThread.frame.setParameter(J2ME.Kind.Reference, 0, addr);
=======
newCtx.nativeThread.frame.setParameter(J2ME.Kind.Reference, 0, this._address);
>>>>>>>
newCtx.nativeThread.frame.setParameter(J2ME.Kind.Reference, 0, addr);
<<<<<<<
var target = NativeMap.get(addr);
return target ? target : null;
=======
var target = getNative(this);
return target ? target._address : J2ME.Constants.NULL;
>>>>>>>
var target = NativeMap.get(addr);
return target ? target._address : J2ME.Constants.NULL;
<<<<<<<
internedStrings.put(value.subarray(self.offset, self.offset + self.count), self);
return self;
=======
internedStrings.put(value.subarray(this.offset, this.offset + this.count), this);
return this._address;
>>>>>>>
internedStrings.put(value.subarray(self.offset, self.offset + self.count), self);
return self._address; |
<<<<<<<
if (!frame) {
return;
=======
function resolve(idx, isStatic) {
var constant = cp[idx];
if (!constant.tag)
return constant;
switch(constant.tag) {
case 3: // TAGS.CONSTANT_Integer
constant = constant.integer;
break;
case 4: // TAGS.CONSTANT_Float
constant = constant.float;
break;
case 8: // TAGS.CONSTANT_String
constant = util.newString(cp[constant.string_index].bytes);
break;
case 5: // TAGS.CONSTANT_Long
constant = Long.fromBits(constant.lowBits, constant.highBits);
break;
case 6: // TAGS.CONSTANT_Double
constant = constant.double;
break;
case 7: // TAGS.CONSTANT_Class
constant = CLASSES.getClass(cp[constant.name_index].bytes);
break;
case 9: // TAGS.CONSTANT_Fieldref
var classInfo = resolve(constant.class_index, isStatic);
var fieldName = cp[cp[constant.name_and_type_index].name_index].bytes;
var signature = cp[cp[constant.name_and_type_index].signature_index].bytes;
constant = CLASSES.getField(classInfo, (isStatic ? "S" : "I") + "." + fieldName + "." + signature);
if (!constant)
ctx.raiseExceptionAndYield("java/lang/RuntimeException",
classInfo.className + "." + fieldName + "." + signature + " not found");
break;
case 10: // TAGS.CONSTANT_Methodref
case 11: // TAGS.CONSTANT_InterfaceMethodref
var classInfo = resolve(constant.class_index, isStatic);
var methodName = cp[cp[constant.name_and_type_index].name_index].bytes;
var signature = cp[cp[constant.name_and_type_index].signature_index].bytes;
constant = CLASSES.getMethod(classInfo, (isStatic ? "S" : "I") + "." + methodName + "." + signature);
if (!constant)
ctx.raiseExceptionAndYield("java/lang/RuntimeException",
classInfo.className + "." + methodName + "." + signature + " not found");
break;
default:
throw new Error("not support constant type");
}
return cp[idx] = constant;
>>>>>>>
if (!frame) {
return;
<<<<<<<
classInfo = resolve(ctx, cp, idx);
classInitCheck(ctx, frame, classInfo, frame.ip-3);
stack.push(ctx.newObject(classInfo));
=======
classInfo = resolve(idx);
classInitCheck(classInfo, frame.ip-3);
stack.push(util.newObject(classInfo));
>>>>>>>
classInfo = resolve(ctx, cp, idx);
classInitCheck(ctx, frame, classInfo, frame.ip-3);
stack.push(util.newObject(classInfo)); |
<<<<<<<
var keyboardVisibilityListener = null;
Native["com/nokia/mid/ui/VirtualKeyboard.setVisibilityListener.(Lcom/nokia/mid/ui/KeyboardVisibilityListener;)V"] = function(addr, listener) {
keyboardVisibilityListener = listener;
=======
var keyboardVisibilityListener = J2ME.Constants.NULL;
Native["com/nokia/mid/ui/VirtualKeyboard.setVisibilityListener.(Lcom/nokia/mid/ui/KeyboardVisibilityListener;)V"] = function(listener) {
keyboardVisibilityListener = listener ? listener._address : J2ME.Constants.NULL;
>>>>>>>
var keyboardVisibilityListener = J2ME.Constants.NULL;
Native["com/nokia/mid/ui/VirtualKeyboard.setVisibilityListener.(Lcom/nokia/mid/ui/KeyboardVisibilityListener;)V"] = function(addr, listener) {
keyboardVisibilityListener = listener ? listener._address : J2ME.Constants.NULL; |
<<<<<<<
Native["com/sun/mmedia/DefaultConfiguration.nListContentTypesOpen.(Ljava/lang/String;)I"] = function(jProtocol) {
=======
Media.convert3gpToAmr = function(inBuffer) {
// The buffer to store the converted amr file.
var outBuffer = new Uint8Array(inBuffer.length);
// Add AMR header.
var AMR_HEADER = "#!AMR\n";
outBuffer.set(new TextEncoder("utf-8").encode(AMR_HEADER));
var outOffset = AMR_HEADER.length;
var textDecoder = new TextDecoder("utf-8");
var inOffset = 0;
while (inOffset + 8 < inBuffer.length) {
// Get the box size
var size = 0;
for (var i = 0; i < 4; i++) {
size = inBuffer[inOffset + i] + (size << 8);
}
// Search the box of type mdat.
var type = textDecoder.decode(inBuffer.subarray(inOffset + 4, inOffset + 8));
if (type === "mdat" && inOffset + size <= inBuffer.length) {
// Extract raw AMR data from the box and append to the out buffer.
var data = inBuffer.subarray(inOffset + 8, inOffset + size);
outBuffer.set(data, outOffset);
outOffset += data.length;
}
inOffset += size;
}
if (outOffset === AMR_HEADER.length) {
console.warn("Failed to extract AMR from 3GP file.");
}
return outBuffer.subarray(0, outOffset);
};
Native.create("com/sun/mmedia/DefaultConfiguration.nListContentTypesOpen.(Ljava/lang/String;)I", function(jProtocol) {
>>>>>>>
Media.convert3gpToAmr = function(inBuffer) {
// The buffer to store the converted amr file.
var outBuffer = new Uint8Array(inBuffer.length);
// Add AMR header.
var AMR_HEADER = "#!AMR\n";
outBuffer.set(new TextEncoder("utf-8").encode(AMR_HEADER));
var outOffset = AMR_HEADER.length;
var textDecoder = new TextDecoder("utf-8");
var inOffset = 0;
while (inOffset + 8 < inBuffer.length) {
// Get the box size
var size = 0;
for (var i = 0; i < 4; i++) {
size = inBuffer[inOffset + i] + (size << 8);
}
// Search the box of type mdat.
var type = textDecoder.decode(inBuffer.subarray(inOffset + 4, inOffset + 8));
if (type === "mdat" && inOffset + size <= inBuffer.length) {
// Extract raw AMR data from the box and append to the out buffer.
var data = inBuffer.subarray(inOffset + 8, inOffset + size);
outBuffer.set(data, outOffset);
outOffset += data.length;
}
inOffset += size;
}
if (outOffset === AMR_HEADER.length) {
console.warn("Failed to extract AMR from 3GP file.");
}
return outBuffer.subarray(0, outOffset);
};
Native["com/sun/mmedia/DefaultConfiguration.nListContentTypesOpen.(Ljava/lang/String;)I"] = function(jProtocol) { |
<<<<<<<
[x, y] = withAnchor(g, c, anchor, x, y, texture.width, texture.height);
=======
var pair = withAnchor(this, c, anchor, x, y, texture.width, texture.height);
x = pair[0];
y = pair[1];
>>>>>>>
var pair = withAnchor(g, c, anchor, x, y, texture.width, texture.height);
x = pair[0];
y = pair[1];
<<<<<<<
[x, y] = withAnchor(g, c, anchor, x, y, sw, sh);
=======
var pair = withAnchor(this, c, anchor, x, y, sw, sh);
x = pair[0];
y = pair[1];
>>>>>>>
var pair = withAnchor(g, c, anchor, x, y, sw, sh);
x = pair[0];
y = pair[1]; |
<<<<<<<
var numArgs = Signature.getINSlots(key.substring(key.lastIndexOf(".") + 1)) + 1;
var doReturn = getReturnFunction(key);
var postExec = usesPromise ? executePromise : doReturn;
object[key] = function(ctx, stack, isStatic) {
=======
var numArgs = fn.length;
object[key] = function(ctx, stack, isStatic, cb) {
>>>>>>>
var numArgs = Signature.getINSlots(key.substring(key.lastIndexOf(".") + 1)) + 1;
var doReturn = getReturnFunction(key);
var postExec = usesPromise ? executePromise : doReturn;
object[key] = function(ctx, stack, isStatic, cb) {
<<<<<<<
=======
function doReturn(ret) {
if (retType === 'V') {
return;
}
if (cb) {
stack = cb();
}
if (ret === true) {
var value = 1;
stack.push(value);
return value;
} else if (ret === false) {
var value = 0;
stack.push(value);
return value;
} else if (typeof ret === "string") {
var value = ctx.newString(ret);
stack.push(value);
return value;
} else if (retType === 'J' || retType === 'D') {
stack.push2(ret);
return ret;
} else {
stack.push(ret);
return ret;
}
}
>>>>>>>
<<<<<<<
postExec(stack, ret, doReturn, ctx, key);
=======
if (ret && ret.then) { // ret.constructor.name == "Promise"
ret.then(doReturn, function(e) {
ctx.raiseException(e.javaClassName, e.message);
}).then(ctx.start.bind(ctx));
throw VM.Pause;
} else {
cb = null;
return doReturn(ret);
}
>>>>>>>
postExec(stack, ret, doReturn, ctx, key, cb); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.