From f18f0a781ab45c8d3011a663ccb79449e823c3d4 Mon Sep 17 00:00:00 2001 From: Kris Kowal Date: Mon, 4 Mar 2024 13:07:30 -0800 Subject: [PATCH] Create bundles --- .well-known/matrix/client | 11 + .well-known/matrix/server | 3 + .well-known/matrix/support | 9 + CNAME | 1 + bundle.js | 969 +++++++++++++++++++++++++++++++++++++ index.css | 4 + index.html | 680 ++++++++++++++++++++++++++ 7 files changed, 1677 insertions(+) create mode 100644 .well-known/matrix/client create mode 100644 .well-known/matrix/server create mode 100644 .well-known/matrix/support create mode 100644 CNAME create mode 100644 bundle.js create mode 100644 index.css create mode 100644 index.html diff --git a/.well-known/matrix/client b/.well-known/matrix/client new file mode 100644 index 0000000..74338ae --- /dev/null +++ b/.well-known/matrix/client @@ -0,0 +1,11 @@ +{ + "m.homeserver": { + "base_url": "https://matrix.aelf.land" + }, + "m.identity_server": { + "base_url": "https://vector.im" + }, + "org.matrix.msc3575.proxy": { + "url": "https://matrix.aelf.land/sliding-sync" + } +} diff --git a/.well-known/matrix/server b/.well-known/matrix/server new file mode 100644 index 0000000..d2deef6 --- /dev/null +++ b/.well-known/matrix/server @@ -0,0 +1,3 @@ +{ + "m.server": "matrix.aelf.land:8448" +} diff --git a/.well-known/matrix/support b/.well-known/matrix/support new file mode 100644 index 0000000..d712cc4 --- /dev/null +++ b/.well-known/matrix/support @@ -0,0 +1,9 @@ +{ + "contacts": [ + { + "email_address": "kris@cixar.com", + "matrix_id": "@kris:aelf.land" + } + ], + "support_page": "http://aelf.land/" +} diff --git a/CNAME b/CNAME new file mode 100644 index 0000000..0e8f689 --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +aelf.land diff --git a/bundle.js b/bundle.js new file mode 100644 index 0000000..88b0936 --- /dev/null +++ b/bundle.js @@ -0,0 +1,969 @@ +// @generated +/*eslint semi:[0], no-native-reassign:[0]*/ +global = this; +(function (modules) { + + // Bundle allows the run-time to extract already-loaded modules from the + // boot bundle. + var bundle = {}; + var main; + + // Unpack module tuples into module objects. + for (var i = 0; i < modules.length; i++) { + var module = modules[i]; + module = modules[i] = new Module( + module[0], + module[1], + module[2], + module[3], + module[4] + ); + bundle[module.filename] = module; + } + + function Module(id, dirname, basename, dependencies, factory) { + this.id = id; + this.dirname = dirname; + this.filename = dirname + "/" + basename; + // Dependency map and factory are used to instantiate bundled modules. + this.dependencies = dependencies; + this.factory = factory; + } + + Module.prototype._require = function () { + var module = this; + if (module.exports === void 0) { + module.exports = {}; + var require = function (id) { + var index = module.dependencies[id]; + var dependency = modules[index]; + if (!dependency) + throw new Error("Bundle is missing a dependency: " + id); + return dependency._require(); + }; + require.main = main; + module.exports = module.factory( + require, + module.exports, + module, + module.filename, + module.dirname + ) || module.exports; + } + return module.exports; + }; + + // Communicate the bundle to all bundled modules + Module.prototype.modules = bundle; + + return function require(filename) { + main = bundle[filename]; + main._require(); + } +})([["index.js","aelf.land","index.js",{"gutentag/document":3,"gutentag/scope":4,"./main.html":1,"blick":2},function (require, exports, module, __filename, __dirname){ + +// aelf.land/index.js +// ------------------ + +"use strict"; + +var Document = require("gutentag/document"); +var Scope = require("gutentag/scope"); +var Main = require("./main.html"); + +var Animator = require("blick"); + +var scope = new Scope(); +scope.animator = new Animator(); +scope.window = window; +var document = new Document(window.document.body); +var main = new Main(document.documentElement, scope); + + +}],["main.html","aelf.land","main.html",{"./main":null},function (require, exports, module, __filename, __dirname){ + +// aelf.land/main.html +// ------------------- + +"use strict"; +var $SUPER = require("./main"); +var $THIS = function AelflandMain(body, caller) { + $SUPER.apply(this, arguments); + var document = body.ownerDocument; + var scope = this.scope = caller.root.nestComponents(); + scope.caller = caller; + scope.this = this; + this.scope.set("this", this); +}; +$THIS.prototype = Object.create($SUPER.prototype); +$THIS.prototype.constructor = $THIS; +$THIS.prototype.exports = {}; +module.exports = $THIS; + +}],["animator.js","blick","animator.js",{"raf":7},function (require, exports, module, __filename, __dirname){ + +// blick/animator.js +// ----------------- + +"use strict"; + +var defaultRequestAnimation = require("raf"); + +module.exports = Animator; + +function Animator(requestAnimation) { + var self = this; + self._requestAnimation = requestAnimation || defaultRequestAnimation; + self.controllers = []; + // This thunk is doomed to deoptimization for multiple reasons, but passes + // off as quickly as possible to the unrolled animation loop. + self._animate = function () { + try { + self.animate(Date.now()); + } catch (error) { + self.requestAnimation(); + throw error; + } + }; +} + +Animator.prototype.requestAnimation = function () { + if (!this.requested) { + this._requestAnimation(this._animate); + } + this.requested = true; +}; + +Animator.prototype.animate = function (now) { + var node, temp; + + this.requested = false; + + // Measure + for (var index = 0; index < this.controllers.length; index++) { + var controller = this.controllers[index]; + if (controller.measure) { + controller.component.measure(now); + controller.measure = false; + } + } + + // Transition + for (var index = 0; index < this.controllers.length; index++) { + var controller = this.controllers[index]; + // Unlke others, skipped if draw or redraw are scheduled and left on + // the schedule for the next animation frame. + if (controller.transition) { + if (!controller.draw && !controller.redraw) { + controller.component.transition(now); + controller.transition = false; + } else { + this.requestAnimation(); + } + } + } + + // Animate + // If any components have animation set, continue animation. + for (var index = 0; index < this.controllers.length; index++) { + var controller = this.controllers[index]; + if (controller.animate) { + controller.component.animate(now); + this.requestAnimation(); + // Unlike others, not reset implicitly. + } + } + + // Draw + for (var index = 0; index < this.controllers.length; index++) { + var controller = this.controllers[index]; + if (controller.draw) { + controller.component.draw(now); + controller.draw = false; + } + } + + // Redraw + for (var index = 0; index < this.controllers.length; index++) { + var controller = this.controllers[index]; + if (controller.redraw) { + controller.component.redraw(now); + controller.redraw = false; + } + } +}; + +Animator.prototype.add = function (component) { + var controller = new AnimationController(component, this); + this.controllers.push(controller); + return controller; +}; + +function AnimationController(component, controller) { + this.component = component; + this.controller = controller; + + this.measure = false; + this.transition = false; + this.animate = false; + this.draw = false; + this.redraw = false; +} + +AnimationController.prototype.destroy = function () { +}; + +AnimationController.prototype.requestMeasure = function () { + if (!this.component.measure) { + throw new Error("Can't requestMeasure because component does not implement measure"); + } + this.measure = true; + this.controller.requestAnimation(); +}; + +AnimationController.prototype.cancelMeasure = function () { + this.measure = false; +}; + +AnimationController.prototype.requestTransition = function () { + if (!this.component.transition) { + throw new Error("Can't requestTransition because component does not implement transition"); + } + this.transition = true; + this.controller.requestAnimation(); +}; + +AnimationController.prototype.cancelTransition = function () { + this.transition = false; +}; + +AnimationController.prototype.requestAnimation = function () { + if (!this.component.animate) { + throw new Error("Can't requestAnimation because component does not implement animate"); + } + this.animate = true; + this.controller.requestAnimation(); +}; + +AnimationController.prototype.cancelAnimation = function () { + this.animate = false; +}; + +AnimationController.prototype.requestDraw = function () { + if (!this.component.draw) { + throw new Error("Can't requestDraw because component does not implement draw"); + } + this.draw = true; + this.controller.requestAnimation(); +}; + +AnimationController.prototype.cancelDraw = function () { + this.draw = false; +}; + +AnimationController.prototype.requestRedraw = function () { + if (!this.component.redraw) { + throw new Error("Can't requestRedraw because component does not implement redraw"); + } + this.redraw = true; + this.controller.requestAnimation(); +}; + +AnimationController.prototype.cancelRedraw = function () { + this.redraw = false; +}; + +}],["document.js","gutentag","document.js",{"koerper":5},function (require, exports, module, __filename, __dirname){ + +// gutentag/document.js +// -------------------- + +"use strict"; +module.exports = require("koerper"); + +}],["scope.js","gutentag","scope.js",{},function (require, exports, module, __filename, __dirname){ + +// gutentag/scope.js +// ----------------- + +"use strict"; + +module.exports = Scope; +function Scope() { + this.root = this; + this.components = Object.create(null); +} + +Scope.prototype.nest = function () { + var child = Object.create(this); + child.parent = this; + child.caller = this.caller && this.caller.nest(); + return child; +}; + +Scope.prototype.nestComponents = function () { + var child = this.nest(); + child.components = Object.create(this.components); + return child; +}; + +Scope.prototype.set = function (id, component) { + var scope = this; + scope.components[id] = component; + + if (scope.this.add) { + scope.this.add(component, id, scope); + } + + var exportId = scope.this.exports && scope.this.exports[id]; + if (exportId) { + var callerId = scope.caller.id; + scope.caller.set(callerId + ":" + exportId, component); + } +}; + +}],["koerper.js","koerper","koerper.js",{"wizdom":8},function (require, exports, module, __filename, __dirname){ + +// koerper/koerper.js +// ------------------ + +"use strict"; + +var BaseDocument = require("wizdom"); +var BaseNode = BaseDocument.prototype.Node; +var BaseElement = BaseDocument.prototype.Element; +var BaseTextNode = BaseDocument.prototype.TextNode; + +module.exports = Document; +function Document(actualNode) { + Node.call(this, this); + this.actualNode = actualNode; + this.actualDocument = actualNode.ownerDocument; + + this.documentElement = this.createBody(); + this.documentElement.parentNode = this; + actualNode.appendChild(this.documentElement.actualNode); + + this.firstChild = this.documentElement; + this.lastChild = this.documentElement; +} + +Document.prototype = Object.create(BaseDocument.prototype); +Document.prototype.Node = Node; +Document.prototype.Element = Element; +Document.prototype.TextNode = TextNode; +Document.prototype.Body = Body; +Document.prototype.OpaqueHtml = OpaqueHtml; + +Document.prototype.createBody = function (label) { + return new this.Body(this, label); +}; + +Document.prototype.getActualParent = function () { + return this.actualNode; +}; + +function Node(document) { + BaseNode.call(this, document); + this.actualNode = null; +} + +Node.prototype = Object.create(BaseNode.prototype); +Node.prototype.constructor = Node; + +Node.prototype.insertBefore = function insertBefore(childNode, nextSibling) { + if (nextSibling && nextSibling.parentNode !== this) { + throw new Error("Can't insert before node that is not a child of parent"); + } + BaseNode.prototype.insertBefore.call(this, childNode, nextSibling); + var actualParentNode = this.getActualParent(); + var actualNextSibling; + if (nextSibling) { + actualNextSibling = nextSibling.getActualFirstChild(); + } + if (!actualNextSibling) { + actualNextSibling = this.getActualNextSibling(); + } + if (actualNextSibling && actualNextSibling.parentNode !== actualParentNode) { + actualNextSibling = null; + } + actualParentNode.insertBefore(childNode.actualNode, actualNextSibling || null); + childNode.inject(); + return childNode; +}; + +Node.prototype.removeChild = function removeChild(childNode) { + if (!childNode) { + throw new Error("Can't remove child " + childNode); + } + childNode.extract(); + this.getActualParent().removeChild(childNode.actualNode); + BaseNode.prototype.removeChild.call(this, childNode); +}; + +Node.prototype.setAttribute = function setAttribute(key, value) { + this.actualNode.setAttribute(key, value); +}; + +Node.prototype.getAttribute = function getAttribute(key) { + this.actualNode.getAttribute(key); +}; + +Node.prototype.hasAttribute = function hasAttribute(key) { + this.actualNode.hasAttribute(key); +}; + +Node.prototype.removeAttribute = function removeAttribute(key) { + this.actualNode.removeAttribute(key); +}; + +Node.prototype.addEventListener = function addEventListener(name, handler, capture) { + this.actualNode.addEventListener(name, handler, capture); +}; + +Node.prototype.removeEventListener = function removeEventListener(name, handler, capture) { + this.actualNode.removeEventListener(name, handler, capture); +}; + +Node.prototype.inject = function injectNode() { }; + +Node.prototype.extract = function extractNode() { }; + +Node.prototype.getActualParent = function () { + return this.actualNode; +}; + +Node.prototype.getActualFirstChild = function () { + return this.actualNode; +}; + +Node.prototype.getActualNextSibling = function () { + return null; +}; + +Object.defineProperty(Node.prototype, "innerHTML", { + get: function () { + return this.actualNode.innerHTML; + }//, + //set: function (html) { + // // TODO invalidate any subcontained child nodes + // this.actualNode.innerHTML = html; + //} +}); + +function Element(document, type, namespace) { + BaseNode.call(this, document, namespace); + if (namespace) { + this.actualNode = document.actualDocument.createElementNS(namespace, type); + } else { + this.actualNode = document.actualDocument.createElement(type); + } + this.attributes = this.actualNode.attributes; +} + +Element.prototype = Object.create(Node.prototype); +Element.prototype.constructor = Element; +Element.prototype.nodeType = 1; + +function TextNode(document, text) { + Node.call(this, document); + this.actualNode = document.actualDocument.createTextNode(text); +} + +TextNode.prototype = Object.create(Node.prototype); +TextNode.prototype.constructor = TextNode; +TextNode.prototype.nodeType = 3; + +Object.defineProperty(TextNode.prototype, "data", { + set: function (data) { + this.actualNode.data = data; + }, + get: function () { + return this.actualNode.data; + } +}); + +// if parentNode is null, the body is extracted +// if parentNode is non-null, the body is inserted +function Body(document, label) { + Node.call(this, document); + this.actualNode = document.actualDocument.createTextNode(""); + //this.actualNode = document.actualDocument.createComment(label || ""); + this.actualFirstChild = null; + this.actualBody = document.actualDocument.createElement("BODY"); +} + +Body.prototype = Object.create(Node.prototype); +Body.prototype.constructor = Body; +Body.prototype.nodeType = 13; + +Body.prototype.extract = function extract() { + var body = this.actualBody; + var lastChild = this.actualNode; + var parentNode = this.parentNode.getActualParent(); + var at = this.getActualFirstChild(); + var next; + while (at && at !== lastChild) { + next = at.nextSibling; + if (body) { + body.appendChild(at); + } else { + parentNode.removeChild(at); + } + at = next; + } +}; + +Body.prototype.inject = function inject() { + if (!this.parentNode) { + throw new Error("Can't inject without a parent node"); + } + var body = this.actualBody; + var lastChild = this.actualNode; + var parentNode = this.parentNode.getActualParent(); + var at = body.firstChild; + var next; + while (at) { + next = at.nextSibling; + parentNode.insertBefore(at, lastChild); + at = next; + } +}; + +Body.prototype.getActualParent = function () { + if (this.parentNode) { + return this.parentNode.getActualParent(); + } else { + return this.actualBody; + } +}; + +Body.prototype.getActualFirstChild = function () { + if (this.firstChild) { + return this.firstChild.getActualFirstChild(); + } else { + return this.actualNode; + } +}; + +Body.prototype.getActualNextSibling = function () { + return this.actualNode; +}; + +Object.defineProperty(Body.prototype, "innerHTML", { + get: function () { + if (this.parentNode) { + this.extract(); + var html = this.actualBody.innerHTML; + this.inject(); + return html; + } else { + return this.actualBody.innerHTML; + } + }, + set: function (html) { + if (this.parentNode) { + this.extract(); + this.actualBody.innerHTML = html; + this.firstChild = this.lastChild = new OpaqueHtml( + this.ownerDocument, + this.actualBody + ); + this.inject(); + } else { + this.actualBody.innerHTML = html; + this.firstChild = this.lastChild = new OpaqueHtml( + this.ownerDocument, + this.actualBody + ); + } + return html; + } +}); + +function OpaqueHtml(ownerDocument, body) { + Node.call(this, ownerDocument); + this.actualFirstChild = body.firstChild; +} + +OpaqueHtml.prototype = Object.create(Node.prototype); +OpaqueHtml.prototype.constructor = OpaqueHtml; + +OpaqueHtml.prototype.getActualFirstChild = function getActualFirstChild() { + return this.actualFirstChild; +}; + +}],["lib/performance-now.js","performance-now/lib","performance-now.js",{},function (require, exports, module, __filename, __dirname){ + +// performance-now/lib/performance-now.js +// -------------------------------------- + +// Generated by CoffeeScript 1.6.3 +(function() { + var getNanoSeconds, hrtime, loadTime; + + if ((typeof performance !== "undefined" && performance !== null) && performance.now) { + module.exports = function() { + return performance.now(); + }; + } else if ((typeof process !== "undefined" && process !== null) && process.hrtime) { + module.exports = function() { + return (getNanoSeconds() - loadTime) / 1e6; + }; + hrtime = process.hrtime; + getNanoSeconds = function() { + var hr; + hr = hrtime(); + return hr[0] * 1e9 + hr[1]; + }; + loadTime = getNanoSeconds(); + } else if (Date.now) { + module.exports = function() { + return Date.now() - loadTime; + }; + loadTime = Date.now(); + } else { + module.exports = function() { + return new Date().getTime() - loadTime; + }; + loadTime = new Date().getTime(); + } + +}).call(this); + +/* +//@ sourceMappingURL=performance-now.map +*/ + +}],["index.js","raf","index.js",{"performance-now":6},function (require, exports, module, __filename, __dirname){ + +// raf/index.js +// ------------ + +var now = require('performance-now') + , global = typeof window === 'undefined' ? {} : window + , vendors = ['moz', 'webkit'] + , suffix = 'AnimationFrame' + , raf = global['request' + suffix] + , caf = global['cancel' + suffix] || global['cancelRequest' + suffix] + , isNative = true + +for(var i = 0; i < vendors.length && !raf; i++) { + raf = global[vendors[i] + 'Request' + suffix] + caf = global[vendors[i] + 'Cancel' + suffix] + || global[vendors[i] + 'CancelRequest' + suffix] +} + +// Some versions of FF have rAF but not cAF +if(!raf || !caf) { + isNative = false + + var last = 0 + , id = 0 + , queue = [] + , frameDuration = 1000 / 60 + + raf = function(callback) { + if(queue.length === 0) { + var _now = now() + , next = Math.max(0, frameDuration - (_now - last)) + last = next + _now + setTimeout(function() { + var cp = queue.slice(0) + // Clear queue here to prevent + // callbacks from appending listeners + // to the current frame's queue + queue.length = 0 + for(var i = 0; i < cp.length; i++) { + if(!cp[i].cancelled) { + try{ + cp[i].callback(last) + } catch(e) { + setTimeout(function() { throw e }, 0) + } + } + } + }, Math.round(next)) + } + queue.push({ + handle: ++id, + callback: callback, + cancelled: false + }) + return id + } + + caf = function(handle) { + for(var i = 0; i < queue.length; i++) { + if(queue[i].handle === handle) { + queue[i].cancelled = true + } + } + } +} + +module.exports = function(fn) { + // Wrap in a new function to prevent + // `cancel` potentially being assigned + // to the native rAF function + if(!isNative) { + return raf.call(global, fn) + } + return raf.call(global, function() { + try{ + fn.apply(this, arguments) + } catch(e) { + setTimeout(function() { throw e }, 0) + } + }) +} +module.exports.cancel = function() { + caf.apply(global, arguments) +} + +}],["dom.js","wizdom","dom.js",{},function (require, exports, module, __filename, __dirname){ + +// wizdom/dom.js +// ------------- + +"use strict"; + +module.exports = Document; +function Document(namespace) { + this.doctype = null; + this.documentElement = null; + this.namespaceURI = namespace || ""; +} + +Document.prototype.nodeType = 9; +Document.prototype.Node = Node; +Document.prototype.Element = Element; +Document.prototype.TextNode = TextNode; +Document.prototype.Comment = Comment; +Document.prototype.Attr = Attr; +Document.prototype.NamedNodeMap = NamedNodeMap; + +Document.prototype.createTextNode = function (text) { + return new this.TextNode(this, text); +}; + +Document.prototype.createComment = function (text) { + return new this.Comment(this, text); +}; + +Document.prototype.createElement = function (type, namespace) { + return new this.Element(this, type, namespace || this.namespaceURI); +}; + +Document.prototype.createElementNS = function (namespace, type) { + return new this.Element(this, type, namespace || this.namespaceURI); +}; + +Document.prototype.createAttribute = function (name, namespace) { + return new this.Attr(this, name, namespace || this.namespaceURI); +}; + +Document.prototype.createAttributeNS = function (namespace, name) { + return new this.Attr(this, name, namespace || this.namespaceURI); +}; + +function Node(document) { + this.ownerDocument = document; + this.parentNode = null; + this.firstChild = null; + this.lastChild = null; + this.previousSibling = null; + this.nextSibling = null; +} + +Node.prototype.appendChild = function appendChild(childNode) { + return this.insertBefore(childNode, null); +}; + +Node.prototype.insertBefore = function insertBefore(childNode, nextSibling) { + if (!childNode) { + throw new Error("Can't insert null child"); + } + if (childNode.ownerDocument !== this.ownerDocument) { + throw new Error("Can't insert child from foreign document"); + } + if (childNode.parentNode) { + childNode.parentNode.removeChild(childNode); + } + var previousSibling; + if (nextSibling) { + previousSibling = nextSibling.previousSibling; + } else { + previousSibling = this.lastChild; + } + if (previousSibling) { + previousSibling.nextSibling = childNode; + } + if (nextSibling) { + nextSibling.previousSibling = childNode; + } + childNode.nextSibling = nextSibling; + childNode.previousSibling = previousSibling; + childNode.parentNode = this; + if (!nextSibling) { + this.lastChild = childNode; + } + if (!previousSibling) { + this.firstChild = childNode; + } +}; + +Node.prototype.removeChild = function removeChild(childNode) { + if (!childNode) { + throw new Error("Can't remove null child"); + } + var parentNode = childNode.parentNode; + if (parentNode !== this) { + throw new Error("Can't remove node that is not a child of parent"); + } + if (childNode === parentNode.firstChild) { + parentNode.firstChild = childNode.nextSibling; + } + if (childNode === parentNode.lastChild) { + parentNode.lastChild = childNode.previousSibling; + } + if (childNode.previousSibling) { + childNode.previousSibling.nextSibling = childNode.nextSibling; + } + if (childNode.nextSibling) { + childNode.nextSibling.previousSibling = childNode.previousSibling; + } + childNode.previousSibling = null; + childNode.parentNode = null; + childNode.nextSibling = null; + return childNode; +}; + +function TextNode(document, text) { + Node.call(this, document); + this.data = text; +} + +TextNode.prototype = Object.create(Node.prototype); +TextNode.prototype.constructor = TextNode; +TextNode.prototype.nodeType = 3; + +function Comment(document, text) { + Node.call(this, document); + this.data = text; +} + +Comment.prototype = Object.create(Node.prototype); +Comment.prototype.constructor = Comment; +Comment.prototype.nodeType = 8; + +function Element(document, type, namespace) { + Node.call(this, document); + this.tagName = type; + this.namespaceURI = namespace; + this.attributes = new this.ownerDocument.NamedNodeMap(); +} + +Element.prototype = Object.create(Node.prototype); +Element.prototype.constructor = Element; +Element.prototype.nodeType = 1; + +Element.prototype.hasAttribute = function (name, namespace) { + var attr = this.attributes.getNamedItem(name, namespace); + return !!attr; +}; + +Element.prototype.getAttribute = function (name, namespace) { + var attr = this.attributes.getNamedItem(name, namespace); + return attr ? attr.value : null; +}; + +Element.prototype.setAttribute = function (name, value, namespace) { + var attr = this.ownerDocument.createAttribute(name, namespace); + attr.value = value; + this.attributes.setNamedItem(attr, namespace); +}; + +Element.prototype.removeAttribute = function (name, namespace) { + this.attributes.removeNamedItem(name, namespace); +}; + +Element.prototype.hasAttributeNS = function (namespace, name) { + return this.hasAttribute(name, namespace); +}; + +Element.prototype.getAttributeNS = function (namespace, name) { + return this.getAttribute(name, namespace); +}; + +Element.prototype.setAttributeNS = function (namespace, name, value) { + this.setAttribute(name, value, namespace); +}; + +Element.prototype.removeAttributeNS = function (namespace, name) { + this.removeAttribute(name, namespace); +}; + +function Attr(ownerDocument, name, namespace) { + this.ownerDocument = ownerDocument; + this.name = name; + this.value = null; + this.namespaceURI = namespace; +} + +Attr.prototype.nodeType = 2; + +function NamedNodeMap() { + this.length = 0; +} + +NamedNodeMap.prototype.getNamedItem = function (name, namespace) { + namespace = namespace || ""; + var key = encodeURIComponent(namespace) + ":" + encodeURIComponent(name); + return this[key]; +}; + +NamedNodeMap.prototype.setNamedItem = function (attr) { + var namespace = attr.namespaceURI || ""; + var name = attr.name; + var key = encodeURIComponent(namespace) + ":" + encodeURIComponent(name); + var previousAttr = this[key]; + if (!previousAttr) { + this[this.length] = attr; + this.length++; + previousAttr = null; + } + this[key] = attr; + return previousAttr; +}; + +NamedNodeMap.prototype.removeNamedItem = function (name, namespace) { + namespace = namespace || ""; + var key = encodeURIComponent(namespace) + ":" + encodeURIComponent(name); + var attr = this[key]; + if (!attr) { + throw new Error("Not found"); + } + var index = Array.prototype.indexOf.call(this, attr); + delete this[key]; + delete this[index]; + this.length--; +}; + +NamedNodeMap.prototype.item = function (index) { + return this[index]; +}; + +NamedNodeMap.prototype.getNamedItemNS = function (namespace, name) { + return this.getNamedItem(name, namespace); +}; + +NamedNodeMap.prototype.setNamedItemNS = function (attr) { + return this.setNamedItem(attr); +}; + +NamedNodeMap.prototype.removeNamedItemNS = function (namespace, name) { + return this.removeNamedItem(name, namespace); +}; + +}]])("aelf.land/index.js") \ No newline at end of file diff --git a/index.css b/index.css new file mode 100644 index 0000000..86343e9 --- /dev/null +++ b/index.css @@ -0,0 +1,4 @@ + +body { + background-color: white; +} diff --git a/index.html b/index.html new file mode 100644 index 0000000..f734926 --- /dev/null +++ b/index.html @@ -0,0 +1,680 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +