├── .github └── FUNDING.yml ├── .gitignore ├── README.md ├── dub.json ├── robots.txt ├── src └── gdcproject │ ├── app.d │ ├── archive.d │ ├── downloads.d │ └── render.d ├── static ├── images │ ├── blacktocat.png │ ├── favicon.ico │ ├── gdc-logo.png │ ├── gdc-omoon.png │ ├── gdc-two-moons-small.png │ ├── gdc-two-moons.png │ └── github-ribbon.png ├── js │ ├── bootstrap.min.js │ └── jquery.min.js └── style │ ├── bootstrap.min.css │ └── main.css ├── templates ├── footer.inc ├── header.inc └── menu.inc └── views ├── contributing.md ├── documentation.md ├── downloads.md ├── index.md └── old ├── downloads.json └── downloads.mustache /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: [ ibuclaw ] 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .dub 2 | dub.selections.json 3 | /gdcproject 4 | /downloads 5 | /archive 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## The GDC Website 2 | 3 | This repository contains the pages for the [gdcproject.org](https://gdcproject.org) 4 | website and app engine, powered by [vibe.d](https://vibed.org). 5 | 6 | If you wish to contribute, see [/views/](views) for all page content in 7 | markdown, [/templates/](templates) for the markup used for the header, footer, 8 | and menu in all pages, [/static/](static) for all images, javascript, and css 9 | content, and [/src/](src/gdcproject) for the render engine that generates the 10 | web pages from the given views and templates provided. 11 | -------------------------------------------------------------------------------- /dub.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "gdcproject", 3 | "description": "The vibe.d server application running gdcproject.org.", 4 | "copyright": "Copyright © 2014-2020, Iain Buclaw", 5 | "authors": ["Iain Buclaw"], 6 | "dependencies": { 7 | "vibe-d": "0.8.2", 8 | "vibe-d:tls": "*", 9 | "mustache-d": "0.1.4" 10 | }, 11 | "subConfigurations": { 12 | "vibe-d:tls": "openssl-1.1" 13 | }, 14 | "versions": ["VibeDefaultMain"] 15 | } 16 | -------------------------------------------------------------------------------- /robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: /harming/humans 3 | Disallow: /ignoring/human/orders 4 | Disallow: /harm/to/self 5 | -------------------------------------------------------------------------------- /src/gdcproject/app.d: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2014-2020 Iain Buclaw 2 | 3 | // This program is free software; you can redistribute it and/or 4 | // modify it under the terms of the GNU Lesser General Public 5 | // License as published by the Free Software Foundation; either 6 | // version 3.0 of the License, or (at your option) any later version. 7 | 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | // Lesser General Public License for more details. 12 | 13 | // You should have received a copy of the GNU Lesser General Public 14 | // License along with this program; if not, see 15 | // . 16 | 17 | // The gdcproject website powered by vibe.d 18 | 19 | // Architecture: 20 | //----------------------------------------------------------------------------- 21 | // One of the main selling features of vibe.d is that it supports 22 | // Compile-time "Diet" templates for fast dynamic page loading. 23 | // It achieves this speed by compiling the templates down to native 24 | // machine code, meaning that if you wish to make changes to a page, 25 | // then you must rebuild the entire site. Another limitation is that 26 | // given the more pages you wish to add to a site, the more memory 27 | // it will consume to build, and the longer it will take to compile. 28 | 29 | // On this server, given that all pages are static text, we instead 30 | // avoid the use of diet templating and bundle in our own templating 31 | // system using raw HTML for the header/footer components, and 32 | // markdown for the main bodies. 33 | //----------------------------------------------------------------------------- 34 | // It functions in the following way: 35 | // - Receives a request object for GET /foobar 36 | // - Translates /foobar into a path of where the markdown file 37 | // is expected to be. 38 | // '/' => /views/index.md 39 | // '/foo' => /views/foo.md 40 | // '/foo/bar/' => /views/foo/bar.md 41 | // - Checks if the translated path exists as a file and proceeds 42 | // to render the page in the topdown order of: 43 | // - Template header (templates/header.inc) 44 | // - Markdown script (views/foobar.md) 45 | // - Template footer (templates/footer.inc) 46 | // - Sends the built page back to the response object. 47 | //----------------------------------------------------------------------------- 48 | // The benefit of this being that templates can be loaded onto the 49 | // server dynamically and without requiring a restart of the entire 50 | // service to make a change. 51 | // As of writing, the memory consumption and build time was > 50% 52 | // reduction in comparison to using Diet templates to compile *only* 53 | // four pages in CTFE. 54 | 55 | // The only time when a site rebuild would be required is for fixing 56 | // any of the todo listed items below. 57 | //----------------------------------------------------------------------------- 58 | // TODO: 59 | // - Add in server-side logging facilities. 60 | // - Make all (hard coded) components configurable. 61 | // - Add support for /news, which would be a dynamic blog-style set 62 | // of content pages. 63 | // - Load testing, identify vulnerabilities, etc... 64 | 65 | module gdcproject.app; 66 | 67 | import vibe.d; 68 | 69 | import gdcproject.archive; 70 | import gdcproject.downloads; 71 | import gdcproject.render; 72 | 73 | // Handle any kind of GET request on the server. 74 | // The paths /style, /images and /archive are forwarded to the 75 | // static files handler provided by vibe.d 76 | // All other paths are translated a file path, and if it exists, 77 | // loading and running its contents through the markdown filter. 78 | 79 | void handleRequest(HTTPServerRequest req, HTTPServerResponse res) 80 | { 81 | import std.string : chomp; 82 | import std.file : exists; 83 | scope(failure) return; 84 | 85 | string requestURL = chomp(req.requestURL, "/"); 86 | 87 | if ((requestURL.length >= 4 && requestURL[0..4] == "/js/") 88 | || (requestURL.length >= 7 && requestURL[0..7] == "/style/") 89 | || (requestURL.length >= 8 && requestURL[0..8] == "/images/")) 90 | return serveStaticFiles("static/")(req, res); 91 | 92 | if (requestURL.length == 8 && requestURL == "/archive" 93 | || requestURL.length >= 9 && requestURL[0..9] == "/archive/") 94 | return serveArchivePage(req, res); 95 | 96 | // Render download page from template 97 | if (requestURL.length >= 10 && requestURL[$-10..$] == "/downloads") 98 | { 99 | string downloadsPath = "views" ~ requestURL ~ ".mustache"; 100 | if (downloadsPath.exists) 101 | return serveOldDownloadsPage(downloadsPath[0..$-9], res); 102 | } 103 | 104 | // Not a requesting a static file, look for the markdown script instead. 105 | string requestPath; 106 | if (requestURL.length == 0) 107 | requestPath = "views/index.md"; 108 | else 109 | requestPath = "views" ~ requestURL ~ ".md"; 110 | 111 | // Build up the content. 112 | string content = renderPage(requestPath, &readContents); 113 | 114 | // Send the page data to the client. 115 | res.writeBody(content, "text/html; charset=UTF-8"); 116 | } 117 | 118 | // Handle an error on the server. 119 | 120 | void handleError(HTTPServerRequest req, HTTPServerResponse res, HTTPServerErrorInfo error) 121 | { 122 | import std.array : appender; 123 | import std.conv : to; 124 | 125 | // Build up the content. 126 | auto content = appender!string(); 127 | content ~= readHeader(); 128 | content ~= "

HTTP Error

\n"; 129 | content ~= "

Code: " ~ to!string(error.code) ~ "

\n"; 130 | content ~= "

Description: " ~ error.message ~ "

\n"; 131 | content ~= readFooter(); 132 | 133 | // Send the error data to the client. 134 | res.writeBody(content.data, "text/html; charset=UTF-8"); 135 | } 136 | 137 | 138 | shared static this() 139 | { 140 | import core.thread : Thread; 141 | 142 | // Set (hard coded) server settings. 143 | auto settings = new HTTPServerSettings; 144 | settings.port = 8080; 145 | settings.bindAddresses = ["::1", "127.0.0.1"]; 146 | settings.errorPageHandler = toDelegate(&handleError); 147 | 148 | // Load all pages into cache. 149 | buildCache(); 150 | 151 | // Start the watcher task on template files. 152 | static Thread templateWatcher = null; 153 | if (templateWatcher is null) 154 | { 155 | templateWatcher = new Thread(&waitForTemplateChanges); 156 | templateWatcher.isDaemon(true); 157 | templateWatcher.start(); 158 | } 159 | 160 | // Start the watcher task on individual pages. 161 | static Thread pageWatcher = null; 162 | if (pageWatcher is null) 163 | { 164 | pageWatcher = new Thread(&waitForViewChanges); 165 | pageWatcher.isDaemon(true); 166 | pageWatcher.start(); 167 | } 168 | 169 | // Start listening. 170 | // Catch all GET requests and push them through our main handler. 171 | listenHTTP(settings, toDelegate(&handleRequest)); 172 | } 173 | 174 | -------------------------------------------------------------------------------- /src/gdcproject/archive.d: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2014-2020 Iain Buclaw 2 | 3 | // This program is free software; you can redistribute it and/or 4 | // modify it under the terms of the GNU Lesser General Public 5 | // License as published by the Free Software Foundation; either 6 | // version 3.0 of the License, or (at your option) any later version. 7 | 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | // Lesser General Public License for more details. 12 | 13 | // You should have received a copy of the GNU Lesser General Public 14 | // License along with this program; if not, see 15 | // . 16 | 17 | // The gdcproject website powered by vibe.d 18 | 19 | // This file serves the downloads page. 20 | 21 | module gdcproject.archive; 22 | 23 | import vibe.d; 24 | import gdcproject.render; 25 | 26 | string renderArchivePage(string path) 27 | { 28 | import std.array : appender; 29 | import std.algorithm : sort; 30 | import std.path : buildPath, pathSplitter; 31 | 32 | auto content = appender!string(); 33 | 34 | void appendFileOrDirectory(string parent, string name, 35 | string prefix, string suffix, 36 | bool is_directory = true) 37 | { 38 | content ~= prefix; 39 | content ~= `` : `">`; 42 | content ~= (parent) ? name : `[root]`; 43 | content ~= ``; 44 | content ~= suffix; 45 | content ~= "\n"; 46 | } 47 | 48 | // Build the parent directory listings. 49 | auto splitPaths = pathSplitter(path); 50 | string parent = null; 51 | content ~= `

`; 52 | foreach (base; splitPaths) 53 | { 54 | appendFileOrDirectory(parent, base, null, " "); 55 | parent = buildPath(parent, base); 56 | } 57 | content ~= "

\n"; 58 | 59 | // Build the subdirectory and file listings. 60 | string[] subdirs; 61 | string[] files; 62 | listDirectory(path, (fi) { 63 | if (fi.name[0] != '.') 64 | { 65 | if (fi.isDirectory) 66 | subdirs ~= fi.name; 67 | else 68 | files ~= fi.name; 69 | } 70 | return true; 71 | }); 72 | 73 | content ~= "Subdirectories:
\n\n"; 77 | 78 | content ~= "Files:
\n\n"; 82 | 83 | return content.data; 84 | } 85 | 86 | void serveArchivePage(HTTPServerRequest req, HTTPServerResponse res) 87 | { 88 | scope(failure) return; 89 | 90 | import std.file : isDir; 91 | 92 | string path = req.requestURL[1 .. $]; 93 | if (!path.isDir) 94 | return serveStaticFiles("./")(req, res); 95 | 96 | // Build up the content. 97 | auto content = appender!string(); 98 | content ~= readHeader(); 99 | content ~= renderArchivePage(path); 100 | content ~= readFooter(); 101 | 102 | // Send the page data to the client. 103 | res.writeBody(content.data, "text/html; charset=UTF-8"); 104 | } 105 | -------------------------------------------------------------------------------- /src/gdcproject/downloads.d: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2014-2020 Iain Buclaw 2 | // Written by Johannes Pfau 3 | 4 | // This program is free software; you can redistribute it and/or 5 | // modify it under the terms of the GNU Lesser General Public 6 | // License as published by the Free Software Foundation; either 7 | // version 3.0 of the License, or (at your option) any later version. 8 | 9 | // This program is distributed in the hope that it will be useful, 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | // Lesser General Public License for more details. 13 | 14 | // You should have received a copy of the GNU Lesser General Public 15 | // License along with this program; if not, see 16 | // . 17 | 18 | // The gdcproject website powered by vibe.d 19 | 20 | // This file serves the downloads page. 21 | 22 | module gdcproject.downloads; 23 | 24 | import vibe.d; 25 | import gdcproject.render; 26 | 27 | struct Download 28 | { 29 | string[] multilib; 30 | string target, dmdFE, runtime, gcc, gdcRev, buildDate, url, comment, runtimeLink; 31 | } 32 | 33 | struct SpecialDownload 34 | { 35 | string url; 36 | string[string] values; 37 | } 38 | 39 | struct DownloadSet 40 | { 41 | string name, comment, targetHeader; 42 | Download[] downloads; 43 | } 44 | 45 | struct SpecialSet 46 | { 47 | string name; 48 | SpecialDownload[] downloads; 49 | } 50 | 51 | struct Host 52 | { 53 | string name, triplet, archiveURL, comment; 54 | DownloadSet[] sets; 55 | } 56 | 57 | struct DownloadFile 58 | { 59 | @optional Host[] standardBuilds; 60 | @optional SpecialSet[] specialToolchains; 61 | } 62 | 63 | string renderOldDownloadsPage(string path) 64 | { 65 | import mustache; 66 | 67 | alias MustacheEngine!(string) Mustache; 68 | Mustache engine; 69 | auto context = new Mustache.Context(); 70 | DownloadFile mainFile; 71 | 72 | auto jsonData = readContents(path ~ ".json"); 73 | deserializeJson(mainFile, parseJson(jsonData)); 74 | 75 | foreach(host; mainFile.standardBuilds) 76 | { 77 | auto hostCtx = context.addSubContext("Host"); 78 | hostCtx["name"] = host.name; 79 | hostCtx["triplet"] = host.triplet; 80 | hostCtx["archiveURL"] = host.archiveURL; 81 | hostCtx["comment"] = host.comment; 82 | 83 | foreach(dlSet; host.sets) 84 | { 85 | auto setCtx = hostCtx.addSubContext("DownloadSet"); 86 | setCtx["name"] = dlSet.name; 87 | setCtx["comment"] = dlSet.comment; 88 | setCtx["targetHeader"] = dlSet.targetHeader; 89 | 90 | foreach(i, dl; dlSet.downloads) 91 | { 92 | auto dlCtx = setCtx.addSubContext("DownloadEntry"); 93 | dlCtx["target"] = dl.target; 94 | dlCtx["dmdFE"] = dl.dmdFE; 95 | dlCtx["runtime"] = dl.runtime; 96 | dlCtx["gcc"] = dl.gcc; 97 | dlCtx["gdcRev"] = dl.gdcRev; 98 | dlCtx["buildDate"] = dl.buildDate; 99 | dlCtx["url"] = dl.url; 100 | dlCtx["comment"] = dl.comment; 101 | dlCtx["runtimeLink"] = dl.runtimeLink; 102 | dlCtx["multilib"] = dl.multilib.join("
"); 103 | } 104 | } 105 | } 106 | 107 | foreach(set; mainFile.specialToolchains) 108 | { 109 | auto specialCtx = context.addSubContext(set.name); 110 | foreach(dl; set.downloads) 111 | { 112 | auto dlCtx = specialCtx.addSubContext("DownloadEntry"); 113 | dlCtx["url"] = dl.url; 114 | foreach(key, value; dl.values) 115 | dlCtx[key] = value; 116 | } 117 | } 118 | 119 | engine.level = Mustache.CacheLevel.no; 120 | 121 | return engine.render(path, context); 122 | } 123 | 124 | void serveOldDownloadsPage(string path, HTTPServerResponse res) 125 | { 126 | scope(failure) return; 127 | 128 | // Build up the content. 129 | string content = renderPage(path, &renderOldDownloadsPage); 130 | 131 | // Send the page data to the client. 132 | res.writeBody(content, "text/html; charset=UTF-8"); 133 | } 134 | -------------------------------------------------------------------------------- /src/gdcproject/render.d: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2014-2020 Iain Buclaw 2 | 3 | // This program is free software; you can redistribute it and/or 4 | // modify it under the terms of the GNU Lesser General Public 5 | // License as published by the Free Software Foundation; either 6 | // version 3.0 of the License, or (at your option) any later version. 7 | 8 | // This program is distributed in the hope that it will be useful, 9 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | // Lesser General Public License for more details. 12 | 13 | // You should have received a copy of the GNU Lesser General Public 14 | // License along with this program; if not, see 15 | // . 16 | 17 | // The gdcproject website powered by vibe.d 18 | 19 | // This file builds (and optionally caches) pages to be sent to the client. 20 | 21 | module gdcproject.render; 22 | 23 | import vibe.inet.path; 24 | import vibe.core.file; 25 | import vibe.db.redis.redis; 26 | 27 | import gdcproject.downloads; 28 | 29 | // Read and return as a string a dynamically loaded template from 'path'. 30 | // If not found, the value of 'notfound' is used inplace of the file. 31 | // The template is assumed to be in html format. 32 | 33 | string readTemplate(string path, lazy string notfound) 34 | { 35 | import std.array : appender; 36 | import std.algorithm : findSplit, strip; 37 | 38 | // Catch recursively included templates. 39 | static bool[string] rendering; 40 | 41 | if (rendering.get(path, false)) 42 | return ""; 43 | 44 | rendering[path] = true; 45 | scope(exit) rendering[path] = false; 46 | 47 | // Read and filter the contents for any sub-templates to include. 48 | string tmpl = readContentsOrNotFound(path, notfound); 49 | 50 | auto content = appender!string; 51 | content.reserve(tmpl.length); 52 | 53 | while (tmpl.length != 0) 54 | { 55 | // Split up as ['... content', '{{', 'template ...'] 56 | auto s1 = findSplit(tmpl, "{{"); 57 | // No match for '{{', reached end of template. 58 | if (s1[1].length == 0) 59 | { 60 | content ~= tmpl; 61 | break; 62 | } 63 | // Split up as ['... template', '}}', 'content...'] 64 | auto s2 = findSplit(s1[2], "}}"); 65 | // No match for '}}', write content unfiltered. 66 | if (s2[1].length == 0) 67 | { 68 | content ~= tmpl; 69 | break; 70 | } 71 | // Write content before '{{' 72 | content ~= s1[0]; 73 | // Write contents of sub-template. 74 | string incpath = s2[0].strip(' '); 75 | content ~= readTemplate(incpath, ""); 76 | // Still need to process content after '}}' 77 | tmpl = s2[2]; 78 | } 79 | return content.data; 80 | } 81 | 82 | // Read and return as a string the (hard coded) header template. 83 | // The template is assumed to be in html format. 84 | 85 | string readHeader() 86 | { 87 | return readTemplate("templates/header.inc", ""); 88 | } 89 | 90 | // Read and return as a string the (hard coded) footer template. 91 | // The template is assumed to be in html format. 92 | 93 | string readFooter() 94 | { 95 | return readTemplate("templates/footer.inc", ""); 96 | } 97 | 98 | // Read return as a string the contents of the file from 'path'. 99 | 100 | string readContents(string path) 101 | { 102 | import std.file : read; 103 | return cast(string) read(path); 104 | } 105 | 106 | // Same as readContents, except returns 'notfound' on failure. 107 | 108 | string readContentsOrNotFound(string path, lazy string notfound) 109 | { 110 | scope(failure) return notfound; 111 | return readContents(path); 112 | } 113 | 114 | string generateTOC(string data) 115 | { 116 | import vibe.textfilter.markdown : getMarkdownOutline; 117 | import std.array : appender; 118 | 119 | auto content = appender!string(); 120 | 121 | content ~= `\n"; 141 | 142 | return content.data; 143 | } 144 | 145 | // Render the page contents to send to client. 146 | 147 | string renderPage(string path, string function(string) read, bool nocache = false) 148 | { 149 | import std.array : appender; 150 | import vibe.textfilter.markdown : filterMarkdown; 151 | 152 | // First attempt to get from cache. 153 | if (!nocache) 154 | { 155 | scope(failure) goto Lnocache; 156 | 157 | RedisClient rc = connectRedis("127.0.0.1"); 158 | RedisDatabase rdb = rc.getDatabase(0); 159 | string content = rdb.get!string(path); 160 | rc.quit(); 161 | 162 | if (content != null) 163 | return content; 164 | } 165 | Lnocache: 166 | 167 | auto content = appender!string(); 168 | auto data = read(path); 169 | content ~= readHeader(); 170 | content ~= generateTOC(data); 171 | content ~= filterMarkdown(data); 172 | content ~= readFooter(); 173 | 174 | return content.data; 175 | } 176 | 177 | // Watch the views directory, recompiling pages when a change occurs. 178 | // Uses Redis as the database backend. 179 | 180 | void waitForViewChanges() 181 | { 182 | import core.thread : Thread; 183 | import core.time : seconds; 184 | scope(failure) return; 185 | 186 | DirectoryWatcher watcher = Path("views").watchDirectory(true); 187 | while (true) 188 | { 189 | DirectoryChange[] changes; 190 | if (watcher.readChanges(changes, 0.seconds)) 191 | { 192 | RedisClient rc = connectRedis("127.0.0.1"); 193 | RedisDatabase rdb = rc.getDatabase(0); 194 | 195 | foreach (change; changes) 196 | { 197 | string path = change.path.toNativeString(); 198 | 199 | // Check if one of the downloads templates changed. 200 | // Don't handle delete signals. 201 | if ((path.length > 15 && path[$-15..$] == "/downloads.json") 202 | || (path.length > 19 && path[$-19..$] == "/downloads.mustache")) 203 | { 204 | path = (path[$-1] == 'n') ? path[0..$-5] : path[0..$-9]; 205 | string content = renderPage(path, &renderOldDownloadsPage, true); 206 | rdb.set(path, content); 207 | } 208 | 209 | // Should be a markdown file. 210 | if (path.length <= 9 || path[$-3..$] != ".md") 211 | continue; 212 | 213 | // Add or remove pages on the fly. 214 | if (change.type == DirectoryChangeType.added 215 | || change.type == DirectoryChangeType.modified) 216 | { 217 | string content = renderPage(path, &readContents, true); 218 | rdb.set(path, content); 219 | } 220 | else if (DirectoryChangeType.removed) 221 | rdb.del(path); 222 | } 223 | rc.quit(); 224 | } 225 | Thread.sleep(5.seconds); 226 | } 227 | } 228 | 229 | // Watch the templates directory, rebuilding all pages when a change occurs. 230 | 231 | void waitForTemplateChanges() 232 | { 233 | import core.thread : Thread; 234 | import core.time : seconds; 235 | scope(failure) return; 236 | 237 | DirectoryWatcher watcher = Path("templates").watchDirectory(false); 238 | while (true) 239 | { 240 | DirectoryChange[] changes; 241 | if (watcher.readChanges(changes, 0.seconds)) 242 | { 243 | // Check the name of the file changed, only need to rebuild 244 | // if either the header or footer change. 245 | foreach (change; changes) 246 | { 247 | string path = change.path.toNativeString(); 248 | if (path.length == 20 249 | && (path == "templates/header.inc" || path == "templates/footer.inc")) 250 | { 251 | buildCache(); 252 | break; 253 | } 254 | } 255 | } 256 | Thread.sleep(5.seconds); 257 | } 258 | } 259 | 260 | // Render and cache all pages. This is called on application start-up, 261 | // and when a change occurs to a header/footer template. 262 | 263 | void buildCache() 264 | { 265 | import std.file : dirEntries, SpanMode; 266 | scope(failure) return; 267 | 268 | RedisClient rc = connectRedis("127.0.0.1"); 269 | RedisDatabase rdb = rc.getDatabase(0); 270 | 271 | // Build all markdown pages. 272 | auto de = dirEntries("views", "*.md", SpanMode.depth, false); 273 | foreach (path; de) 274 | { 275 | string content = renderPage(path, &readContents, true); 276 | rdb.set(path, content); 277 | } 278 | 279 | // Build (historical) downloads page. 280 | de = dirEntries("views", "downloads.mustache", SpanMode.depth, false); 281 | foreach (path; de) 282 | { 283 | string downloadsPath = path[0..$-9]; 284 | string content = renderPage(downloadsPath, &renderOldDownloadsPage, true); 285 | rdb.set(path, content); 286 | } 287 | 288 | rc.quit(); 289 | } 290 | -------------------------------------------------------------------------------- /static/images/blacktocat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/D-Programming-GDC/gdcproject/db7a86bf8e66be122e6499189065bcc8b53af3ef/static/images/blacktocat.png -------------------------------------------------------------------------------- /static/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/D-Programming-GDC/gdcproject/db7a86bf8e66be122e6499189065bcc8b53af3ef/static/images/favicon.ico -------------------------------------------------------------------------------- /static/images/gdc-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/D-Programming-GDC/gdcproject/db7a86bf8e66be122e6499189065bcc8b53af3ef/static/images/gdc-logo.png -------------------------------------------------------------------------------- /static/images/gdc-omoon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/D-Programming-GDC/gdcproject/db7a86bf8e66be122e6499189065bcc8b53af3ef/static/images/gdc-omoon.png -------------------------------------------------------------------------------- /static/images/gdc-two-moons-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/D-Programming-GDC/gdcproject/db7a86bf8e66be122e6499189065bcc8b53af3ef/static/images/gdc-two-moons-small.png -------------------------------------------------------------------------------- /static/images/gdc-two-moons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/D-Programming-GDC/gdcproject/db7a86bf8e66be122e6499189065bcc8b53af3ef/static/images/gdc-two-moons.png -------------------------------------------------------------------------------- /static/images/github-ribbon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/D-Programming-GDC/gdcproject/db7a86bf8e66be122e6499189065bcc8b53af3ef/static/images/github-ribbon.png -------------------------------------------------------------------------------- /static/js/bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v4.1.3 (https://getbootstrap.com/) 3 | * Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 5 | */ 6 | !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jquery"),require("popper.js")):"function"==typeof define&&define.amd?define(["exports","jquery","popper.js"],e):e(t.bootstrap={},t.jQuery,t.Popper)}(this,function(t,e,h){"use strict";function i(t,e){for(var n=0;nthis._items.length-1||t<0))if(this._isSliding)P(this._element).one(Q.SLID,function(){return e.to(t)});else{if(n===t)return this.pause(),void this.cycle();var i=ndocument.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},t._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},t._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=t.left+t.right
',trigger:"hover focus",title:"",delay:0,html:!(Ie={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"}),selector:!(Se={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)"}),placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent"},we="out",Ne={HIDE:"hide"+Ee,HIDDEN:"hidden"+Ee,SHOW:(De="show")+Ee,SHOWN:"shown"+Ee,INSERTED:"inserted"+Ee,CLICK:"click"+Ee,FOCUSIN:"focusin"+Ee,FOCUSOUT:"focusout"+Ee,MOUSEENTER:"mouseenter"+Ee,MOUSELEAVE:"mouseleave"+Ee},Oe="fade",ke="show",Pe=".tooltip-inner",je=".arrow",He="hover",Le="focus",Re="click",xe="manual",We=function(){function i(t,e){if("undefined"==typeof h)throw new TypeError("Bootstrap tooltips require Popper.js (https://popper.js.org)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var t=i.prototype;return t.enable=function(){this._isEnabled=!0},t.disable=function(){this._isEnabled=!1},t.toggleEnabled=function(){this._isEnabled=!this._isEnabled},t.toggle=function(t){if(this._isEnabled)if(t){var e=this.constructor.DATA_KEY,n=pe(t.currentTarget).data(e);n||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),pe(t.currentTarget).data(e,n)),n._activeTrigger.click=!n._activeTrigger.click,n._isWithActiveTrigger()?n._enter(null,n):n._leave(null,n)}else{if(pe(this.getTipElement()).hasClass(ke))return void this._leave(null,this);this._enter(null,this)}},t.dispose=function(){clearTimeout(this._timeout),pe.removeData(this.element,this.constructor.DATA_KEY),pe(this.element).off(this.constructor.EVENT_KEY),pe(this.element).closest(".modal").off("hide.bs.modal"),this.tip&&pe(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,(this._activeTrigger=null)!==this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},t.show=function(){var e=this;if("none"===pe(this.element).css("display"))throw new Error("Please use show on visible elements");var t=pe.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){pe(this.element).trigger(t);var n=pe.contains(this.element.ownerDocument.documentElement,this.element);if(t.isDefaultPrevented()||!n)return;var i=this.getTipElement(),r=Fn.getUID(this.constructor.NAME);i.setAttribute("id",r),this.element.setAttribute("aria-describedby",r),this.setContent(),this.config.animation&&pe(i).addClass(Oe);var o="function"==typeof this.config.placement?this.config.placement.call(this,i,this.element):this.config.placement,s=this._getAttachment(o);this.addAttachmentClass(s);var a=!1===this.config.container?document.body:pe(document).find(this.config.container);pe(i).data(this.constructor.DATA_KEY,this),pe.contains(this.element.ownerDocument.documentElement,this.tip)||pe(i).appendTo(a),pe(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new h(this.element,i,{placement:s,modifiers:{offset:{offset:this.config.offset},flip:{behavior:this.config.fallbackPlacement},arrow:{element:je},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){e._handlePopperPlacementChange(t)}}),pe(i).addClass(ke),"ontouchstart"in document.documentElement&&pe(document.body).children().on("mouseover",null,pe.noop);var l=function(){e.config.animation&&e._fixTransition();var t=e._hoverState;e._hoverState=null,pe(e.element).trigger(e.constructor.Event.SHOWN),t===we&&e._leave(null,e)};if(pe(this.tip).hasClass(Oe)){var c=Fn.getTransitionDurationFromElement(this.tip);pe(this.tip).one(Fn.TRANSITION_END,l).emulateTransitionEnd(c)}else l()}},t.hide=function(t){var e=this,n=this.getTipElement(),i=pe.Event(this.constructor.Event.HIDE),r=function(){e._hoverState!==De&&n.parentNode&&n.parentNode.removeChild(n),e._cleanTipClass(),e.element.removeAttribute("aria-describedby"),pe(e.element).trigger(e.constructor.Event.HIDDEN),null!==e._popper&&e._popper.destroy(),t&&t()};if(pe(this.element).trigger(i),!i.isDefaultPrevented()){if(pe(n).removeClass(ke),"ontouchstart"in document.documentElement&&pe(document.body).children().off("mouseover",null,pe.noop),this._activeTrigger[Re]=!1,this._activeTrigger[Le]=!1,this._activeTrigger[He]=!1,pe(this.tip).hasClass(Oe)){var o=Fn.getTransitionDurationFromElement(n);pe(n).one(Fn.TRANSITION_END,r).emulateTransitionEnd(o)}else r();this._hoverState=""}},t.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},t.isWithContent=function(){return Boolean(this.getTitle())},t.addAttachmentClass=function(t){pe(this.getTipElement()).addClass(Te+"-"+t)},t.getTipElement=function(){return this.tip=this.tip||pe(this.config.template)[0],this.tip},t.setContent=function(){var t=this.getTipElement();this.setElementContent(pe(t.querySelectorAll(Pe)),this.getTitle()),pe(t).removeClass(Oe+" "+ke)},t.setElementContent=function(t,e){var n=this.config.html;"object"==typeof e&&(e.nodeType||e.jquery)?n?pe(e).parent().is(t)||t.empty().append(e):t.text(pe(e).text()):t[n?"html":"text"](e)},t.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},t._getAttachment=function(t){return Ie[t.toUpperCase()]},t._setListeners=function(){var i=this;this.config.trigger.split(" ").forEach(function(t){if("click"===t)pe(i.element).on(i.constructor.Event.CLICK,i.config.selector,function(t){return i.toggle(t)});else if(t!==xe){var e=t===He?i.constructor.Event.MOUSEENTER:i.constructor.Event.FOCUSIN,n=t===He?i.constructor.Event.MOUSELEAVE:i.constructor.Event.FOCUSOUT;pe(i.element).on(e,i.config.selector,function(t){return i._enter(t)}).on(n,i.config.selector,function(t){return i._leave(t)})}pe(i.element).closest(".modal").on("hide.bs.modal",function(){return i.hide()})}),this.config.selector?this.config=l({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},t._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},t._enter=function(t,e){var n=this.constructor.DATA_KEY;(e=e||pe(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),pe(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusin"===t.type?Le:He]=!0),pe(e.getTipElement()).hasClass(ke)||e._hoverState===De?e._hoverState=De:(clearTimeout(e._timeout),e._hoverState=De,e.config.delay&&e.config.delay.show?e._timeout=setTimeout(function(){e._hoverState===De&&e.show()},e.config.delay.show):e.show())},t._leave=function(t,e){var n=this.constructor.DATA_KEY;(e=e||pe(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),pe(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusout"===t.type?Le:He]=!1),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState=we,e.config.delay&&e.config.delay.hide?e._timeout=setTimeout(function(){e._hoverState===we&&e.hide()},e.config.delay.hide):e.hide())},t._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},t._getConfig=function(t){return"number"==typeof(t=l({},this.constructor.Default,pe(this.element).data(),"object"==typeof t&&t?t:{})).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),Fn.typeCheckConfig(ve,t,this.constructor.DefaultType),t},t._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},t._cleanTipClass=function(){var t=pe(this.getTipElement()),e=t.attr("class").match(be);null!==e&&e.length&&t.removeClass(e.join(""))},t._handlePopperPlacementChange=function(t){var e=t.instance;this.tip=e.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},t._fixTransition=function(){var t=this.getTipElement(),e=this.config.animation;null===t.getAttribute("x-placement")&&(pe(t).removeClass(Oe),this.config.animation=!1,this.hide(),this.show(),this.config.animation=e)},i._jQueryInterface=function(n){return this.each(function(){var t=pe(this).data(ye),e="object"==typeof n&&n;if((t||!/dispose|hide/.test(n))&&(t||(t=new i(this,e),pe(this).data(ye,t)),"string"==typeof n)){if("undefined"==typeof t[n])throw new TypeError('No method named "'+n+'"');t[n]()}})},s(i,null,[{key:"VERSION",get:function(){return"4.1.3"}},{key:"Default",get:function(){return Ae}},{key:"NAME",get:function(){return ve}},{key:"DATA_KEY",get:function(){return ye}},{key:"Event",get:function(){return Ne}},{key:"EVENT_KEY",get:function(){return Ee}},{key:"DefaultType",get:function(){return Se}}]),i}(),pe.fn[ve]=We._jQueryInterface,pe.fn[ve].Constructor=We,pe.fn[ve].noConflict=function(){return pe.fn[ve]=Ce,We._jQueryInterface},We),Jn=(qe="popover",Ke="."+(Fe="bs.popover"),Me=(Ue=e).fn[qe],Qe="bs-popover",Be=new RegExp("(^|\\s)"+Qe+"\\S+","g"),Ve=l({},zn.Default,{placement:"right",trigger:"click",content:"",template:''}),Ye=l({},zn.DefaultType,{content:"(string|element|function)"}),ze="fade",Ze=".popover-header",Ge=".popover-body",$e={HIDE:"hide"+Ke,HIDDEN:"hidden"+Ke,SHOW:(Je="show")+Ke,SHOWN:"shown"+Ke,INSERTED:"inserted"+Ke,CLICK:"click"+Ke,FOCUSIN:"focusin"+Ke,FOCUSOUT:"focusout"+Ke,MOUSEENTER:"mouseenter"+Ke,MOUSELEAVE:"mouseleave"+Ke},Xe=function(t){var e,n;function i(){return t.apply(this,arguments)||this}n=t,(e=i).prototype=Object.create(n.prototype),(e.prototype.constructor=e).__proto__=n;var r=i.prototype;return r.isWithContent=function(){return this.getTitle()||this._getContent()},r.addAttachmentClass=function(t){Ue(this.getTipElement()).addClass(Qe+"-"+t)},r.getTipElement=function(){return this.tip=this.tip||Ue(this.config.template)[0],this.tip},r.setContent=function(){var t=Ue(this.getTipElement());this.setElementContent(t.find(Ze),this.getTitle());var e=this._getContent();"function"==typeof e&&(e=e.call(this.element)),this.setElementContent(t.find(Ge),e),t.removeClass(ze+" "+Je)},r._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},r._cleanTipClass=function(){var t=Ue(this.getTipElement()),e=t.attr("class").match(Be);null!==e&&0=this._offsets[r]&&("undefined"==typeof this._offsets[r+1]||t=0&&n0&&t-1 in e)}var E=function(e){var t,n,r,i,o,a,u,s,l,c,f,d,p,h,g,v,y,m,b,x="sizzle"+1*new Date,w=e.document,C=0,T=0,E=ae(),N=ae(),k=ae(),A=function(e,t){return e===t&&(f=!0),0},D={}.hasOwnProperty,S=[],L=S.pop,j=S.push,q=S.push,O=S.slice,P=function(e,t){for(var n=0,r=e.length;n+~]|"+I+")"+I+"*"),_=new RegExp("="+I+"*([^\\]'\"]*?)"+I+"*\\]","g"),U=new RegExp(M),V=new RegExp("^"+R+"$"),X={ID:new RegExp("^#("+R+")"),CLASS:new RegExp("^\\.("+R+")"),TAG:new RegExp("^("+R+"|[*])"),ATTR:new RegExp("^"+B),PSEUDO:new RegExp("^"+M),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+I+"*(even|odd|(([+-]|)(\\d*)n|)"+I+"*(?:([+-]|)"+I+"*(\\d+)|))"+I+"*\\)|)","i"),bool:new RegExp("^(?:"+H+")$","i"),needsContext:new RegExp("^"+I+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+I+"*((?:-\\d)?\\d*)"+I+"*\\)|)(?=[^-]|$)","i")},Q=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,G=/^[^{]+\{\s*\[native \w/,K=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,J=/[+~]/,Z=new RegExp("\\\\([\\da-f]{1,6}"+I+"?|("+I+")|.)","ig"),ee=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},te=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ne=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},re=function(){d()},ie=me(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{q.apply(S=O.call(w.childNodes),w.childNodes),S[w.childNodes.length].nodeType}catch(e){q={apply:S.length?function(e,t){j.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function oe(e,t,r,i){var o,u,l,c,f,h,y,m=t&&t.ownerDocument,C=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==C&&9!==C&&11!==C)return r;if(!i&&((t?t.ownerDocument||t:w)!==p&&d(t),t=t||p,g)){if(11!==C&&(f=K.exec(e)))if(o=f[1]){if(9===C){if(!(l=t.getElementById(o)))return r;if(l.id===o)return r.push(l),r}else if(m&&(l=m.getElementById(o))&&b(t,l)&&l.id===o)return r.push(l),r}else{if(f[2])return q.apply(r,t.getElementsByTagName(e)),r;if((o=f[3])&&n.getElementsByClassName&&t.getElementsByClassName)return q.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!k[e+" "]&&(!v||!v.test(e))){if(1!==C)m=t,y=e;else if("object"!==t.nodeName.toLowerCase()){(c=t.getAttribute("id"))?c=c.replace(te,ne):t.setAttribute("id",c=x),u=(h=a(e)).length;while(u--)h[u]="#"+c+" "+ye(h[u]);y=h.join(","),m=J.test(e)&&ge(t.parentNode)||t}if(y)try{return q.apply(r,m.querySelectorAll(y)),r}catch(e){}finally{c===x&&t.removeAttribute("id")}}}return s(e.replace($,"$1"),t,r,i)}function ae(){var e=[];function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}return t}function ue(e){return e[x]=!0,e}function se(e){var t=p.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function le(e,t){var n=e.split("|"),i=n.length;while(i--)r.attrHandle[n[i]]=t}function ce(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function fe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function de(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function pe(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ie(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function he(e){return ue(function(t){return t=+t,ue(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function ge(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}n=oe.support={},o=oe.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},d=oe.setDocument=function(e){var t,i,a=e?e.ownerDocument||e:w;return a!==p&&9===a.nodeType&&a.documentElement?(p=a,h=p.documentElement,g=!o(p),w!==p&&(i=p.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",re,!1):i.attachEvent&&i.attachEvent("onunload",re)),n.attributes=se(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=se(function(e){return e.appendChild(p.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=G.test(p.getElementsByClassName),n.getById=se(function(e){return h.appendChild(e).id=x,!p.getElementsByName||!p.getElementsByName(x).length}),n.getById?(r.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&g){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&g){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&g)return t.getElementsByClassName(e)},y=[],v=[],(n.qsa=G.test(p.querySelectorAll))&&(se(function(e){h.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+I+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+I+"*(?:value|"+H+")"),e.querySelectorAll("[id~="+x+"-]").length||v.push("~="),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+x+"+*").length||v.push(".#.+[+~]")}),se(function(e){e.innerHTML="";var t=p.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+I+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),h.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(n.matchesSelector=G.test(m=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&se(function(e){n.disconnectedMatch=m.call(e,"*"),m.call(e,"[s!='']:x"),y.push("!=",M)}),v=v.length&&new RegExp(v.join("|")),y=y.length&&new RegExp(y.join("|")),t=G.test(h.compareDocumentPosition),b=t||G.test(h.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},A=t?function(e,t){if(e===t)return f=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e===p||e.ownerDocument===w&&b(w,e)?-1:t===p||t.ownerDocument===w&&b(w,t)?1:c?P(c,e)-P(c,t):0:4&r?-1:1)}:function(e,t){if(e===t)return f=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],u=[t];if(!i||!o)return e===p?-1:t===p?1:i?-1:o?1:c?P(c,e)-P(c,t):0;if(i===o)return ce(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)u.unshift(n);while(a[r]===u[r])r++;return r?ce(a[r],u[r]):a[r]===w?-1:u[r]===w?1:0},p):p},oe.matches=function(e,t){return oe(e,null,null,t)},oe.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&d(e),t=t.replace(_,"='$1']"),n.matchesSelector&&g&&!k[t+" "]&&(!y||!y.test(t))&&(!v||!v.test(t)))try{var r=m.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return oe(t,p,null,[e]).length>0},oe.contains=function(e,t){return(e.ownerDocument||e)!==p&&d(e),b(e,t)},oe.attr=function(e,t){(e.ownerDocument||e)!==p&&d(e);var i=r.attrHandle[t.toLowerCase()],o=i&&D.call(r.attrHandle,t.toLowerCase())?i(e,t,!g):void 0;return void 0!==o?o:n.attributes||!g?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},oe.escape=function(e){return(e+"").replace(te,ne)},oe.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},oe.uniqueSort=function(e){var t,r=[],i=0,o=0;if(f=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(A),f){while(t=e[o++])t===e[o]&&(i=r.push(o));while(i--)e.splice(r[i],1)}return c=null,e},i=oe.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else while(t=e[r++])n+=i(t);return n},(r=oe.selectors={cacheLength:50,createPseudo:ue,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Z,ee),e[3]=(e[3]||e[4]||e[5]||"").replace(Z,ee),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||oe.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&oe.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return X.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&U.test(n)&&(t=a(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Z,ee).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=E[e+" "];return t||(t=new RegExp("(^|"+I+")"+e+"("+I+"|$)"))&&E(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=oe.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace(W," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),u="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,s){var l,c,f,d,p,h,g=o!==a?"nextSibling":"previousSibling",v=t.parentNode,y=u&&t.nodeName.toLowerCase(),m=!s&&!u,b=!1;if(v){if(o){while(g){d=t;while(d=d[g])if(u?d.nodeName.toLowerCase()===y:1===d.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?v.firstChild:v.lastChild],a&&m){b=(p=(l=(c=(f=(d=v)[x]||(d[x]={}))[d.uniqueID]||(f[d.uniqueID]={}))[e]||[])[0]===C&&l[1])&&l[2],d=p&&v.childNodes[p];while(d=++p&&d&&d[g]||(b=p=0)||h.pop())if(1===d.nodeType&&++b&&d===t){c[e]=[C,p,b];break}}else if(m&&(b=p=(l=(c=(f=(d=t)[x]||(d[x]={}))[d.uniqueID]||(f[d.uniqueID]={}))[e]||[])[0]===C&&l[1]),!1===b)while(d=++p&&d&&d[g]||(b=p=0)||h.pop())if((u?d.nodeName.toLowerCase()===y:1===d.nodeType)&&++b&&(m&&((c=(f=d[x]||(d[x]={}))[d.uniqueID]||(f[d.uniqueID]={}))[e]=[C,b]),d===t))break;return(b-=i)===r||b%r==0&&b/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||oe.error("unsupported pseudo: "+e);return i[x]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?ue(function(e,n){var r,o=i(e,t),a=o.length;while(a--)e[r=P(e,o[a])]=!(n[r]=o[a])}):function(e){return i(e,0,n)}):i}},pseudos:{not:ue(function(e){var t=[],n=[],r=u(e.replace($,"$1"));return r[x]?ue(function(e,t,n,i){var o,a=r(e,null,i,[]),u=e.length;while(u--)(o=a[u])&&(e[u]=!(t[u]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}}),has:ue(function(e){return function(t){return oe(e,t).length>0}}),contains:ue(function(e){return e=e.replace(Z,ee),function(t){return(t.textContent||t.innerText||i(t)).indexOf(e)>-1}}),lang:ue(function(e){return V.test(e||"")||oe.error("unsupported lang: "+e),e=e.replace(Z,ee).toLowerCase(),function(t){var n;do{if(n=g?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===h},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:pe(!1),disabled:pe(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return Y.test(e.nodeName)},input:function(e){return Q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:he(function(){return[0]}),last:he(function(e,t){return[t-1]}),eq:he(function(e,t,n){return[n<0?n+t:n]}),even:he(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:he(function(e,t,n){for(var r=n<0?n+t:n;++r1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function xe(e,t,n){for(var r=0,i=t.length;r-1&&(o[l]=!(a[l]=f))}}else y=we(y===a?y.splice(h,y.length):y),i?i(null,a,y,s):q.apply(a,y)})}function Te(e){for(var t,n,i,o=e.length,a=r.relative[e[0].type],u=a||r.relative[" "],s=a?1:0,c=me(function(e){return e===t},u,!0),f=me(function(e){return P(t,e)>-1},u,!0),d=[function(e,n,r){var i=!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):f(e,n,r));return t=null,i}];s1&&be(d),s>1&&ye(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace($,"$1"),n,s0,i=e.length>0,o=function(o,a,u,s,c){var f,h,v,y=0,m="0",b=o&&[],x=[],w=l,T=o||i&&r.find.TAG("*",c),E=C+=null==w?1:Math.random()||.1,N=T.length;for(c&&(l=a===p||a||c);m!==N&&null!=(f=T[m]);m++){if(i&&f){h=0,a||f.ownerDocument===p||(d(f),u=!g);while(v=e[h++])if(v(f,a||p,u)){s.push(f);break}c&&(C=E)}n&&((f=!v&&f)&&y--,o&&b.push(f))}if(y+=m,n&&m!==y){h=0;while(v=t[h++])v(b,x,a,u);if(o){if(y>0)while(m--)b[m]||x[m]||(x[m]=L.call(s));x=we(x)}q.apply(s,x),c&&!o&&x.length>0&&y+t.length>1&&oe.uniqueSort(s)}return c&&(C=E,l=w),b};return n?ue(o):o}return u=oe.compile=function(e,t){var n,r=[],i=[],o=k[e+" "];if(!o){t||(t=a(e)),n=t.length;while(n--)(o=Te(t[n]))[x]?r.push(o):i.push(o);(o=k(e,Ee(i,r))).selector=e}return o},s=oe.select=function(e,t,n,i){var o,s,l,c,f,d="function"==typeof e&&e,p=!i&&a(e=d.selector||e);if(n=n||[],1===p.length){if((s=p[0]=p[0].slice(0)).length>2&&"ID"===(l=s[0]).type&&9===t.nodeType&&g&&r.relative[s[1].type]){if(!(t=(r.find.ID(l.matches[0].replace(Z,ee),t)||[])[0]))return n;d&&(t=t.parentNode),e=e.slice(s.shift().value.length)}o=X.needsContext.test(e)?0:s.length;while(o--){if(l=s[o],r.relative[c=l.type])break;if((f=r.find[c])&&(i=f(l.matches[0].replace(Z,ee),J.test(s[0].type)&&ge(t.parentNode)||t))){if(s.splice(o,1),!(e=i.length&&ye(s)))return q.apply(n,i),n;break}}}return(d||u(e,p))(i,t,!g,n,!t||J.test(e)&&ge(t.parentNode)||t),n},n.sortStable=x.split("").sort(A).join("")===x,n.detectDuplicates=!!f,d(),n.sortDetached=se(function(e){return 1&e.compareDocumentPosition(p.createElement("fieldset"))}),se(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||le("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&se(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||le("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),se(function(e){return null==e.getAttribute("disabled")})||le(H,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),oe}(e);w.find=E,w.expr=E.selectors,w.expr[":"]=w.expr.pseudos,w.uniqueSort=w.unique=E.uniqueSort,w.text=E.getText,w.isXMLDoc=E.isXML,w.contains=E.contains,w.escapeSelector=E.escape;var N=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&w(e).is(n))break;r.push(e)}return r},k=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},A=w.expr.match.needsContext;function D(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var S=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function L(e,t,n){return g(t)?w.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?w.grep(e,function(e){return e===t!==n}):"string"!=typeof t?w.grep(e,function(e){return s.call(t,e)>-1!==n}):w.filter(t,e,n)}w.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?w.find.matchesSelector(r,e)?[r]:[]:w.find.matches(e,w.grep(t,function(e){return 1===e.nodeType}))},w.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(w(e).filter(function(){for(t=0;t1?w.uniqueSort(n):n},filter:function(e){return this.pushStack(L(this,e||[],!1))},not:function(e){return this.pushStack(L(this,e||[],!0))},is:function(e){return!!L(this,"string"==typeof e&&A.test(e)?w(e):e||[],!1).length}});var j,q=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(w.fn.init=function(e,t,n){var i,o;if(!e)return this;if(n=n||j,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:q.exec(e))||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof w?t[0]:t,w.merge(this,w.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:r,!0)),S.test(i[1])&&w.isPlainObject(t))for(i in t)g(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return(o=r.getElementById(i[2]))&&(this[0]=o,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):g(e)?void 0!==n.ready?n.ready(e):e(w):w.makeArray(e,this)}).prototype=w.fn,j=w(r);var O=/^(?:parents|prev(?:Until|All))/,P={children:!0,contents:!0,next:!0,prev:!0};w.fn.extend({has:function(e){var t=w(e,this),n=t.length;return this.filter(function(){for(var e=0;e-1:1===n.nodeType&&w.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?w.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?s.call(w(e),this[0]):s.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(w.uniqueSort(w.merge(this.get(),w(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function H(e,t){while((e=e[t])&&1!==e.nodeType);return e}w.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return N(e,"parentNode")},parentsUntil:function(e,t,n){return N(e,"parentNode",n)},next:function(e){return H(e,"nextSibling")},prev:function(e){return H(e,"previousSibling")},nextAll:function(e){return N(e,"nextSibling")},prevAll:function(e){return N(e,"previousSibling")},nextUntil:function(e,t,n){return N(e,"nextSibling",n)},prevUntil:function(e,t,n){return N(e,"previousSibling",n)},siblings:function(e){return k((e.parentNode||{}).firstChild,e)},children:function(e){return k(e.firstChild)},contents:function(e){return D(e,"iframe")?e.contentDocument:(D(e,"template")&&(e=e.content||e),w.merge([],e.childNodes))}},function(e,t){w.fn[e]=function(n,r){var i=w.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=w.filter(r,i)),this.length>1&&(P[e]||w.uniqueSort(i),O.test(e)&&i.reverse()),this.pushStack(i)}});var I=/[^\x20\t\r\n\f]+/g;function R(e){var t={};return w.each(e.match(I)||[],function(e,n){t[n]=!0}),t}w.Callbacks=function(e){e="string"==typeof e?R(e):w.extend({},e);var t,n,r,i,o=[],a=[],u=-1,s=function(){for(i=i||e.once,r=t=!0;a.length;u=-1){n=a.shift();while(++u-1)o.splice(n,1),n<=u&&u--}),this},has:function(e){return e?w.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||s()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l};function B(e){return e}function M(e){throw e}function W(e,t,n,r){var i;try{e&&g(i=e.promise)?i.call(e).done(t).fail(n):e&&g(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}w.extend({Deferred:function(t){var n=[["notify","progress",w.Callbacks("memory"),w.Callbacks("memory"),2],["resolve","done",w.Callbacks("once memory"),w.Callbacks("once memory"),0,"resolved"],["reject","fail",w.Callbacks("once memory"),w.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},"catch":function(e){return i.then(null,e)},pipe:function(){var e=arguments;return w.Deferred(function(t){w.each(n,function(n,r){var i=g(e[r[4]])&&e[r[4]];o[r[1]](function(){var e=i&&i.apply(this,arguments);e&&g(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(t,r,i){var o=0;function a(t,n,r,i){return function(){var u=this,s=arguments,l=function(){var e,l;if(!(t=o&&(r!==M&&(u=void 0,s=[e]),n.rejectWith(u,s))}};t?c():(w.Deferred.getStackHook&&(c.stackTrace=w.Deferred.getStackHook()),e.setTimeout(c))}}return w.Deferred(function(e){n[0][3].add(a(0,e,g(i)?i:B,e.notifyWith)),n[1][3].add(a(0,e,g(t)?t:B)),n[2][3].add(a(0,e,g(r)?r:M))}).promise()},promise:function(e){return null!=e?w.extend(e,i):i}},o={};return w.each(n,function(e,t){var a=t[2],u=t[5];i[t[1]]=a.add,u&&a.add(function(){r=u},n[3-e][2].disable,n[3-e][3].disable,n[0][2].lock,n[0][3].lock),a.add(t[3].fire),o[t[0]]=function(){return o[t[0]+"With"](this===o?void 0:this,arguments),this},o[t[0]+"With"]=a.fireWith}),i.promise(o),t&&t.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=o.call(arguments),a=w.Deferred(),u=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?o.call(arguments):n,--t||a.resolveWith(r,i)}};if(t<=1&&(W(e,a.done(u(n)).resolve,a.reject,!t),"pending"===a.state()||g(i[n]&&i[n].then)))return a.then();while(n--)W(i[n],u(n),a.reject);return a.promise()}});var $=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;w.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&$.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},w.readyException=function(t){e.setTimeout(function(){throw t})};var F=w.Deferred();w.fn.ready=function(e){return F.then(e)["catch"](function(e){w.readyException(e)}),this},w.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--w.readyWait:w.isReady)||(w.isReady=!0,!0!==e&&--w.readyWait>0||F.resolveWith(r,[w]))}}),w.ready.then=F.then;function z(){r.removeEventListener("DOMContentLoaded",z),e.removeEventListener("load",z),w.ready()}"complete"===r.readyState||"loading"!==r.readyState&&!r.documentElement.doScroll?e.setTimeout(w.ready):(r.addEventListener("DOMContentLoaded",z),e.addEventListener("load",z));var _=function(e,t,n,r,i,o,a){var u=0,s=e.length,l=null==n;if("object"===b(n)){i=!0;for(u in n)_(e,t,u,n[u],!0,o,a)}else if(void 0!==r&&(i=!0,g(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(w(e),n)})),t))for(;u1,null,!0)},removeData:function(e){return this.each(function(){J.remove(this,e)})}}),w.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=K.get(e,t),n&&(!r||Array.isArray(n)?r=K.access(e,t,w.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=w.queue(e,t),r=n.length,i=n.shift(),o=w._queueHooks(e,t),a=function(){w.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return K.get(e,n)||K.access(e,n,{empty:w.Callbacks("once memory").add(function(){K.remove(e,[t+"queue",n])})})}}),w.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]+)/i,he=/^$|^module$|\/(?:java|ecma)script/i,ge={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};ge.optgroup=ge.option,ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td;function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&D(e,t)?w.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n-1)i&&i.push(o);else if(l=w.contains(o.ownerDocument,o),a=ve(f.appendChild(o),"script"),l&&ye(a),n){c=0;while(o=a[c++])he.test(o.type||"")&&n.push(o)}return f}!function(){var e=r.createDocumentFragment().appendChild(r.createElement("div")),t=r.createElement("input");t.setAttribute("type","radio"),t.setAttribute("checked","checked"),t.setAttribute("name","t"),e.appendChild(t),h.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,e.innerHTML="",h.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue}();var xe=r.documentElement,we=/^key/,Ce=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Te=/^([^.]*)(?:\.(.+)|)/;function Ee(){return!0}function Ne(){return!1}function ke(){try{return r.activeElement}catch(e){}}function Ae(e,t,n,r,i,o){var a,u;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(u in t)Ae(e,u,n,r,t[u],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Ne;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return w().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=w.guid++)),e.each(function(){w.event.add(this,t,i,r,n)})}w.event={global:{},add:function(e,t,n,r,i){var o,a,u,s,l,c,f,d,p,h,g,v=K.get(e);if(v){n.handler&&(n=(o=n).handler,i=o.selector),i&&w.find.matchesSelector(xe,i),n.guid||(n.guid=w.guid++),(s=v.events)||(s=v.events={}),(a=v.handle)||(a=v.handle=function(t){return"undefined"!=typeof w&&w.event.triggered!==t.type?w.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(I)||[""]).length;while(l--)p=g=(u=Te.exec(t[l])||[])[1],h=(u[2]||"").split(".").sort(),p&&(f=w.event.special[p]||{},p=(i?f.delegateType:f.bindType)||p,f=w.event.special[p]||{},c=w.extend({type:p,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&w.expr.match.needsContext.test(i),namespace:h.join(".")},o),(d=s[p])||((d=s[p]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(p,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,c):d.push(c),w.event.global[p]=!0)}},remove:function(e,t,n,r,i){var o,a,u,s,l,c,f,d,p,h,g,v=K.hasData(e)&&K.get(e);if(v&&(s=v.events)){l=(t=(t||"").match(I)||[""]).length;while(l--)if(u=Te.exec(t[l])||[],p=g=u[1],h=(u[2]||"").split(".").sort(),p){f=w.event.special[p]||{},d=s[p=(r?f.delegateType:f.bindType)||p]||[],u=u[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=d.length;while(o--)c=d[o],!i&&g!==c.origType||n&&n.guid!==c.guid||u&&!u.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(d.splice(o,1),c.selector&&d.delegateCount--,f.remove&&f.remove.call(e,c));a&&!d.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||w.removeEvent(e,p,v.handle),delete s[p])}else for(p in s)w.event.remove(e,p+t[l],n,r,!0);w.isEmptyObject(s)&&K.remove(e,"handle events")}},dispatch:function(e){var t=w.event.fix(e),n,r,i,o,a,u,s=new Array(arguments.length),l=(K.get(this,"events")||{})[t.type]||[],c=w.event.special[t.type]||{};for(s[0]=t,n=1;n=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n-1:w.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&u.push({elem:l,handlers:o})}return l=this,s\x20\t\r\n\f]*)[^>]*)\/>/gi,Se=/\s*$/g;function qe(e,t){return D(e,"table")&&D(11!==t.nodeType?t:t.firstChild,"tr")?w(e).children("tbody")[0]||e:e}function Oe(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Pe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function He(e,t){var n,r,i,o,a,u,s,l;if(1===t.nodeType){if(K.hasData(e)&&(o=K.access(e),a=K.set(t,o),l=o.events)){delete a.handle,a.events={};for(i in l)for(n=0,r=l[i].length;n1&&"string"==typeof v&&!h.checkClone&&Le.test(v))return e.each(function(i){var o=e.eq(i);y&&(t[0]=v.call(this,i,o.html())),Re(o,t,n,r)});if(d&&(i=be(t,e[0].ownerDocument,!1,e,r),o=i.firstChild,1===i.childNodes.length&&(i=o),o||r)){for(s=(u=w.map(ve(i,"script"),Oe)).length;f")},clone:function(e,t,n){var r,i,o,a,u=e.cloneNode(!0),s=w.contains(e.ownerDocument,e);if(!(h.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||w.isXMLDoc(e)))for(a=ve(u),r=0,i=(o=ve(e)).length;r0&&ye(a,!s&&ve(e,"script")),u},cleanData:function(e){for(var t,n,r,i=w.event.special,o=0;void 0!==(n=e[o]);o++)if(Y(n)){if(t=n[K.expando]){if(t.events)for(r in t.events)i[r]?w.event.remove(n,r):w.removeEvent(n,r,t.handle);n[K.expando]=void 0}n[J.expando]&&(n[J.expando]=void 0)}}}),w.fn.extend({detach:function(e){return Be(this,e,!0)},remove:function(e){return Be(this,e)},text:function(e){return _(this,function(e){return void 0===e?w.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Re(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||qe(this,e).appendChild(e)})},prepend:function(){return Re(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=qe(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Re(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Re(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(w.cleanData(ve(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return w.clone(this,e,t)})},html:function(e){return _(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Se.test(e)&&!ge[(pe.exec(e)||["",""])[1].toLowerCase()]){e=w.htmlPrefilter(e);try{for(;n=0&&(s+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-s-u-.5))),s}function et(e,t,n){var r=We(e),i=Fe(e,t,r),o="border-box"===w.css(e,"boxSizing",!1,r),a=o;if(Me.test(i)){if(!n)return i;i="auto"}return a=a&&(h.boxSizingReliable()||i===e.style[t]),("auto"===i||!parseFloat(i)&&"inline"===w.css(e,"display",!1,r))&&(i=e["offset"+t[0].toUpperCase()+t.slice(1)],a=!0),(i=parseFloat(i)||0)+Ze(e,t,n||(o?"border":"content"),a,r,i)+"px"}w.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Fe(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,u=Q(t),s=Ue.test(t),l=e.style;if(s||(t=Ke(u)),a=w.cssHooks[t]||w.cssHooks[u],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"==(o=typeof n)&&(i=ie.exec(n))&&i[1]&&(n=se(e,t,i),o="number"),null!=n&&n===n&&("number"===o&&(n+=i&&i[3]||(w.cssNumber[u]?"":"px")),h.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(s?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,u=Q(t);return Ue.test(t)||(t=Ke(u)),(a=w.cssHooks[t]||w.cssHooks[u])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Fe(e,t,r)),"normal"===i&&t in Xe&&(i=Xe[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),w.each(["height","width"],function(e,t){w.cssHooks[t]={get:function(e,n,r){if(n)return!_e.test(w.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?et(e,t,r):ue(e,Ve,function(){return et(e,t,r)})},set:function(e,n,r){var i,o=We(e),a="border-box"===w.css(e,"boxSizing",!1,o),u=r&&Ze(e,t,r,a,o);return a&&h.scrollboxSize()===o.position&&(u-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-Ze(e,t,"border",!1,o)-.5)),u&&(i=ie.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=w.css(e,t)),Je(e,n,u)}}}),w.cssHooks.marginLeft=ze(h.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Fe(e,"marginLeft"))||e.getBoundingClientRect().left-ue(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),w.each({margin:"",padding:"",border:"Width"},function(e,t){w.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+oe[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(w.cssHooks[e+t].set=Je)}),w.fn.extend({css:function(e,t){return _(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=We(e),i=t.length;a1)}}),w.fn.delay=function(t,n){return t=w.fx?w.fx.speeds[t]||t:t,n=n||"fx",this.queue(n,function(n,r){var i=e.setTimeout(n,t);r.stop=function(){e.clearTimeout(i)}})},function(){var e=r.createElement("input"),t=r.createElement("select").appendChild(r.createElement("option"));e.type="checkbox",h.checkOn=""!==e.value,h.optSelected=t.selected,(e=r.createElement("input")).value="t",e.type="radio",h.radioValue="t"===e.value}();var tt,nt=w.expr.attrHandle;w.fn.extend({attr:function(e,t){return _(this,w.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){w.removeAttr(this,e)})}}),w.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?w.prop(e,t,n):(1===o&&w.isXMLDoc(e)||(i=w.attrHooks[t.toLowerCase()]||(w.expr.match.bool.test(t)?tt:void 0)),void 0!==n?null===n?void w.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=w.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!h.radioValue&&"radio"===t&&D(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(I);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),tt={set:function(e,t,n){return!1===t?w.removeAttr(e,n):e.setAttribute(n,n),n}},w.each(w.expr.match.bool.source.match(/\w+/g),function(e,t){var n=nt[t]||w.find.attr;nt[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=nt[a],nt[a]=i,i=null!=n(e,t,r)?a:null,nt[a]=o),i}});var rt=/^(?:input|select|textarea|button)$/i,it=/^(?:a|area)$/i;w.fn.extend({prop:function(e,t){return _(this,w.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[w.propFix[e]||e]})}}),w.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&w.isXMLDoc(e)||(t=w.propFix[t]||t,i=w.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=w.find.attr(e,"tabindex");return t?parseInt(t,10):rt.test(e.nodeName)||it.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),h.optSelected||(w.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),w.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){w.propFix[this.toLowerCase()]=this});function ot(e){return(e.match(I)||[]).join(" ")}function at(e){return e.getAttribute&&e.getAttribute("class")||""}function ut(e){return Array.isArray(e)?e:"string"==typeof e?e.match(I)||[]:[]}w.fn.extend({addClass:function(e){var t,n,r,i,o,a,u,s=0;if(g(e))return this.each(function(t){w(this).addClass(e.call(this,t,at(this)))});if((t=ut(e)).length)while(n=this[s++])if(i=at(n),r=1===n.nodeType&&" "+ot(i)+" "){a=0;while(o=t[a++])r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(u=ot(r))&&n.setAttribute("class",u)}return this},removeClass:function(e){var t,n,r,i,o,a,u,s=0;if(g(e))return this.each(function(t){w(this).removeClass(e.call(this,t,at(this)))});if(!arguments.length)return this.attr("class","");if((t=ut(e)).length)while(n=this[s++])if(i=at(n),r=1===n.nodeType&&" "+ot(i)+" "){a=0;while(o=t[a++])while(r.indexOf(" "+o+" ")>-1)r=r.replace(" "+o+" "," ");i!==(u=ot(r))&&n.setAttribute("class",u)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):g(e)?this.each(function(n){w(this).toggleClass(e.call(this,n,at(this),t),t)}):this.each(function(){var t,i,o,a;if(r){i=0,o=w(this),a=ut(e);while(t=a[i++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else void 0!==e&&"boolean"!==n||((t=at(this))&&K.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":K.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&(" "+ot(at(n))+" ").indexOf(t)>-1)return!0;return!1}});var st=/\r/g;w.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=g(e),this.each(function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,w(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=w.map(i,function(e){return null==e?"":e+""})),(t=w.valHooks[this.type]||w.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return(t=w.valHooks[i.type]||w.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(st,""):null==n?"":n}}}),w.extend({valHooks:{option:{get:function(e){var t=w.find.attr(e,"value");return null!=t?t:ot(w.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,u=a?null:[],s=a?o+1:i.length;for(r=o<0?s:a?o:0;r-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),w.each(["radio","checkbox"],function(){w.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=w.inArray(w(e).val(),t)>-1}},h.checkOn||(w.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),h.focusin="onfocusin"in e;var lt=/^(?:focusinfocus|focusoutblur)$/,ct=function(e){e.stopPropagation()};w.extend(w.event,{trigger:function(t,n,i,o){var a,u,s,l,c,d,p,h,y=[i||r],m=f.call(t,"type")?t.type:t,b=f.call(t,"namespace")?t.namespace.split("."):[];if(u=h=s=i=i||r,3!==i.nodeType&&8!==i.nodeType&&!lt.test(m+w.event.triggered)&&(m.indexOf(".")>-1&&(m=(b=m.split(".")).shift(),b.sort()),c=m.indexOf(":")<0&&"on"+m,t=t[w.expando]?t:new w.Event(m,"object"==typeof t&&t),t.isTrigger=o?2:3,t.namespace=b.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),n=null==n?[t]:w.makeArray(n,[t]),p=w.event.special[m]||{},o||!p.trigger||!1!==p.trigger.apply(i,n))){if(!o&&!p.noBubble&&!v(i)){for(l=p.delegateType||m,lt.test(l+m)||(u=u.parentNode);u;u=u.parentNode)y.push(u),s=u;s===(i.ownerDocument||r)&&y.push(s.defaultView||s.parentWindow||e)}a=0;while((u=y[a++])&&!t.isPropagationStopped())h=u,t.type=a>1?l:p.bindType||m,(d=(K.get(u,"events")||{})[t.type]&&K.get(u,"handle"))&&d.apply(u,n),(d=c&&u[c])&&d.apply&&Y(u)&&(t.result=d.apply(u,n),!1===t.result&&t.preventDefault());return t.type=m,o||t.isDefaultPrevented()||p._default&&!1!==p._default.apply(y.pop(),n)||!Y(i)||c&&g(i[m])&&!v(i)&&((s=i[c])&&(i[c]=null),w.event.triggered=m,t.isPropagationStopped()&&h.addEventListener(m,ct),i[m](),t.isPropagationStopped()&&h.removeEventListener(m,ct),w.event.triggered=void 0,s&&(i[c]=s)),t.result}},simulate:function(e,t,n){var r=w.extend(new w.Event,n,{type:e,isSimulated:!0});w.event.trigger(r,null,t)}}),w.fn.extend({trigger:function(e,t){return this.each(function(){w.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return w.event.trigger(e,t,n,!0)}}),h.focusin||w.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){w.event.simulate(t,e.target,w.event.fix(e))};w.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=K.access(r,t);i||r.addEventListener(e,n,!0),K.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=K.access(r,t)-1;i?K.access(r,t,i):(r.removeEventListener(e,n,!0),K.remove(r,t))}}});var ft=/\[\]$/,dt=/\r?\n/g,pt=/^(?:submit|button|image|reset|file)$/i,ht=/^(?:input|select|textarea|keygen)/i;function gt(e,t,n,r){var i;if(Array.isArray(t))w.each(t,function(t,i){n||ft.test(e)?r(e,i):gt(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)});else if(n||"object"!==b(t))r(e,t);else for(i in t)gt(e+"["+i+"]",t[i],n,r)}w.param=function(e,t){var n,r=[],i=function(e,t){var n=g(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.jquery&&!w.isPlainObject(e))w.each(e,function(){i(this.name,this.value)});else for(n in e)gt(n,e[n],t,i);return r.join("&")},w.fn.extend({serialize:function(){return w.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=w.prop(this,"elements");return e?w.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!w(this).is(":disabled")&&ht.test(this.nodeName)&&!pt.test(e)&&(this.checked||!de.test(e))}).map(function(e,t){var n=w(this).val();return null==n?null:Array.isArray(n)?w.map(n,function(e){return{name:t.name,value:e.replace(dt,"\r\n")}}):{name:t.name,value:n.replace(dt,"\r\n")}}).get()}}),w.fn.extend({wrapAll:function(e){var t;return this[0]&&(g(e)&&(e=e.call(this[0])),t=w(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return g(e)?this.each(function(t){w(this).wrapInner(e.call(this,t))}):this.each(function(){var t=w(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=g(e);return this.each(function(n){w(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){w(this).replaceWith(this.childNodes)}),this}}),w.expr.pseudos.hidden=function(e){return!w.expr.pseudos.visible(e)},w.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},h.createHTMLDocument=function(){var e=r.implementation.createHTMLDocument("").body;return e.innerHTML="
",2===e.childNodes.length}(),w.parseHTML=function(e,t,n){if("string"!=typeof e)return[];"boolean"==typeof t&&(n=t,t=!1);var i,o,a;return t||(h.createHTMLDocument?((i=(t=r.implementation.createHTMLDocument("")).createElement("base")).href=r.location.href,t.head.appendChild(i)):t=r),o=S.exec(e),a=!n&&[],o?[t.createElement(o[1])]:(o=be([e],t,a),a&&a.length&&w(a).remove(),w.merge([],o.childNodes))},w.offset={setOffset:function(e,t,n){var r,i,o,a,u,s,l,c=w.css(e,"position"),f=w(e),d={};"static"===c&&(e.style.position="relative"),u=f.offset(),o=w.css(e,"top"),s=w.css(e,"left"),(l=("absolute"===c||"fixed"===c)&&(o+s).indexOf("auto")>-1)?(a=(r=f.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(s)||0),g(t)&&(t=t.call(e,n,w.extend({},u))),null!=t.top&&(d.top=t.top-u.top+a),null!=t.left&&(d.left=t.left-u.left+i),"using"in t?t.using.call(e,d):f.css(d)}},w.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){w.offset.setOffset(this,e,t)});var t,n,r=this[0];if(r)return r.getClientRects().length?(t=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===w.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===w.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=w(e).offset()).top+=w.css(e,"borderTopWidth",!0),i.left+=w.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-w.css(r,"marginTop",!0),left:t.left-i.left-w.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===w.css(e,"position"))e=e.offsetParent;return e||xe})}}),w.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;w.fn[e]=function(r){return _(this,function(e,r,i){var o;if(v(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===i)return o?o[t]:e[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i},e,r,arguments.length)}}),w.each(["top","left"],function(e,t){w.cssHooks[t]=ze(h.pixelPosition,function(e,n){if(n)return n=Fe(e,t),Me.test(n)?w(e).position()[t]+"px":n})}),w.each({Height:"height",Width:"width"},function(e,t){w.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){w.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),u=n||(!0===i||!0===o?"margin":"border");return _(this,function(t,n,i){var o;return v(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?w.css(t,n,u):w.style(t,n,i,u)},t,a?i:void 0,a)}})}),w.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){w.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),w.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),w.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),w.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),g(e))return r=o.call(arguments,2),i=function(){return e.apply(t||this,r.concat(o.call(arguments)))},i.guid=e.guid=e.guid||w.guid++,i},w.holdReady=function(e){e?w.readyWait++:w.ready(!0)},w.isArray=Array.isArray,w.parseJSON=JSON.parse,w.nodeName=D,w.isFunction=g,w.isWindow=v,w.camelCase=Q,w.type=b,w.now=Date.now,w.isNumeric=function(e){var t=w.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},"function"==typeof define&&define.amd&&define("jquery",[],function(){return w});var vt=e.jQuery,yt=e.$;return w.noConflict=function(t){return e.$===w&&(e.$=yt),t&&e.jQuery===w&&(e.jQuery=vt),w},t||(e.jQuery=e.$=w),w}); 3 | -------------------------------------------------------------------------------- /static/style/main.css: -------------------------------------------------------------------------------- 1 | body { 2 | height: 100%; 3 | color: #373737; 4 | background: #f8f8f8; 5 | } 6 | footer { 7 | padding-top: 40px; 8 | padding-bottom: 40px; 9 | margin-top: 40px; 10 | border-top: 1px solid #dd0000; 11 | font-style: italic; 12 | } 13 | .h1, h1 { 14 | font-size: 48px; 15 | } 16 | .h2, h2 { 17 | font-size: 36px; 18 | } 19 | .h3, h3 { 20 | font-size: 24px; 21 | line-height: 28px; 22 | border-top: 1px solid #dd0000; 23 | padding-top: 8px; 24 | } 25 | .h4, h4 { 26 | font-size: 20px; 27 | font-weight: bold; 28 | border-bottom: 1px dotted #dd0000; 29 | padding-top: 8px; 30 | padding-bottom: 8px; 31 | } 32 | .h5,h5{ 33 | font-size:16px; 34 | font-weight: bold; 35 | } 36 | .h6,h6{ 37 | font-size:14px; 38 | font-weight: bold; 39 | } 40 | hr { 41 | border-top: 1px dotted #dd0000; 42 | } 43 | a { 44 | color: #0066bb; 45 | } 46 | a:hover { 47 | color: #ff8c00; 48 | text-decoration:underline; 49 | } 50 | /*----------------------------------------------------------------------*/ 51 | .navbar-collapse > .navbar-nav > .nav-link { 52 | color: #2f4f4f; 53 | font-size: 18px; 54 | position: relative; 55 | letter-spacing: -0.35px; 56 | } 57 | .navbar-collapse > .navbar-nav > .nav-link:before { 58 | content: ""; 59 | position: absolute; 60 | bottom: 0; 61 | width: 0; 62 | left: 0; 63 | height: 2px; 64 | margin: 1px 0 0; 65 | opacity: 0; 66 | background-color: #2f4f4f; 67 | } 68 | .navbar-collapse >.navbar-nav > .nav-link:hover { 69 | color: #dd0000; 70 | cursor: pointer; 71 | } 72 | .navbar-collapse >.navbar-nav > .nav-link:hover:before { 73 | background-color: #dd0000; 74 | width: 100%; 75 | opacity: 1; 76 | } 77 | .navbar-collapse >.navbar-nav > .nav-link.active:before { 78 | background-color: #dd0000; 79 | width: 100%; 80 | opacity: 1; 81 | } 82 | .dropdown-item { 83 | font-weight: bold; 84 | font-size: 18px; 85 | } 86 | .dropdown-item:focus { 87 | background-color: #333840; 88 | } 89 | .navbar-brand > img { 90 | width: 210px; 91 | } 92 | @media only screen and (max-width: 400px) { 93 | .navbar-brand > img { 94 | width: 180px; 95 | } 96 | } 97 | @media only screen and (max-width: 350px) { 98 | .navbar-brand > img { 99 | width: 150px; 100 | } 101 | } 102 | @media only screen and (max-width: 300px) { 103 | .navbar-brand > img { 104 | width: 120px; 105 | } 106 | } 107 | @media only screen and (max-width: 250px) { 108 | .navbar-brand > img { 109 | width: 90px; 110 | } 111 | } 112 | /*----------------------------------------------------------------------*/ 113 | nav.toc:not(:empty):before { 114 | content: "Table of Contents"; 115 | color: #2f4f4f; 116 | font-weight: bold; 117 | width: 100%; 118 | border-bottom: 1px solid #dd0000; 119 | display: block; 120 | } 121 | nav.toc > ul { 122 | list-style: none; 123 | padding-left: 0px; 124 | } 125 | nav.toc > ul a { 126 | color: #2f4f4f; 127 | } 128 | nav.toc > ul a:hover { 129 | color: #dd0000; 130 | } 131 | @media only screen and (min-width: 1520px) { 132 | nav.toc { 133 | position: fixed; 134 | top: 16px; 135 | padding-bottom: 16px; 136 | margin-left: -360px; 137 | width: 340px; 138 | height: calc(100% - 48px); 139 | max-height: calc(100% - 48px); 140 | } 141 | } 142 | @media only screen and (max-width: 1520px) { 143 | nav.toc { 144 | overflow: auto; 145 | padding: 8px; 146 | } 147 | } 148 | /*----------------------------------------------------------------------*/ 149 | .page-header { 150 | margin-top: 0px; 151 | } 152 | .panel-title > td { 153 | border-top: 0 !important; 154 | border-radius: 4px; 155 | } 156 | .table-striped { 157 | border: 1px solid #ddd; 158 | border-collapse: separate; 159 | border-radius: 4px; 160 | border-spacing: 0; 161 | padding: 1px; 162 | -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .05); 163 | box-shadow: 0 1px 1px rgba(0, 0, 0, .05); 164 | } 165 | .table-striped > tbody > tr:nth-child(odd) > td, 166 | .table-striped > tbody > tr:nth-child(odd) > th { 167 | background-color: #f3f3f3; 168 | } 169 | -------------------------------------------------------------------------------- /templates/footer.inc: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 |

This page is maintained by the GDC Developers 6 | on github. 7 |

8 |

Verbatim copying and distribution of this entire article is permitted in 9 | any medium, provided this notice is preserved. 10 |

11 |
12 | 13 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /templates/header.inc: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | GDC - D Programming Language for GCC 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 31 |
32 | 33 |
34 | 35 | -------------------------------------------------------------------------------- /templates/menu.inc: -------------------------------------------------------------------------------- 1 | 11 | -------------------------------------------------------------------------------- /views/contributing.md: -------------------------------------------------------------------------------- 1 | [//]: # (Permission is granted to make and distribute verbatim copies) 2 | [//]: # (of this entire document without royalty provided the) 3 | [//]: # (copyright notice and this permission notice are preserved.) 4 | 5 | ### Contributing to GDC ### 6 | 7 | GDC is currently developed by a very small group. While the addition of a 8 | D front-end to GCC represents a great step forward for D, it also 9 | represents an informal promise by the D community to keep the D frontend 10 | up to date with the latest GCC development. 11 | 12 | If you use GDC, we encourage you to try to contribute, whether by 13 | submitting bugfixes, new features, documentation updates, web page 14 | improvements, etc. In the past, GDC has nearly died due to poor 15 | communication and lack of development. Avoiding those issues is easier 16 | than ever before, but GDC will always need a community that's willing to 17 | give back. 18 | 19 | For access to the current development sources of GDC, visit [our git 20 | repository][git]. Documentation on GDC is available from [the wiki][wiki]. 21 | 22 | If you are looking for a project to help improve GDC, check the [project 23 | ideas][ideas] page. 24 | 25 | Feel free to contact me via [email][mailto] or message me at [#d-gdc][irc] on 26 | Libera.Chat. 27 | 28 | [git]: https://github.com/D-Programming-GDC/GCC 29 | [wiki]: http://wiki.gdcproject.org 30 | [ideas]: http://wiki.dlang.org/GDC/ProjectIdeas 31 | [mailto]: mailto:ibuclaw@gdcproject.org 32 | [irc]: https://web.libera.chat/#d-gdc 33 | 34 | -------------------------------------------------------------------------------- /views/documentation.md: -------------------------------------------------------------------------------- 1 | [//]: # (Permission is granted to make and distribute verbatim copies) 2 | [//]: # (of this entire document without royalty provided the) 3 | [//]: # (copyright notice and this permission notice are preserved.) 4 | 5 | ### GDC Documentation ### 6 | 7 | At the moment, documentation for GDC, especially the internals, is 8 | sparse. The DMD frontend and the GCC internals aren't very well 9 | documented either. This page will hopefully help provide insight on 10 | GDC's internals. 11 | 12 | #### GCC Internals #### 13 | 14 | GCC is a compiler for many languages and many targets, so it is 15 | divided into pieces. 16 | 17 | * **Front-End** 18 | 19 | Turns the source code into a language-independent representation 20 | [GENERIC][generic]. 21 | 22 | * **Middle-End** 23 | 24 | Breaks down the GENERIC expressions into a lower level IL used for target 25 | and language independent optimisations [GIMPLE][gimple]. 26 | 27 | * **Back-End** 28 | 29 | Lowers the GIMPLE into a lower level IR and emits target-specific assembler 30 | instructions [RTL][rtl]. 31 | 32 | - - - 33 | 34 | What we know as "GDC" is only an implementation of the Front-end part 35 | of GCC. GDC is located within its own subfolder in the core GCC source 36 | tree (*gcc/d*). It is within this subfolder that we must perform all 37 | changes to the language. 38 | 39 | GCC has other Front-ends such as C (*gcc/c*), C++ (*gcc/cp*), Java 40 | (*gcc/java*), and Go (*gcc/go*), etc. You could look at these for 41 | advice, but one probably shouldn't. 42 | 43 | #### GDC Internals #### 44 | 45 | The D Front-end contains the lexer and parser. These together turn the 46 | source file into GENERIC. The GDC frontend relies heavily on the 47 | Digital Mars D (DMD) sources to perform this work, and you will find 48 | the entire DMD Front-end sources in a subfolder (*gcc/d/dfrontend*). 49 | 50 | Other parts of the D Front-end outside this folder are part of GDC. 51 | Certain files are special as parts of the GCC back-end depend on 52 | their names. 53 | 54 | * **config-lang.in** 55 | 56 | This file is a shell script that defines some variables describing GDC, 57 | including: 58 | 59 | - *language*: 60 | 61 | Gives the name of the language for some purposes such as 62 | **--enable-languages** 63 | 64 | - *compilers*: 65 | 66 | Name of each compiler proper that will be run by the driver. 67 | 68 | - *target_libs*: 69 | 70 | Lists runtime libraries that should not be configured if GDC is not 71 | built. Current list is Phobos, Zlib, and Backtrace. 72 | 73 | - *build_by_default*: 74 | 75 | Defined as 'no' so GDC is not built unless enabled in an 76 | **--enable-languages** argument. 77 | 78 | * **Make-lang.in** 79 | 80 | Provides all Front-end language build hooks GCC expects to be implemented, 81 | and adds the D2 testsuite to be ran under '**make check**'. 82 | 83 | * **lang.opt**: 84 | 85 | Enregisters the set of command-line argument and their help text that 86 | GDC accepts. Eg: **-frelease**, **-fno-bounds-check**. 87 | 88 | * **lang-specs.h**: 89 | 90 | This file provides entries for default_compilers in gcc.c, it's main 91 | purpose is to tell other compilers how to handle a D source file. This 92 | overrides the default of giving an error that a D compiler is not installed. 93 | 94 | * **d-tree.def**: 95 | 96 | This file, which need not exist, defines any GDC specific tree codes. 97 | 98 | - *UNSIGNED_RSHIFT_EXPR*: 99 | 100 | Unsigned right shift operator. 101 | 102 | - *FLOAT_MOD_EXPR*: 103 | 104 | Floating-point modulo division operator. 105 | 106 | - - - 107 | 108 | #### GDC Front-End Interface ### 109 | 110 | The following sources implement various methods among the Front-end AST nodes. 111 | 112 | * **gcc/d/d-toir.cc** (toIR): 113 | 114 | Defined for all Statement sub-classes. Generates a statement expression, 115 | which have side effects but usually no interesting value. 116 | 117 | * **gcc/d/d-elem.cc** (toElem): 118 | 119 | Defined for all Expression sub-classes. Generates an expression, be it an 120 | unary arithmetic, binary arithmetic, function call, etc. 121 | 122 | * **gcc/d/d-todt.cc** (toDt): 123 | 124 | Defined for most Initializer, Type and Expression sub-classes. Generates a 125 | constant to be used as an initial value for declarations. 126 | 127 | * **gcc/d/d-objfile.cc** (toObjFile): 128 | 129 | Defined for all Declaration sub-classes. Generates a static variable or 130 | function declaration to be sent to the Back-end. 131 | 132 | * **gcc/d/d-decls.cc** (toSymbol): 133 | 134 | Defined for all Dsymbol sub-classes. Generates a given symbol, which could 135 | be any kind of global, local, or field declaration. 136 | 137 | * **gcc/d/d-ctype.cc** (toCtype): 138 | 139 | Defined for all Type sub-classes. Generates the type object code as is 140 | represented in the GCC Back-end. 141 | 142 | - - - 143 | 144 | Currently work is under way in upstream DMD to convert all these methods into 145 | Visitor classes as part of the 2.065, 2.066 releases to allow work to begin on 146 | porting the D Front-end to D. So expect the convention and names of these files 147 | to change in the near future. 148 | 149 | #### GDC Back-End Interface #### 150 | 151 | The Middle-end uses callbacks to interface with the Front-end via 152 | "lang_hooks" (See *gcc/d/d-lang.cc*). 153 | 154 | The following are implemented by GDC: 155 | 156 | * **lang_hooks.name**: 157 | 158 | String identifying the Front-end. ("GNU D") 159 | 160 | * **lang_hooks.init_options**:
161 | **lang_hooks.init_options_struct**:
162 | **lang_hooks.initialize_diagnostics**: 163 | 164 | Initialize both Front-end and back-end configurable settings before the 165 | compiler starts handling command-line arguments. 166 | 167 | * **lang_hooks.option_lang_mask**: 168 | 169 | The language mask used for option parsing. ("CL_D") 170 | 171 | * **lang_hooks.handle_option**: 172 | 173 | Handles a parsed Front-end command-line arguments defined in **lang.opt**. 174 | 175 | * **lang_hooks.post_options**: 176 | 177 | Called after all command-line arguments have been parsed to allow further 178 | processing. 179 | 180 | * **lang_hooks.init**:
181 | **lang_hooks.init_ts**: 182 | 183 | Called after processing options to initialize the Front-end to be ready to 184 | begin parsing. 185 | 186 | * **lang_hooks.parse_file**: 187 | 188 | Parse all files passed to GDC, this runs all semantic analysis passes and 189 | generates backend codegen. 190 | 191 | * **lang_hooks.attribute_table**:
192 | **lang_hooks.common_attribute_table**
193 | **lang_hooks.format_attribute_table** 194 | 195 | All machine-independant attributes handled by GDC. The common and format 196 | attribute table is internally used by the gcc.builtins module, whilst the 197 | main attribute table holds all @attributes recognised by gcc.attribute. 198 | 199 | * **lang_hooks.get_alias_set**: 200 | 201 | Returns the alias set for a type or expression. For D codegen, we currently 202 | assume that everything aliases everything else, until some solid rules are 203 | defined. 204 | 205 | * **lang_hooks.types_compatible_p**: 206 | 207 | Compares two (possibly D specific) types for equivalence. 208 | 209 | * **lang_hooks.builtin_function**:
210 | **lang_hooks.builtin_function_ext_scope**:
211 | **lang_hooks.register_builtin_type**: 212 | 213 | Do language specific processing on builtins. For GDC, this is used to 214 | build the list of declarations to push into the gcc.builtins module. 215 | 216 | * **lang_hooks.finish_incomplete_type**: 217 | 218 | Finish up incomplete types at the end of compilation. Used to specially 219 | handle zero-length declarations. 220 | 221 | * **lang_hooks.gimplify_expr**: 222 | 223 | Perform language specific lowering of D codegen. 224 | 225 | * **lang_hooks.classify_record**: 226 | 227 | For purposes of debug information, return information on whether an 228 | aggregate type is a class, interface or struct. 229 | 230 | * **lang_hooks.eh_personality**:
231 | **lang_hooks.eh_runtime_type**: 232 | 233 | The GDC specific personality function used to interface with libunwind, and 234 | the Object type thrown. 235 | 236 | * **lang_hooks.pushdecl**:
237 | **lang_hooks.getdecls**:
238 | **lang_hooks.global_bindings_p**: 239 | 240 | Hooks for pushing, retrieving and tracking all variables in the current 241 | binding level or lexical scope being compiled. 242 | 243 | * **lang_hooks.final_write_globals**: 244 | 245 | Do all final processing on globals and compile them down to assembly. 246 | 247 | * **lang_hooks.types.type_for_mode**:
248 | **lang_hooks.types.type_for_size**: 249 | 250 | For a given mode or precision, return the suitable D type. 251 | 252 | * **lang_hooks.type.type_promotes_to**: 253 | 254 | For a given type, apply default promotions. This is required for supporting 255 | variadic arguments. 256 | 257 | [generic]: http://gcc.gnu.org/onlinedocs/gccint/GENERIC.html 258 | [gimple]: http://gcc.gnu.org/onlinedocs/gccint/GIMPLE.html 259 | [rtl]: http://gcc.gnu.org/onlinedocs/gccint/RTL.html 260 | -------------------------------------------------------------------------------- /views/downloads.md: -------------------------------------------------------------------------------- 1 | ### Source code ### 2 | 3 | For access to the current development sources of GDC, visit 4 | [our git repository][gitrepo]. Build instructions are available on [this wiki 5 | page][installwiki]. 6 | 7 | ### Linux distribution packages ### 8 | Official packages are available for several linux distributions including: 9 | * [Arch Linux][archpkg] 10 | * [Debian][debianpkg] 11 | * [Fedora][fedorapkg] 12 | * [Ubuntu][ubuntupkg] 13 | * [Slackware][slackwarepkg] 14 | 15 | Generally, try searching for either `gdc` or `gcc-d` in your distribution's package manager. 16 | 17 | ### Binary releases ### 18 | As GDC is now part of GCC, you should now install it from GCC distributors. 19 | 20 | * [Historical downloads page][olddownloads] 21 | * [Old release archive][gdcarchives] 22 | * [Work-in-progress unofficial Windows release](http://www.winlibs.com/) 23 | 24 | [gitrepo]: https://github.com/D-Programming-GDC/gcc 25 | [installwiki]: http://wiki.dlang.org/GDC/Installation 26 | [archpkg]: https://archlinux.org/packages/core/x86_64/gcc-d/ 27 | [debianpkg]: https://packages.debian.org/stable/devel/gdc 28 | [fedorapkg]: https://packages.fedoraproject.org/pkgs/gcc/gcc-gdc/ 29 | [ubuntupkg]: https://packages.ubuntu.com/search?suite=all&searchon=names&keywords=gdc 30 | [olddownloads]: /old/downloads 31 | [gdcarchives]: /archive 32 | [slackwarepkg]: https://mirrors.slackware.com/slackware/slackware64-current/slackware64/d/ 33 | -------------------------------------------------------------------------------- /views/index.md: -------------------------------------------------------------------------------- 1 | [//]: # (Permission is granted to make and distribute verbatim copies) 2 | [//]: # (of this entire document without royalty provided the) 3 | [//]: # (copyright notice and this permission notice are preserved.) 4 | 5 | ### What is GDC? ### 6 | 7 | GDC is a GPL implementation of the D compiler which integrates the open 8 | source D front end with GCC. 9 | 10 | The GNU D Compiler (GDC) project was originally started by David Friedman 11 | in 2004 until early 2007 when he disappeared from the D scene, and was no 12 | longer able to maintain GDC. Following a revival attempt in 2008, GDC is 13 | now under the lead of Iain Buclaw, who has been steering the project since 14 | 2009 with the assistance of its contributors. Without them, the project 15 | would not have been nearly as successful as it has been. 16 | 17 | GDC was merged into the upstream GCC tree in GCC 9.0 and continues to be developed and distributed as part of GCC. 18 | 19 | ### Bugs in GDC ### 20 | 21 | Please report bugs! 22 | 23 | Any bugs or issues found with using GDC should be reported at [our bugzilla 24 | site][bugzilla]. Bug reports can be anything from problems, enhancements, 25 | incorrect or incomplete documentation, web changes, or even WIP projects. 26 | 27 | Please note that if you find bugs in GDC that you installed with a given 28 | GNU/Linux distribution, it is often useful to first try reporting the bug 29 | directly to the distributor. Sometimes distributors have modified the 30 | software (as they are free to do so!) or they are running older versions. 31 | Thus, they may be the best people to find a bug as it pertains to a 32 | particular distribution. 33 | 34 | Before submitting a new bug, try [browsing][openbugs] the current open 35 | bugs to see if the problem has already been reported or even fixed. 36 | 37 | It is also very helpful if you can try reproducing the problem with a 38 | current GDC snapshot available from git. Often bugs in a release branch 39 | have already been fixed in the latest development sources. 40 | 41 | While bug reports may seem like individual assistance, they are not; they 42 | are part of preparing a new improved version. For general help with GDC, 43 | the [D.gnu][mailinglist] mailing list is the place to go with questions 44 | or problems. 45 | 46 | [bugzilla]: https://gcc.gnu.org/bugzilla/ 47 | [openbugs]: https://gcc.gnu.org/bugzilla/buglist.cgi?product=gcc&component=d&resolution=--- 48 | [mailinglist]: http://forum.dlang.org/group/D.gnu 49 | -------------------------------------------------------------------------------- /views/old/downloads.json: -------------------------------------------------------------------------------- 1 | { 2 | "specialToolchains": [], 3 | "standardBuilds": [ 4 | { 5 | "archiveURL": "/archive/", 6 | "triplet": "x86_64-linux-gnu", 7 | "name": "Linux X86 64bit", 8 | "sets": [ 9 | { 10 | "targetHeader": "Target", 11 | "name": "Standard builds", 12 | "id": "standard", 13 | "downloads": [ 14 | { 15 | "filename": "gdc-6.3.0+2.068.2-arm-linux-gnueabihf.tar.xz", 16 | "buildID": "x86_64-linux-gnu/arm-linux-gnueabihf", 17 | "buildDate": "2016-12-23", 18 | "gdcRev": "v2.068.2_gcc6", 19 | "gcc": "6.3.0", 20 | "dmdFE": "2.068.2", 21 | "srcID": "x86_64-linux-gnu/gcc-6/arm-linux-gnueabihf", 22 | "multilib": ["-mfloat-abi=soft", "-mfloat-abi=softfp", "-mfloat-abi=hard"], 23 | "runtime": "yes", 24 | "url": "/archive/binaries/6.3.0/x86_64-linux-gnu/gdc-6.3.0+2.068.2-arm-linux-gnueabihf.tar.xz", 25 | "runtimeLink": "", 26 | "md5Sum": "1bb830ed8b3db2a95fd6ba2e4508181b", 27 | "release": 1, 28 | "target": "arm-linux-gnueabihf", 29 | "comment": "" 30 | }, 31 | { 32 | "filename": "gdc-6.3.0+2.068.2.tar.xz", 33 | "buildID": "x86_64-linux-gnu/x86_64-linux-gnu", 34 | "buildDate": "2016-12-24", 35 | "gdcRev": "v2.068.2_gcc6", 36 | "gcc": "6.3.0", 37 | "dmdFE": "2.068.2", 38 | "srcID": "x86_64-linux-gnu/gcc-6/x86_64-linux-gnu", 39 | "multilib": ["-m32", "-m64"], 40 | "runtime": "yes", 41 | "url": "/archive/binaries/6.3.0/x86_64-linux-gnu/gdc-6.3.0+2.068.2.tar.xz", 42 | "runtimeLink": "", 43 | "md5Sum": "16d3067ebb3938dba46429a4d9f6178f", 44 | "release": 1, 45 | "target": "x86_64-linux-gnu", 46 | "comment": "" 47 | } 48 | ], 49 | "comment": "" 50 | } 51 | ], 52 | "comment": "" 53 | }, 54 | { 55 | "archiveURL": "/archive/", 56 | "triplet": "i686-linux-gnu", 57 | "name": "Linux X86 32bit", 58 | "sets": [ 59 | { 60 | "targetHeader": "Target", 61 | "name": "Standard builds", 62 | "id": "standard", 63 | "downloads": [ 64 | { 65 | "filename": "gdc-6.3.0+2.068.2.tar.xz", 66 | "buildID": "i686-linux-gnu/i686-linux-gnu", 67 | "buildDate": "2016-12-23", 68 | "gdcRev": "v2.068.2_gcc6", 69 | "gcc": "6.3.0", 70 | "dmdFE": "2.068.2", 71 | "srcID": "i686-linux-gnu/gcc-6/i686-linux-gnu", 72 | "multilib": [], 73 | "runtime": "yes", 74 | "url": "/archive/binaries/6.3.0/i686-linux-gnu/gdc-6.3.0+2.068.2.tar.xz", 75 | "runtimeLink": "", 76 | "md5Sum": "cc8dcd66b189245e39296b1382d0dfcc", 77 | "release": 1, 78 | "target": "i686-linux-gnu", 79 | "comment": "" 80 | } 81 | ], 82 | "comment": "" 83 | } 84 | ], 85 | "comment": "" 86 | }, 87 | { 88 | "archiveURL": "/archive/", 89 | "triplet": "arm-linux-gnueabi", 90 | "name": "Linux ARM (softfloat)", 91 | "sets": [ 92 | { 93 | "targetHeader": "Target", 94 | "name": "Standard builds", 95 | "id": "standard", 96 | "downloads": [ 97 | { 98 | "filename": "gdc-6.3.0+2.068.2.tar.xz", 99 | "buildID": "arm-linux-gnueabi/arm-linux-gnueabi", 100 | "buildDate": "2016-12-23", 101 | "gdcRev": "v2.068.2_gcc6", 102 | "gcc": "6.3.0", 103 | "dmdFE": "2.068.2", 104 | "srcID": "arm-linux-gnueabi/gcc-6/arm-linux-gnueabi", 105 | "multilib": [], 106 | "runtime": "yes", 107 | "url": "/archive/binaries/6.3.0/arm-linux-gnueabi/gdc-6.3.0+2.068.2.tar.xz", 108 | "runtimeLink": "", 109 | "md5Sum": "642774592c025d868552ff5388d21dae", 110 | "release": 1, 111 | "target": "arm-linux-gnueabi", 112 | "comment": "" 113 | } 114 | ], 115 | "comment": "" 116 | } 117 | ], 118 | "comment": "" 119 | }, 120 | { 121 | "archiveURL": "/archive/", 122 | "triplet": "arm-linux-gnueabihf", 123 | "name": "Linux ARM (hardfloat)", 124 | "sets": [ 125 | { 126 | "targetHeader": "Target", 127 | "name": "Standard builds", 128 | "id": "standard", 129 | "downloads": [ 130 | { 131 | "filename": "gdc-6.3.0+2.068.2.tar.xz", 132 | "buildID": "arm-linux-gnueabihf/arm-linux-gnueabihf", 133 | "buildDate": "2016-12-23", 134 | "gdcRev": "v2.068.2_gcc6", 135 | "gcc": "6.3.0", 136 | "dmdFE": "2.068.2", 137 | "srcID": "arm-linux-gnueabihf/gcc-6/arm-linux-gnueabihf", 138 | "multilib": [], 139 | "runtime": "yes", 140 | "url": "/archive/binaries/6.3.0/arm-linux-gnueabihf/gdc-6.3.0+2.068.2.tar.xz", 141 | "runtimeLink": "", 142 | "md5Sum": "ceb96d344eac162242f4fbf4e669f841", 143 | "release": 1, 144 | "target": "arm-linux-gnueabihf", 145 | "comment": "" 146 | } 147 | ], 148 | "comment": "" 149 | } 150 | ], 151 | "comment": "" 152 | }, 153 | { 154 | "archiveURL": "/archive/", 155 | "triplet": "x86_64-w64-mingw32", 156 | "name": "Windows X86 64bit", 157 | "sets": [ 158 | { 159 | "targetHeader": "Target", 160 | "name": "Standard builds", 161 | "id": "standard", 162 | "downloads": [ 163 | { 164 | "filename": "gdc-6.3.0+2.068.2-arm-linux-gnueabihf.7z", 165 | "buildID": "x86-w64-mingw32/arm-linux-gnueabihf", 166 | "buildDate": "2016-12-23", 167 | "gdcRev": "v2.068.2_gcc6", 168 | "gcc": "6.3.0", 169 | "dmdFE": "2.068.2", 170 | "srcID": "x86_64-w64-mingw32/gcc-6/arm-linux-gnueabihf", 171 | "multilib": ["-mfloat-abi=soft", "-mfloat-abi=softfp", "-mfloat-abi=hard"], 172 | "runtime": "yes", 173 | "url": "/archive/binaries/6.3.0/x86_64-w64-mingw32/gdc-6.3.0+2.068.2-arm-linux-gnueabihf.7z", 174 | "runtimeLink": "", 175 | "md5Sum": "f525fd89b4a440ad9be81d28061d7017", 176 | "release": 1, 177 | "target": "arm-linux-gnueabihf", 178 | "comment": "" 179 | }, 180 | { 181 | "filename": "gdc-6.3.0+2.068.2-x86_64-linux-gnu.7z", 182 | "buildID": "x86-w64-mingw32/x86_64-linux-gnu", 183 | "buildDate": "2016-12-23", 184 | "gdcRev": "v2.068.2_gcc6", 185 | "gcc": "6.3.0", 186 | "dmdFE": "2.068.2", 187 | "srcID": "x86_64-w64-mingw32/gcc-6/x86_64-linux-gnu", 188 | "multilib": ["-m32", "-m64"], 189 | "runtime": "yes", 190 | "url": "/archive/binaries/6.3.0/x86_64-w64-mingw32/gdc-6.3.0+2.068.2-x86_64-linux-gnu.7z", 191 | "runtimeLink": "", 192 | "md5Sum": "6d5f2a458d7af289fa93a969a653711d", 193 | "release": 1, 194 | "target": "x86_64-linux-gnu", 195 | "comment": "" 196 | } 197 | ], 198 | "comment": "" 199 | } 200 | ], 201 | "comment": "" 202 | }, 203 | { 204 | "archiveURL": "/archive/", 205 | "triplet": "i686-w64-mingw32", 206 | "name": "Windows X86 32bit", 207 | "sets": [ 208 | { 209 | "targetHeader": "Target", 210 | "name": "Standard builds", 211 | "id": "standard", 212 | "downloads": [ 213 | { 214 | "filename": "gdc-6.3.0+2.068.2-arm-linux-gnueabihf.7z", 215 | "buildID": "i686-w64-mingw32/arm-linux-gnueabihf", 216 | "buildDate": "2016-12-23", 217 | "gdcRev": "v2.068.2_gcc6", 218 | "gcc": "6.3.0", 219 | "dmdFE": "2.068.2", 220 | "srcID": "i686-w64-mingw32/gcc-6/arm-linux-gnueabihf", 221 | "multilib": ["-mfloat-abi=soft", "-mfloat-abi=softfp", "-mfloat-abi=hard"], 222 | "runtime": "yes", 223 | "url": "/archive/binaries/6.3.0/i686-w64-mingw32/gdc-6.3.0+2.068.2-arm-linux-gnueabihf.7z", 224 | "runtimeLink": "", 225 | "md5Sum": "b9bb503874e451483708877322ea8abf", 226 | "release": 1, 227 | "target": "arm-linux-gnueabihf", 228 | "comment": "" 229 | }, 230 | { 231 | "filename": "gdc-6.3.0+2.068.2-x86_64-linux-gnu.7z", 232 | "buildID": "x86-w64-mingw32/x86_64-linux-gnu", 233 | "buildDate": "2016-12-23", 234 | "gdcRev": "v2.068.2_gcc6", 235 | "gcc": "6.3.0", 236 | "dmdFE": "2.068.2", 237 | "srcID": "x86_64-w64-mingw32/gcc-6/x86_64-linux-gnu", 238 | "multilib": ["-m32", "-m64"], 239 | "runtime": "yes", 240 | "url": "/archive/binaries/6.3.0/x86_64-w64-mingw32/gdc-6.3.0+2.068.2-x86_64-linux-gnu.7z", 241 | "runtimeLink": "", 242 | "md5Sum": "424ebb8dc7476bffdca9c364fedf40e7", 243 | "release": 1, 244 | "target": "x86_64-linux-gnu", 245 | "comment": "" 246 | } 247 | ], 248 | "comment": "" 249 | } 250 | ], 251 | "comment": "" 252 | } 253 | ] 254 | } 255 | -------------------------------------------------------------------------------- /views/old/downloads.mustache: -------------------------------------------------------------------------------- 1 | ### Binary releases ### 2 | 3 | This page contains native and cross compilers. A native compiler creates 4 | executables for the system it runs on. 5 | A cross-compiler runs on 'host' and generates code for 'target'. The headings 6 | on this page specify the compiler 'host', 7 | the entries in the Target column specify the 'target'. 8 | 9 | {{#Host}} 10 | #### {{name}} ({{triplet}}) #### 11 | 48 | {{/Host}} 49 | 50 | [gitrepo]: https://github.com/D-Programming-GDC/GDC 51 | [installwiki]: http://wiki.dlang.org/GDC/Installation 52 | [archpkg]: https://www.archlinux.org/packages/?sort=&arch=i686&arch=x86_64&q=gdc 53 | [debianpkg]: https://packages.debian.org/search?keywords=gdc&searchon=names&suite=all§ion=all 54 | [ubuntupkg]: http://packages.ubuntu.com/search?keywords=gdc&searchon=names&exact=1&suite=all§ion=all 55 | --------------------------------------------------------------------------------