├── .bowerrc ├── .editorconfig ├── .gitattributes ├── .gitignore ├── .jshintrc ├── .yo-rc.json ├── README.md ├── app ├── .htaccess ├── 404.html ├── elements │ ├── app-globals │ │ ├── app-globals.html │ │ └── app-globals.scss │ ├── card-actions │ │ ├── card-actions.html │ │ └── card-actions.scss │ ├── card-comment │ │ ├── card-comment.html │ │ └── card-comment.scss │ ├── card-container │ │ ├── card-container.html │ │ └── card-container.scss │ ├── card-content │ │ ├── card-content.html │ │ └── card-content.scss │ ├── card-context │ │ ├── card-context.html │ │ └── card-context.scss │ ├── card-new-comment │ │ ├── card-new-comment.html │ │ └── card-new-comment.scss │ ├── card-plus │ │ ├── card-plus.html │ │ └── card-plus.scss │ ├── card-tags │ │ ├── card-tags.html │ │ └── card-tags.scss │ ├── card-user │ │ ├── card-user.html │ │ └── card-user.scss │ └── elements.html ├── favicon.ico ├── images │ └── down.png ├── index.html ├── robots.txt ├── scripts │ └── app.js ├── styles │ └── main.scss └── test │ ├── index.html │ ├── yo-greeting-basic.html │ └── yo-list-basic.html ├── bower.json ├── bower_components ├── core-component-page │ ├── .bower.json │ ├── README.md │ ├── bowager-logo.png │ ├── bower.json │ ├── core-component-page.html │ ├── demo.html │ └── index.html ├── polymer │ ├── .bower.json │ ├── README.md │ ├── bower.json │ ├── layout.html │ ├── polymer.html │ ├── polymer.js │ └── polymer.min.js ├── web-component-tester │ ├── .bower.json │ ├── bower.json │ ├── browser.js │ └── environment.js └── webcomponentsjs │ ├── .bower.json │ ├── CustomElements.js │ ├── CustomElements.min.js │ ├── HTMLImports.js │ ├── HTMLImports.min.js │ ├── README.md │ ├── ShadowDOM.js │ ├── ShadowDOM.min.js │ ├── bower.json │ ├── package.json │ ├── webcomponents-lite.js │ ├── webcomponents-lite.min.js │ ├── webcomponents.js │ └── webcomponents.min.js ├── gulpfile.js ├── package.json └── wct.conf.js /.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory": "bower_components" 3 | } 4 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent 2 | # coding styles between different editors and IDEs 3 | # editorconfig.org 4 | 5 | root = true 6 | 7 | 8 | [*] 9 | 10 | # Change these settings to your own preference 11 | indent_style = space 12 | indent_size = 2 13 | 14 | # We recommend you to keep these unchanged 15 | end_of_line = lf 16 | charset = utf-8 17 | trim_trailing_whitespace = true 18 | insert_final_newline = true 19 | 20 | [*.md] 21 | trim_trailing_whitespace = false 22 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | test/temp 4 | .sass-cache 5 | app/bower_components 6 | .tmp 7 | test/bower_components/ 8 | -------------------------------------------------------------------------------- /.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "node": true, 3 | "browser": true, 4 | "esnext": true, 5 | "bitwise": true, 6 | "camelcase": true, 7 | "curly": true, 8 | "eqeqeq": true, 9 | "immed": true, 10 | "indent": 2, 11 | "latedef": true, 12 | "noarg": true, 13 | "quotmark": "single", 14 | "undef": true, 15 | "unused": true, 16 | "globals": { 17 | "wrap": true, 18 | "unwrap": true, 19 | "Polymer": true, 20 | "Platform": true 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /.yo-rc.json: -------------------------------------------------------------------------------- 1 | { 2 | "generator-polymer": { 3 | "includeSass": true 4 | } 5 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # cards-ui 2 | 3 | This is an example of how you could use polymer to create self-containing widgets and build entire apps using the same idea. 4 | 5 | ## Steps 6 | 7 | 1. Download this zip 8 | 2. Extract 9 | 3. Run `npm install && bower install` 10 | 4. Run `gulp serve` 11 | -------------------------------------------------------------------------------- /app/.htaccess: -------------------------------------------------------------------------------- 1 | # Apache configuration file 2 | # httpd.apache.org/docs/2.2/mod/quickreference.html 3 | 4 | # Note .htaccess files are an overhead, this logic should be in your Apache 5 | # config if possible: httpd.apache.org/docs/2.2/howto/htaccess.html 6 | 7 | # Techniques in here adapted from all over, including: 8 | # Kroc Camen: camendesign.com/.htaccess 9 | # perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/ 10 | # Sample .htaccess file of CMS MODx: modxcms.com 11 | 12 | 13 | # ---------------------------------------------------------------------- 14 | # Better website experience for IE users 15 | # ---------------------------------------------------------------------- 16 | 17 | # Force the latest IE version, in various cases when it may fall back to IE7 mode 18 | # github.com/rails/rails/commit/123eb25#commitcomment-118920 19 | # Use ChromeFrame if it's installed for a better experience for the poor IE folk 20 | 21 | 22 | Header set X-UA-Compatible "IE=Edge,chrome=1" 23 | # mod_headers can't match by content-type, but we don't want to send this header on *everything*... 24 | 25 | Header unset X-UA-Compatible 26 | 27 | 28 | 29 | 30 | # ---------------------------------------------------------------------- 31 | # Cross-domain AJAX requests 32 | # ---------------------------------------------------------------------- 33 | 34 | # Serve cross-domain Ajax requests, disabled by default. 35 | # enable-cors.org 36 | # code.google.com/p/html5security/wiki/CrossOriginRequestSecurity 37 | 38 | # 39 | # Header set Access-Control-Allow-Origin "*" 40 | # 41 | 42 | 43 | # ---------------------------------------------------------------------- 44 | # CORS-enabled images (@crossorigin) 45 | # ---------------------------------------------------------------------- 46 | 47 | # Send CORS headers if browsers request them; enabled by default for images. 48 | # developer.mozilla.org/en/CORS_Enabled_Image 49 | # blog.chromium.org/2011/07/using-cross-domain-images-in-webgl-and.html 50 | # hacks.mozilla.org/2011/11/using-cors-to-load-webgl-textures-from-cross-domain-images/ 51 | # wiki.mozilla.org/Security/Reviews/crossoriginAttribute 52 | 53 | 54 | 55 | # mod_headers, y u no match by Content-Type?! 56 | 57 | SetEnvIf Origin ":" IS_CORS 58 | Header set Access-Control-Allow-Origin "*" env=IS_CORS 59 | 60 | 61 | 62 | 63 | 64 | # ---------------------------------------------------------------------- 65 | # Webfont access 66 | # ---------------------------------------------------------------------- 67 | 68 | # Allow access from all domains for webfonts. 69 | # Alternatively you could only whitelist your 70 | # subdomains like "subdomain.example.com". 71 | 72 | 73 | 74 | Header set Access-Control-Allow-Origin "*" 75 | 76 | 77 | 78 | 79 | # ---------------------------------------------------------------------- 80 | # Proper MIME type for all files 81 | # ---------------------------------------------------------------------- 82 | 83 | # JavaScript 84 | # Normalize to standard type (it's sniffed in IE anyways) 85 | # tools.ietf.org/html/rfc4329#section-7.2 86 | AddType application/javascript js jsonp 87 | AddType application/json json 88 | 89 | # Audio 90 | AddType audio/ogg oga ogg 91 | AddType audio/mp4 m4a f4a f4b 92 | 93 | # Video 94 | AddType video/ogg ogv 95 | AddType video/mp4 mp4 m4v f4v f4p 96 | AddType video/webm webm 97 | AddType video/x-flv flv 98 | 99 | # SVG 100 | # Required for svg webfonts on iPad 101 | # twitter.com/FontSquirrel/status/14855840545 102 | AddType image/svg+xml svg svgz 103 | AddEncoding gzip svgz 104 | 105 | # Webfonts 106 | AddType application/vnd.ms-fontobject eot 107 | AddType application/x-font-ttf ttf ttc 108 | AddType font/opentype otf 109 | AddType application/x-font-woff woff 110 | 111 | # Assorted types 112 | AddType image/x-icon ico 113 | AddType image/webp webp 114 | AddType text/cache-manifest appcache manifest 115 | AddType text/x-component htc 116 | AddType application/xml rss atom xml rdf 117 | AddType application/x-chrome-extension crx 118 | AddType application/x-opera-extension oex 119 | AddType application/x-xpinstall xpi 120 | AddType application/octet-stream safariextz 121 | AddType application/x-web-app-manifest+json webapp 122 | AddType text/x-vcard vcf 123 | AddType application/x-shockwave-flash swf 124 | AddType text/vtt vtt 125 | 126 | 127 | # ---------------------------------------------------------------------- 128 | # Allow concatenation from within specific js and css files 129 | # ---------------------------------------------------------------------- 130 | 131 | # e.g. Inside of script.combined.js you could have 132 | # 133 | # 134 | # and they would be included into this single file. 135 | 136 | # This is not in use in the boilerplate as it stands. You may 137 | # choose to use this technique if you do not have a build process. 138 | 139 | # 140 | # Options +Includes 141 | # AddOutputFilterByType INCLUDES application/javascript application/json 142 | # SetOutputFilter INCLUDES 143 | # 144 | 145 | # 146 | # Options +Includes 147 | # AddOutputFilterByType INCLUDES text/css 148 | # SetOutputFilter INCLUDES 149 | # 150 | 151 | 152 | # ---------------------------------------------------------------------- 153 | # Gzip compression 154 | # ---------------------------------------------------------------------- 155 | 156 | 157 | 158 | # Force deflate for mangled headers developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping/ 159 | 160 | 161 | SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding 162 | RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding 163 | 164 | 165 | 166 | # HTML, TXT, CSS, JavaScript, JSON, XML, HTC: 167 | 168 | FilterDeclare COMPRESS 169 | FilterProvider COMPRESS DEFLATE resp=Content-Type $text/html 170 | FilterProvider COMPRESS DEFLATE resp=Content-Type $text/css 171 | FilterProvider COMPRESS DEFLATE resp=Content-Type $text/plain 172 | FilterProvider COMPRESS DEFLATE resp=Content-Type $text/xml 173 | FilterProvider COMPRESS DEFLATE resp=Content-Type $text/x-component 174 | FilterProvider COMPRESS DEFLATE resp=Content-Type $application/javascript 175 | FilterProvider COMPRESS DEFLATE resp=Content-Type $application/json 176 | FilterProvider COMPRESS DEFLATE resp=Content-Type $application/xml 177 | FilterProvider COMPRESS DEFLATE resp=Content-Type $application/xhtml+xml 178 | FilterProvider COMPRESS DEFLATE resp=Content-Type $application/rss+xml 179 | FilterProvider COMPRESS DEFLATE resp=Content-Type $application/atom+xml 180 | FilterProvider COMPRESS DEFLATE resp=Content-Type $application/vnd.ms-fontobject 181 | FilterProvider COMPRESS DEFLATE resp=Content-Type $image/svg+xml 182 | FilterProvider COMPRESS DEFLATE resp=Content-Type $image/x-icon 183 | FilterProvider COMPRESS DEFLATE resp=Content-Type $application/x-font-ttf 184 | FilterProvider COMPRESS DEFLATE resp=Content-Type $font/opentype 185 | FilterChain COMPRESS 186 | FilterProtocol COMPRESS DEFLATE change=yes;byteranges=no 187 | 188 | 189 | 190 | # Legacy versions of Apache 191 | AddOutputFilterByType DEFLATE text/html text/plain text/css application/json 192 | AddOutputFilterByType DEFLATE application/javascript 193 | AddOutputFilterByType DEFLATE text/xml application/xml text/x-component 194 | AddOutputFilterByType DEFLATE application/xhtml+xml application/rss+xml application/atom+xml 195 | AddOutputFilterByType DEFLATE image/x-icon image/svg+xml application/vnd.ms-fontobject application/x-font-ttf font/opentype 196 | 197 | 198 | 199 | 200 | 201 | # ---------------------------------------------------------------------- 202 | # Expires headers (for better cache control) 203 | # ---------------------------------------------------------------------- 204 | 205 | # These are pretty far-future expires headers. 206 | # They assume you control versioning with filename-based cache busting 207 | # Additionally, consider that outdated proxies may miscache 208 | # www.stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring/ 209 | 210 | # If you don't use filenames to version, lower the CSS and JS to something like 211 | # "access plus 1 week". 212 | 213 | 214 | ExpiresActive on 215 | 216 | # Perhaps better to whitelist expires rules? Perhaps. 217 | ExpiresDefault "access plus 1 month" 218 | 219 | # cache.appcache needs re-requests in FF 3.6 (thanks Remy ~Introducing HTML5) 220 | ExpiresByType text/cache-manifest "access plus 0 seconds" 221 | 222 | # Your document html 223 | ExpiresByType text/html "access plus 0 seconds" 224 | 225 | # Data 226 | ExpiresByType text/xml "access plus 0 seconds" 227 | ExpiresByType application/xml "access plus 0 seconds" 228 | ExpiresByType application/json "access plus 0 seconds" 229 | 230 | # Feed 231 | ExpiresByType application/rss+xml "access plus 1 hour" 232 | ExpiresByType application/atom+xml "access plus 1 hour" 233 | 234 | # Favicon (cannot be renamed) 235 | ExpiresByType image/x-icon "access plus 1 week" 236 | 237 | # Media: images, video, audio 238 | ExpiresByType image/gif "access plus 1 month" 239 | ExpiresByType image/png "access plus 1 month" 240 | ExpiresByType image/jpeg "access plus 1 month" 241 | ExpiresByType video/ogg "access plus 1 month" 242 | ExpiresByType audio/ogg "access plus 1 month" 243 | ExpiresByType video/mp4 "access plus 1 month" 244 | ExpiresByType video/webm "access plus 1 month" 245 | 246 | # HTC files (css3pie) 247 | ExpiresByType text/x-component "access plus 1 month" 248 | 249 | # Webfonts 250 | ExpiresByType application/x-font-ttf "access plus 1 month" 251 | ExpiresByType font/opentype "access plus 1 month" 252 | ExpiresByType application/x-font-woff "access plus 1 month" 253 | ExpiresByType image/svg+xml "access plus 1 month" 254 | ExpiresByType application/vnd.ms-fontobject "access plus 1 month" 255 | 256 | # CSS and JavaScript 257 | ExpiresByType text/css "access plus 1 year" 258 | ExpiresByType application/javascript "access plus 1 year" 259 | 260 | 261 | 262 | 263 | # ---------------------------------------------------------------------- 264 | # Prevent mobile network providers from modifying your site 265 | # ---------------------------------------------------------------------- 266 | 267 | # The following header prevents modification of your code over 3G on some 268 | # European providers. 269 | # This is the official 'bypass' suggested by O2 in the UK. 270 | 271 | # 272 | # Header set Cache-Control "no-transform" 273 | # 274 | 275 | 276 | # ---------------------------------------------------------------------- 277 | # ETag removal 278 | # ---------------------------------------------------------------------- 279 | 280 | # FileETag None is not enough for every server. 281 | 282 | Header unset ETag 283 | 284 | 285 | # Since we're sending far-future expires, we don't need ETags for 286 | # static content. 287 | # developer.yahoo.com/performance/rules.html#etags 288 | FileETag None 289 | 290 | 291 | # ---------------------------------------------------------------------- 292 | # Stop screen flicker in IE on CSS rollovers 293 | # ---------------------------------------------------------------------- 294 | 295 | # The following directives stop screen flicker in IE on CSS rollovers - in 296 | # combination with the "ExpiresByType" rules for images (see above). 297 | 298 | # BrowserMatch "MSIE" brokenvary=1 299 | # BrowserMatch "Mozilla/4.[0-9]{2}" brokenvary=1 300 | # BrowserMatch "Opera" !brokenvary 301 | # SetEnvIf brokenvary 1 force-no-vary 302 | 303 | 304 | # ---------------------------------------------------------------------- 305 | # Set Keep-Alive Header 306 | # ---------------------------------------------------------------------- 307 | 308 | # Keep-Alive allows the server to send multiple requests through one 309 | # TCP-connection. Be aware of possible disadvantages of this setting. Turn on 310 | # if you serve a lot of static content. 311 | 312 | # 313 | # Header set Connection Keep-Alive 314 | # 315 | 316 | 317 | # ---------------------------------------------------------------------- 318 | # Cookie setting from iframes 319 | # ---------------------------------------------------------------------- 320 | 321 | # Allow cookies to be set from iframes (for IE only) 322 | # If needed, specify a path or regex in the Location directive. 323 | 324 | # 325 | # Header set P3P "policyref=\"/w3c/p3p.xml\", CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\"" 326 | # 327 | 328 | 329 | # ---------------------------------------------------------------------- 330 | # Start rewrite engine 331 | # ---------------------------------------------------------------------- 332 | 333 | # Turning on the rewrite engine is necessary for the following rules and 334 | # features. FollowSymLinks must be enabled for this to work. 335 | 336 | # Some cloud hosting services require RewriteBase to be set: goo.gl/HOcPN 337 | # If using the h5bp in a subdirectory, use `RewriteBase /foo` instead where 338 | # 'foo' is your directory. 339 | 340 | # If your web host doesn't allow the FollowSymlinks option, you may need to 341 | # comment it out and use `Options +SymLinksOfOwnerMatch`, but be aware of the 342 | # performance impact: http://goo.gl/Mluzd 343 | 344 | 345 | Options +FollowSymlinks 346 | # Options +SymLinksIfOwnerMatch 347 | Options +FollowSymlinks 348 | RewriteEngine On 349 | # RewriteBase / 350 | 351 | 352 | 353 | # ---------------------------------------------------------------------- 354 | # Suppress or force the "www." at the beginning of URLs 355 | # ---------------------------------------------------------------------- 356 | 357 | # The same content should never be available under two different URLs - 358 | # especially not with and without "www." at the beginning, since this can cause 359 | # SEO problems (duplicate content). That's why you should choose one of the 360 | # alternatives and redirect the other one. 361 | 362 | # By default option 1 (no "www.") is activated. 363 | # no-www.org/faq.php?q=class_b 364 | 365 | # If you'd prefer to use option 2, just comment out all option 1 lines 366 | # and uncomment option 2. 367 | 368 | # IMPORTANT: NEVER USE BOTH RULES AT THE SAME TIME! 369 | 370 | # ---------------------------------------------------------------------- 371 | 372 | # Option 1: 373 | # Rewrite "www.example.com -> example.com". 374 | 375 | 376 | RewriteCond %{HTTPS} !=on 377 | RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] 378 | RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L] 379 | 380 | 381 | # ---------------------------------------------------------------------- 382 | 383 | # Option 2: 384 | # Rewrite "example.com -> www.example.com". 385 | # Be aware that the following rule might not be a good idea if you use "real" 386 | # subdomains for certain parts of your website. 387 | 388 | # 389 | # RewriteCond %{HTTPS} !=on 390 | # RewriteCond %{HTTP_HOST} !^www\..+$ [NC] 391 | # RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L] 392 | # 393 | 394 | 395 | # ---------------------------------------------------------------------- 396 | # Built-in filename-based cache busting 397 | # ---------------------------------------------------------------------- 398 | 399 | # If you're not using the build script to manage your filename version revving, 400 | # you might want to consider enabling this, which will route requests for 401 | # /css/style.20110203.css to /css/style.css 402 | 403 | # To understand why this is important and a better idea than all.css?v1231, 404 | # read: github.com/h5bp/html5-boilerplate/wiki/cachebusting 405 | 406 | # 407 | # RewriteCond %{REQUEST_FILENAME} !-f 408 | # RewriteCond %{REQUEST_FILENAME} !-d 409 | # RewriteRule ^(.+)\.(\d+)\.(js|css|png|jpg|gif)$ $1.$3 [L] 410 | # 411 | 412 | 413 | # ---------------------------------------------------------------------- 414 | # Prevent SSL cert warnings 415 | # ---------------------------------------------------------------------- 416 | 417 | # Rewrite secure requests properly to prevent SSL cert warnings, e.g. prevent 418 | # https://www.example.com when your cert only allows https://secure.example.com 419 | 420 | # 421 | # RewriteCond %{SERVER_PORT} !^443 422 | # RewriteRule ^ https://example-domain-please-change-me.com%{REQUEST_URI} [R=301,L] 423 | # 424 | 425 | 426 | # ---------------------------------------------------------------------- 427 | # Prevent 404 errors for non-existing redirected folders 428 | # ---------------------------------------------------------------------- 429 | 430 | # without -MultiViews, Apache will give a 404 for a rewrite if a folder of the 431 | # same name does not exist. 432 | # webmasterworld.com/apache/3808792.htm 433 | 434 | Options -MultiViews 435 | 436 | 437 | # ---------------------------------------------------------------------- 438 | # Custom 404 page 439 | # ---------------------------------------------------------------------- 440 | 441 | # You can add custom pages to handle 500 or 403 pretty easily, if you like. 442 | # If you are hosting your site in subdirectory, adjust this accordingly 443 | # e.g. ErrorDocument 404 /subdir/404.html 444 | ErrorDocument 404 /404.html 445 | 446 | 447 | # ---------------------------------------------------------------------- 448 | # UTF-8 encoding 449 | # ---------------------------------------------------------------------- 450 | 451 | # Use UTF-8 encoding for anything served text/plain or text/html 452 | AddDefaultCharset utf-8 453 | 454 | # Force UTF-8 for a number of file formats 455 | AddCharset utf-8 .atom .css .js .json .rss .vtt .xml 456 | 457 | 458 | # ---------------------------------------------------------------------- 459 | # A little more security 460 | # ---------------------------------------------------------------------- 461 | 462 | # To avoid displaying the exact version number of Apache being used, add the 463 | # following to httpd.conf (it will not work in .htaccess): 464 | # ServerTokens Prod 465 | 466 | # "-Indexes" will have Apache block users from browsing folders without a 467 | # default document Usually you should leave this activated, because you 468 | # shouldn't allow everybody to surf through every folder on your server (which 469 | # includes rather private places like CMS system folders). 470 | 471 | Options -Indexes 472 | 473 | 474 | # Block access to "hidden" directories or files whose names begin with a 475 | # period. This includes directories used by version control systems such as 476 | # Subversion or Git. 477 | 478 | RewriteCond %{SCRIPT_FILENAME} -d [OR] 479 | RewriteCond %{SCRIPT_FILENAME} -f 480 | RewriteRule "(^|/)\." - [F] 481 | 482 | 483 | # Block access to backup and source files. These files may be left by some 484 | # text/html editors and pose a great security danger, when anyone can access 485 | # them. 486 | 487 | Order allow,deny 488 | Deny from all 489 | Satisfy All 490 | 491 | 492 | # If your server is not already configured as such, the following directive 493 | # should be uncommented in order to set PHP's register_globals option to OFF. 494 | # This closes a major security hole that is abused by most XSS (cross-site 495 | # scripting) attacks. For more information: http://php.net/register_globals 496 | # 497 | # IF REGISTER_GLOBALS DIRECTIVE CAUSES 500 INTERNAL SERVER ERRORS: 498 | # 499 | # Your server does not allow PHP directives to be set via .htaccess. In that 500 | # case you must make this change in your php.ini file instead. If you are 501 | # using a commercial web host, contact the administrators for assistance in 502 | # doing this. Not all servers allow local php.ini files, and they should 503 | # include all PHP configurations (not just this one), or you will effectively 504 | # reset everything to PHP defaults. Consult www.php.net for more detailed 505 | # information about setting PHP directives. 506 | 507 | # php_flag register_globals Off 508 | 509 | # Rename session cookie to something else, than PHPSESSID 510 | # php_value session.name sid 511 | 512 | # Disable magic quotes (This feature has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0.) 513 | # php_flag magic_quotes_gpc Off 514 | 515 | # Do not show you are using PHP 516 | # Note: Move this line to php.ini since it won't work in .htaccess 517 | # php_flag expose_php Off 518 | 519 | # Level of log detail - log all errors 520 | # php_value error_reporting -1 521 | 522 | # Write errors to log file 523 | # php_flag log_errors On 524 | 525 | # Do not display errors in browser (production - Off, development - On) 526 | # php_flag display_errors Off 527 | 528 | # Do not display startup errors (production - Off, development - On) 529 | # php_flag display_startup_errors Off 530 | 531 | # Format errors in plain text 532 | # Note: Leave this setting 'On' for xdebug's var_dump() output 533 | # php_flag html_errors Off 534 | 535 | # Show multiple occurrence of error 536 | # php_flag ignore_repeated_errors Off 537 | 538 | # Show same errors from different sources 539 | # php_flag ignore_repeated_source Off 540 | 541 | # Size limit for error messages 542 | # php_value log_errors_max_len 1024 543 | 544 | # Don't precede error with string (doesn't accept empty string, use whitespace if you need) 545 | # php_value error_prepend_string " " 546 | 547 | # Don't prepend to error (doesn't accept empty string, use whitespace if you need) 548 | # php_value error_append_string " " 549 | 550 | # Increase cookie security 551 | 552 | php_value session.cookie_httponly true 553 | 554 | -------------------------------------------------------------------------------- /app/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Page Not Found :( 7 | 141 | 142 | 143 |
144 |

Not found 145 | :( 146 |

147 |

Sorry, but the page you were trying to view does not exist.

148 |

It looks like this was the result of either:

149 | 153 | 157 | 158 |
159 | 160 | 161 | -------------------------------------------------------------------------------- /app/elements/app-globals/app-globals.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 33 | 144 | 145 | -------------------------------------------------------------------------------- /app/elements/app-globals/app-globals.scss: -------------------------------------------------------------------------------- 1 | :host { 2 | display: block; 3 | max-width: 1000px; 4 | margin: 0 auto; 5 | text-align: center; 6 | > * { 7 | text-align: left; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /app/elements/card-actions/card-actions.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 19 | 29 | 30 | -------------------------------------------------------------------------------- /app/elements/card-actions/card-actions.scss: -------------------------------------------------------------------------------- 1 | :host { 2 | display: inline-block; 3 | float: right; 4 | z-index: 2; 5 | position: relative; 6 | } 7 | 8 | .caret { 9 | width: 25px; 10 | display: inline-block; 11 | } 12 | 13 | .card-actions-list { 14 | position: absolute; 15 | top: 10%; 16 | right: 0; 17 | list-style: none; 18 | padding-left: 0; 19 | display: none; 20 | border: 1px solid #ddd; 21 | background: white; 22 | 23 | &.is-visible { 24 | display: block; 25 | } 26 | > li { 27 | white-space: nowrap; 28 | 29 | &:first-child { 30 | margin-top: 1em; 31 | } 32 | 33 | a { 34 | padding: .6em 2em; 35 | display: block; 36 | text-decoration: none; 37 | color: #222; 38 | &:hover { 39 | background: #EEE; 40 | } 41 | } 42 | } 43 | } 44 | 45 | .action-button { 46 | float: right; 47 | } 48 | -------------------------------------------------------------------------------- /app/elements/card-comment/card-comment.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 22 | 39 | 40 | -------------------------------------------------------------------------------- /app/elements/card-comment/card-comment.scss: -------------------------------------------------------------------------------- 1 | :host { 2 | display: block; 3 | } 4 | 5 | .comment { 6 | min-height: 64px; 7 | margin-top: 1em; 8 | } 9 | 10 | 11 | .comment-count { 12 | margin-top: 1em; 13 | } 14 | 15 | .pull-right { 16 | float: right; 17 | margin: 0 .5em; 18 | } 19 | -------------------------------------------------------------------------------- /app/elements/card-container/card-container.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 15 | 16 | -------------------------------------------------------------------------------- /app/elements/card-container/card-container.scss: -------------------------------------------------------------------------------- 1 | :host { 2 | display: inline-block; 3 | border: 1px solid #ccc; 4 | border-bottom-width: 4px; 5 | border-radius: 4px; 6 | padding: 15px; 7 | width: 450px; 8 | position: relative; 9 | background: white; 10 | margin: 1em; 11 | } 12 | 13 | -------------------------------------------------------------------------------- /app/elements/card-content/card-content.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 18 | 19 | -------------------------------------------------------------------------------- /app/elements/card-content/card-content.scss: -------------------------------------------------------------------------------- 1 | :host { 2 | display: block; 3 | } 4 | 5 | .img-media { 6 | width: 100%; 7 | max-width: 100%; 8 | height: auto; 9 | margin-top: 1em; 10 | } 11 | 12 | p { 13 | max-width: 80%; 14 | margin-top: .3em; 15 | } 16 | -------------------------------------------------------------------------------- /app/elements/card-context/card-context.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 18 | 19 | -------------------------------------------------------------------------------- /app/elements/card-context/card-context.scss: -------------------------------------------------------------------------------- 1 | :host { 2 | display: block; 3 | border-bottom: 1px solid #CCC; 4 | margin-bottom: 1em; 5 | float: left; 6 | width: 100%; 7 | } 8 | 9 | .context-image { 10 | width: 32px; 11 | height: 32px; 12 | float: right; 13 | } 14 | 15 | .context-name { 16 | float: left; 17 | line-height: 2; 18 | } 19 | -------------------------------------------------------------------------------- /app/elements/card-new-comment/card-new-comment.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 20 | 53 | 54 | -------------------------------------------------------------------------------- /app/elements/card-new-comment/card-new-comment.scss: -------------------------------------------------------------------------------- 1 | :host { 2 | display: block; 3 | } 4 | 5 | .new-comment { 6 | display: inline-block; 7 | 8 | &.editing { 9 | height: 64px; 10 | margin-bottom: 1em; 11 | } 12 | } 13 | 14 | .post-button { 15 | border: none; 16 | background: #53a93f; 17 | border-radius: 2px; 18 | border: 1px solid; 19 | color: white; 20 | font-weight: bold; 21 | padding: .8em 1em; 22 | } 23 | 24 | .cancel-button { 25 | border: none; 26 | background: white; 27 | border-radius: 2px; 28 | border: 1px solid; 29 | font-weight: bold; 30 | padding: .8em 1em; 31 | } 32 | 33 | .comment-actions { 34 | margin-top: 1em; 35 | } 36 | 37 | .new-comment-holder { 38 | margin-top: 1em; 39 | } 40 | 41 | .comment-avatar { 42 | width: 64px; 43 | margin-right: 1em; 44 | float: left; 45 | background: #eee; 46 | } 47 | 48 | .comment-input-holder { 49 | width: calc(100% - (64px + 2em)); 50 | float: left; 51 | > input { 52 | width: 100%; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /app/elements/card-plus/card-plus.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 13 | 34 | 35 | -------------------------------------------------------------------------------- /app/elements/card-plus/card-plus.scss: -------------------------------------------------------------------------------- 1 | :host { 2 | display: block; 3 | margin-top: 1em; 4 | } 5 | 6 | 7 | .plus-button { 8 | border: 1px solid #222; 9 | text-align: center; 10 | border-radius: 2px; 11 | padding: .5em 1em; 12 | background: white; 13 | cursor: pointer; 14 | font-weight: bold; 15 | &.plus-one { 16 | background: #dd4b39; 17 | color: white; 18 | } 19 | } 20 | 21 | .plus-user-section { 22 | float: right; 23 | } 24 | 25 | .plus-users { 26 | width: 32px; 27 | background: #eee; 28 | border-radius: 2px; 29 | } 30 | -------------------------------------------------------------------------------- /app/elements/card-tags/card-tags.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16 | 23 | 24 | -------------------------------------------------------------------------------- /app/elements/card-tags/card-tags.scss: -------------------------------------------------------------------------------- 1 | :host { 2 | display: block; 3 | position: absolute; 4 | right: -4px; 5 | float: right; 6 | z-index: 1; 7 | } 8 | 9 | .tag-list { 10 | list-style: none; 11 | padding: 0; 12 | margin: 0; 13 | border: 1px solid #eee; 14 | height: 28px; // Height of one tag 15 | overflow: hidden; 16 | background: white; 17 | &:hover { 18 | height: auto; 19 | } 20 | > li { 21 | border-right: 4px solid; 22 | font-size: 14px; 23 | padding: .4em 1em; 24 | text-align: right; 25 | &:hover { 26 | background: #eee; 27 | } 28 | a { 29 | color: #222; 30 | text-decoration: none; 31 | } 32 | &.black{ 33 | @for $i from 1 through 5 { 34 | &:nth-of-type(#{$i}) { 35 | border-right-color: rgba(black, ((100/$i) / 100)); 36 | } 37 | } 38 | } 39 | &.blue{ 40 | @for $i from 1 through 5 { 41 | &:nth-of-type(#{$i}) { 42 | border-right-color: rgba(#427fed, ((100/$i) / 100)); 43 | } 44 | } 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /app/elements/card-user/card-user.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 12 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /app/elements/card-user/card-user.scss: -------------------------------------------------------------------------------- 1 | :host { 2 | display: block; 3 | } 4 | 5 | img { 6 | width: 64px; 7 | background: #ddd; 8 | float: left; 9 | margin-right: 1em; 10 | } 11 | 12 | .imgCircle { 13 | border-radius: 50%; 14 | } 15 | 16 | .username { 17 | display: inline-block; 18 | font-weight: bold; 19 | font-size: 14px; 20 | } 21 | -------------------------------------------------------------------------------- /app/elements/elements.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /app/favicon.ico: -------------------------------------------------------------------------------- 1 |   �( @   -2Op"=p�Jt��Jt��b���������������������������������������������������b���Jt��Jt��"=p�Op-2O`O�O�O�O�O�O�O� $\�Jt��������������v���v���������������Jt�� $\�O�O�O�O�O�O�O�O`O�O�O�O�O�O�O�O�O�O� ;n�s���>���>���>���>���s��� ;n�O�O�O�O�O�O�O�O�O�O�O`O�O�O�O�O�O�O�O�O�O� $\�]���^n��^n��]��� $\�O�O�O�O�O�O�O�O�O�O�O`O�O�O�O�O�O�O�O�O�O�O�n�*��*��n�O�O�O�O�O�O�O�O�O�O�O�  O�O�O�O�O�O�O�O�O�O�O�5>Y�5>Y�O�O�O�O�O�O�O�O�O�O�O�  -2O�O�O�O�O�O�O�O�O�O�&6e�&6e�O�O�O�O�O�O�O�O�O�O�-25r�4���E��� $\�O�O�O�O�O�O�O�O�O�O�O�O�O�O�O�O�O�O� $\�E���4���5r�5r�E���M���M���v���0\��O�O�O�O�O�O�O� $\� $\�O�O�O�O�O�O�O�0\��v���M���M���E���5r�)��p&��p��&��������������b���Jt��Jt��Jt��0\��#i��.r��.r��#i��0\��Jt��Jt��Jt��b���������������&��p��&��)��p4���&��-���_������������������]���]�������7���p�����������p���7�������]���]�������������������_��-���-���4���qֈp��p��p����������������������p���7���#i��p�����������p���#i��7���p�����������������������p��&��-���qֈ8��(p��p��I���v���v���]���7���n���v���p���#i��]���v���v���]���#i��p���v���n���7���]���v���v���I���-���-���8��(;��`-���M���7���7���7���.r��R��E��R��E��7���7���7���7���E��R��E��R��.r��7���7���7���M���M���;��`���������������������������z��������������������������� 2 | �  ��� 3 | � 9� 9� 9� 9� 9� 9� 9� 9� 4 |  �n�n� 5 |  � 9� 9� 9� 9� 9� 9� 9� 9� 6 | ����*�x*��*��*��*��*��*��*��n�&��#��&��&��n�*��*��*��*��*��*��*��*�x*ݟ*��*��*��*��*��*��!��#��&��#��&��*��!��!��*��*��*��*��*��*��*ݟ*ݿ*��*��*��*��*��*��n�*��*�� 9� 9�*��*���*��*��*��*��*��*��*ݿ*��*��*��*��*��*��*��!��#��&��&��&��*��#��!��*��*��*��*��*��*��*��  ��������I�&��&��&��&��I���������  U��������� 7 |  �n�n� 8 |  ����������-2z����������������������z������������������������ 9 | ����������������������� 10 | ������������������������� 11 | ������������������������-2����������������������U�������������������z5r������������������-25r�U�����������z  ������������������������������?��� -------------------------------------------------------------------------------- /app/images/down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinayraghu/cards-ui/9ced0b39788951b9cb6c3b5609e0d6dc79a167bb/app/images/down.png -------------------------------------------------------------------------------- /app/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | poly foo 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /app/robots.txt: -------------------------------------------------------------------------------- 1 | # robotstxt.org 2 | 3 | User-agent: * 4 | Disallow: 5 | -------------------------------------------------------------------------------- /app/scripts/app.js: -------------------------------------------------------------------------------- 1 | (function (document) { 2 | 'use strict'; 3 | 4 | 5 | // wrap document so it plays nice with other libraries 6 | // http://www.polymer-project.org/platform/shadow-dom.html#wrappers 7 | })(wrap(document)); 8 | -------------------------------------------------------------------------------- /app/styles/main.scss: -------------------------------------------------------------------------------- 1 | @import url(http://fonts.googleapis.com/css?family=Lato:400,700,300italic); 2 | 3 | body { 4 | background: #eee; 5 | font-family: 'Lato', sans-serif; 6 | color: #333; 7 | padding: 4em; 8 | } 9 | -------------------------------------------------------------------------------- /app/test/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Core Elements Test Runner 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /app/test/yo-greeting-basic.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | yo-greeting-basic 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /app/test/yo-list-basic.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | yo-list-basic 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cards-ui", 3 | "version": "0.0.0", 4 | "dependencies": { 5 | "polymer": "Polymer/polymer#^0.5.4" 6 | }, 7 | "devDependencies": { 8 | "web-component-tester": "Polymer/web-component-tester#^2.2.3" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /bower_components/core-component-page/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "core-component-page", 3 | "private": true, 4 | "dependencies": { 5 | "webcomponentsjs": "Polymer/webcomponentsjs#^0.5", 6 | "polymer": "Polymer/polymer#^0.5" 7 | }, 8 | "version": "0.5.5", 9 | "homepage": "https://github.com/Polymer/core-component-page", 10 | "_release": "0.5.5", 11 | "_resolution": { 12 | "type": "version", 13 | "tag": "0.5.5", 14 | "commit": "f91588e0297bb3e8e723d4558ab015cf82885571" 15 | }, 16 | "_source": "git://github.com/Polymer/core-component-page.git", 17 | "_target": "^0.5", 18 | "_originalSource": "Polymer/core-component-page" 19 | } -------------------------------------------------------------------------------- /bower_components/core-component-page/README.md: -------------------------------------------------------------------------------- 1 | core-component-page 2 | =================== 3 | 4 | See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-component-page) for more information. 5 | 6 | Note: this is the vulcanized version of [`core-component-page-dev`](https://github.com/Polymer/core-component-page-dev) (the source). 7 | -------------------------------------------------------------------------------- /bower_components/core-component-page/bowager-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinayraghu/cards-ui/9ced0b39788951b9cb6c3b5609e0d6dc79a167bb/bower_components/core-component-page/bowager-logo.png -------------------------------------------------------------------------------- /bower_components/core-component-page/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "core-component-page", 3 | "private": true, 4 | "dependencies": { 5 | "webcomponentsjs": "Polymer/webcomponentsjs#^0.5", 6 | "polymer": "Polymer/polymer#^0.5" 7 | }, 8 | "version": "0.5.5" 9 | } -------------------------------------------------------------------------------- /bower_components/core-component-page/demo.html: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /bower_components/core-component-page/index.html: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /bower_components/polymer/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "polymer", 3 | "description": "Polymer is a new type of library for the web, built on top of Web Components, and designed to leverage the evolving web platform on modern browsers.", 4 | "homepage": "http://www.polymer-project.org/", 5 | "keywords": [ 6 | "util", 7 | "client", 8 | "browser", 9 | "web components", 10 | "web-components" 11 | ], 12 | "author": "Polymer Authors ", 13 | "private": true, 14 | "dependencies": { 15 | "core-component-page": "Polymer/core-component-page#^0.5", 16 | "webcomponentsjs": "Polymer/webcomponentsjs#^0.5" 17 | }, 18 | "devDependencies": { 19 | "tools": "Polymer/tools#master", 20 | "web-component-tester": "Polymer/web-component-tester#^1.4.2" 21 | }, 22 | "version": "0.5.5", 23 | "_release": "0.5.5", 24 | "_resolution": { 25 | "type": "version", 26 | "tag": "0.5.5", 27 | "commit": "b94b680c966fc9ea86bc8f14b3af6f13d77f217a" 28 | }, 29 | "_source": "git://github.com/Polymer/polymer.git", 30 | "_target": "^0.5.4", 31 | "_originalSource": "Polymer/polymer" 32 | } -------------------------------------------------------------------------------- /bower_components/polymer/README.md: -------------------------------------------------------------------------------- 1 | # Polymer 2 | 3 | [![Polymer build status](http://www.polymer-project.org/build/polymer-dev/status.png "Polymer build status")](http://build.chromium.org/p/client.polymer/waterfall) 4 | 5 | ## Brief Overview 6 | 7 | For more detailed info goto [http://polymer-project.org/](http://polymer-project.org/). 8 | 9 | Polymer is a new type of library for the web, designed to leverage the existing browser infrastructure to provide the encapsulation and extendability currently only available in JS libraries. 10 | 11 | Polymer is based on a set of future technologies, including [Shadow DOM](http://w3c.github.io/webcomponents/spec/shadow/), [Custom Elements](http://w3c.github.io/webcomponents/spec/custom/) and Model Driven Views. Currently these technologies are implemented as polyfills or shims, but as browsers adopt these features natively, the platform code that drives Polymer evacipates, leaving only the value-adds. 12 | 13 | ## Tools & Testing 14 | 15 | For running tests or building minified files, consult the [tooling information](https://www.polymer-project.org/resources/tooling-strategy.html). 16 | 17 | ## Releases 18 | 19 | [Release (tagged) versions](https://github.com/Polymer/polymer/releases) of Polymer include concatenated and minified sources for your convenience. 20 | 21 | [![Analytics](https://ga-beacon.appspot.com/UA-39334307-2/Polymer/polymer/README)](https://github.com/igrigorik/ga-beacon) 22 | -------------------------------------------------------------------------------- /bower_components/polymer/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "polymer", 3 | "description": "Polymer is a new type of library for the web, built on top of Web Components, and designed to leverage the evolving web platform on modern browsers.", 4 | "homepage": "http://www.polymer-project.org/", 5 | "keywords": [ 6 | "util", 7 | "client", 8 | "browser", 9 | "web components", 10 | "web-components" 11 | ], 12 | "author": "Polymer Authors ", 13 | "private": true, 14 | "dependencies": { 15 | "core-component-page": "Polymer/core-component-page#^0.5", 16 | "webcomponentsjs": "Polymer/webcomponentsjs#^0.5" 17 | }, 18 | "devDependencies": { 19 | "tools": "Polymer/tools#master", 20 | "web-component-tester": "Polymer/web-component-tester#^1.4.2" 21 | }, 22 | "version": "0.5.5" 23 | } -------------------------------------------------------------------------------- /bower_components/polymer/layout.html: -------------------------------------------------------------------------------- 1 | 9 | -------------------------------------------------------------------------------- /bower_components/polymer/polymer.html: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /bower_components/web-component-tester/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "web-component-tester", 3 | "description": "web-component-tester makes testing your web components a breeze!", 4 | "main": [ 5 | "browser.js", 6 | "environment.js" 7 | ], 8 | "license": "http://polymer.github.io/LICENSE.txt", 9 | "ignore": [ 10 | "*", 11 | "!/browser.js", 12 | "!/environment.js" 13 | ], 14 | "keywords": [ 15 | "browser", 16 | "grunt", 17 | "gruntplugin", 18 | "gulp", 19 | "polymer", 20 | "test", 21 | "testing", 22 | "web component", 23 | "web" 24 | ], 25 | "devDependencies": { 26 | "webcomponentsjs": "Polymer/webcomponentsjs#^0.5.0" 27 | }, 28 | "homepage": "https://github.com/Polymer/web-component-tester", 29 | "version": "2.2.6", 30 | "_release": "2.2.6", 31 | "_resolution": { 32 | "type": "version", 33 | "tag": "v2.2.6", 34 | "commit": "92574c7b4126d948b6e7ba3f7c1a7ed439f02a26" 35 | }, 36 | "_source": "git://github.com/Polymer/web-component-tester.git", 37 | "_target": "^2.2.3", 38 | "_originalSource": "Polymer/web-component-tester" 39 | } -------------------------------------------------------------------------------- /bower_components/web-component-tester/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "web-component-tester", 3 | "description": "web-component-tester makes testing your web components a breeze!", 4 | "main": [ 5 | "browser.js", 6 | "environment.js" 7 | ], 8 | "license": "http://polymer.github.io/LICENSE.txt", 9 | "ignore": [ 10 | "*", 11 | "!/browser.js", 12 | "!/environment.js" 13 | ], 14 | "keywords": [ 15 | "browser", 16 | "grunt", 17 | "gruntplugin", 18 | "gulp", 19 | "polymer", 20 | "test", 21 | "testing", 22 | "web component", 23 | "web" 24 | ], 25 | "devDependencies": { 26 | "webcomponentsjs": "Polymer/webcomponentsjs#^0.5.0" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /bower_components/webcomponentsjs/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "webcomponentsjs", 3 | "main": "webcomponents.js", 4 | "version": "0.5.5", 5 | "homepage": "http://webcomponents.org", 6 | "authors": [ 7 | "The Polymer Authors" 8 | ], 9 | "keywords": [ 10 | "webcomponents" 11 | ], 12 | "license": "BSD", 13 | "ignore": [], 14 | "_release": "0.5.5", 15 | "_resolution": { 16 | "type": "version", 17 | "tag": "0.5.5", 18 | "commit": "46f8f2665f7b91e3f248bc9bdb20a29b91f921b5" 19 | }, 20 | "_source": "git://github.com/Polymer/webcomponentsjs.git", 21 | "_target": "^0.5", 22 | "_originalSource": "Polymer/webcomponentsjs" 23 | } -------------------------------------------------------------------------------- /bower_components/webcomponentsjs/CustomElements.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. 4 | * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 5 | * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 6 | * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 7 | * Code distributed by Google as part of the polymer project is also 8 | * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 9 | */ 10 | // @version 0.5.5 11 | if (typeof WeakMap === "undefined") { 12 | (function() { 13 | var defineProperty = Object.defineProperty; 14 | var counter = Date.now() % 1e9; 15 | var WeakMap = function() { 16 | this.name = "__st" + (Math.random() * 1e9 >>> 0) + (counter++ + "__"); 17 | }; 18 | WeakMap.prototype = { 19 | set: function(key, value) { 20 | var entry = key[this.name]; 21 | if (entry && entry[0] === key) entry[1] = value; else defineProperty(key, this.name, { 22 | value: [ key, value ], 23 | writable: true 24 | }); 25 | return this; 26 | }, 27 | get: function(key) { 28 | var entry; 29 | return (entry = key[this.name]) && entry[0] === key ? entry[1] : undefined; 30 | }, 31 | "delete": function(key) { 32 | var entry = key[this.name]; 33 | if (!entry || entry[0] !== key) return false; 34 | entry[0] = entry[1] = undefined; 35 | return true; 36 | }, 37 | has: function(key) { 38 | var entry = key[this.name]; 39 | if (!entry) return false; 40 | return entry[0] === key; 41 | } 42 | }; 43 | window.WeakMap = WeakMap; 44 | })(); 45 | } 46 | 47 | window.CustomElements = window.CustomElements || { 48 | flags: {} 49 | }; 50 | 51 | (function(scope) { 52 | var flags = scope.flags; 53 | var modules = []; 54 | var addModule = function(module) { 55 | modules.push(module); 56 | }; 57 | var initializeModules = function() { 58 | modules.forEach(function(module) { 59 | module(scope); 60 | }); 61 | }; 62 | scope.addModule = addModule; 63 | scope.initializeModules = initializeModules; 64 | scope.hasNative = Boolean(document.registerElement); 65 | scope.useNative = !flags.register && scope.hasNative && !window.ShadowDOMPolyfill && (!window.HTMLImports || HTMLImports.useNative); 66 | })(CustomElements); 67 | 68 | CustomElements.addModule(function(scope) { 69 | var IMPORT_LINK_TYPE = window.HTMLImports ? HTMLImports.IMPORT_LINK_TYPE : "none"; 70 | function forSubtree(node, cb) { 71 | findAllElements(node, function(e) { 72 | if (cb(e)) { 73 | return true; 74 | } 75 | forRoots(e, cb); 76 | }); 77 | forRoots(node, cb); 78 | } 79 | function findAllElements(node, find, data) { 80 | var e = node.firstElementChild; 81 | if (!e) { 82 | e = node.firstChild; 83 | while (e && e.nodeType !== Node.ELEMENT_NODE) { 84 | e = e.nextSibling; 85 | } 86 | } 87 | while (e) { 88 | if (find(e, data) !== true) { 89 | findAllElements(e, find, data); 90 | } 91 | e = e.nextElementSibling; 92 | } 93 | return null; 94 | } 95 | function forRoots(node, cb) { 96 | var root = node.shadowRoot; 97 | while (root) { 98 | forSubtree(root, cb); 99 | root = root.olderShadowRoot; 100 | } 101 | } 102 | var processingDocuments; 103 | function forDocumentTree(doc, cb) { 104 | processingDocuments = []; 105 | _forDocumentTree(doc, cb); 106 | processingDocuments = null; 107 | } 108 | function _forDocumentTree(doc, cb) { 109 | doc = wrap(doc); 110 | if (processingDocuments.indexOf(doc) >= 0) { 111 | return; 112 | } 113 | processingDocuments.push(doc); 114 | var imports = doc.querySelectorAll("link[rel=" + IMPORT_LINK_TYPE + "]"); 115 | for (var i = 0, l = imports.length, n; i < l && (n = imports[i]); i++) { 116 | if (n.import) { 117 | _forDocumentTree(n.import, cb); 118 | } 119 | } 120 | cb(doc); 121 | } 122 | scope.forDocumentTree = forDocumentTree; 123 | scope.forSubtree = forSubtree; 124 | }); 125 | 126 | CustomElements.addModule(function(scope) { 127 | var flags = scope.flags; 128 | var forSubtree = scope.forSubtree; 129 | var forDocumentTree = scope.forDocumentTree; 130 | function addedNode(node) { 131 | return added(node) || addedSubtree(node); 132 | } 133 | function added(node) { 134 | if (scope.upgrade(node)) { 135 | return true; 136 | } 137 | attached(node); 138 | } 139 | function addedSubtree(node) { 140 | forSubtree(node, function(e) { 141 | if (added(e)) { 142 | return true; 143 | } 144 | }); 145 | } 146 | function attachedNode(node) { 147 | attached(node); 148 | if (inDocument(node)) { 149 | forSubtree(node, function(e) { 150 | attached(e); 151 | }); 152 | } 153 | } 154 | var hasPolyfillMutations = !window.MutationObserver || window.MutationObserver === window.JsMutationObserver; 155 | scope.hasPolyfillMutations = hasPolyfillMutations; 156 | var isPendingMutations = false; 157 | var pendingMutations = []; 158 | function deferMutation(fn) { 159 | pendingMutations.push(fn); 160 | if (!isPendingMutations) { 161 | isPendingMutations = true; 162 | setTimeout(takeMutations); 163 | } 164 | } 165 | function takeMutations() { 166 | isPendingMutations = false; 167 | var $p = pendingMutations; 168 | for (var i = 0, l = $p.length, p; i < l && (p = $p[i]); i++) { 169 | p(); 170 | } 171 | pendingMutations = []; 172 | } 173 | function attached(element) { 174 | if (hasPolyfillMutations) { 175 | deferMutation(function() { 176 | _attached(element); 177 | }); 178 | } else { 179 | _attached(element); 180 | } 181 | } 182 | function _attached(element) { 183 | if (element.__upgraded__ && (element.attachedCallback || element.detachedCallback)) { 184 | if (!element.__attached && inDocument(element)) { 185 | element.__attached = true; 186 | if (element.attachedCallback) { 187 | element.attachedCallback(); 188 | } 189 | } 190 | } 191 | } 192 | function detachedNode(node) { 193 | detached(node); 194 | forSubtree(node, function(e) { 195 | detached(e); 196 | }); 197 | } 198 | function detached(element) { 199 | if (hasPolyfillMutations) { 200 | deferMutation(function() { 201 | _detached(element); 202 | }); 203 | } else { 204 | _detached(element); 205 | } 206 | } 207 | function _detached(element) { 208 | if (element.__upgraded__ && (element.attachedCallback || element.detachedCallback)) { 209 | if (element.__attached && !inDocument(element)) { 210 | element.__attached = false; 211 | if (element.detachedCallback) { 212 | element.detachedCallback(); 213 | } 214 | } 215 | } 216 | } 217 | function inDocument(element) { 218 | var p = element; 219 | var doc = wrap(document); 220 | while (p) { 221 | if (p == doc) { 222 | return true; 223 | } 224 | p = p.parentNode || p.host; 225 | } 226 | } 227 | function watchShadow(node) { 228 | if (node.shadowRoot && !node.shadowRoot.__watched) { 229 | flags.dom && console.log("watching shadow-root for: ", node.localName); 230 | var root = node.shadowRoot; 231 | while (root) { 232 | observe(root); 233 | root = root.olderShadowRoot; 234 | } 235 | } 236 | } 237 | function handler(mutations) { 238 | if (flags.dom) { 239 | var mx = mutations[0]; 240 | if (mx && mx.type === "childList" && mx.addedNodes) { 241 | if (mx.addedNodes) { 242 | var d = mx.addedNodes[0]; 243 | while (d && d !== document && !d.host) { 244 | d = d.parentNode; 245 | } 246 | var u = d && (d.URL || d._URL || d.host && d.host.localName) || ""; 247 | u = u.split("/?").shift().split("/").pop(); 248 | } 249 | } 250 | console.group("mutations (%d) [%s]", mutations.length, u || ""); 251 | } 252 | mutations.forEach(function(mx) { 253 | if (mx.type === "childList") { 254 | forEach(mx.addedNodes, function(n) { 255 | if (!n.localName) { 256 | return; 257 | } 258 | addedNode(n); 259 | }); 260 | forEach(mx.removedNodes, function(n) { 261 | if (!n.localName) { 262 | return; 263 | } 264 | detachedNode(n); 265 | }); 266 | } 267 | }); 268 | flags.dom && console.groupEnd(); 269 | } 270 | function takeRecords(node) { 271 | node = wrap(node); 272 | if (!node) { 273 | node = wrap(document); 274 | } 275 | while (node.parentNode) { 276 | node = node.parentNode; 277 | } 278 | var observer = node.__observer; 279 | if (observer) { 280 | handler(observer.takeRecords()); 281 | takeMutations(); 282 | } 283 | } 284 | var forEach = Array.prototype.forEach.call.bind(Array.prototype.forEach); 285 | function observe(inRoot) { 286 | if (inRoot.__observer) { 287 | return; 288 | } 289 | var observer = new MutationObserver(handler); 290 | observer.observe(inRoot, { 291 | childList: true, 292 | subtree: true 293 | }); 294 | inRoot.__observer = observer; 295 | } 296 | function upgradeDocument(doc) { 297 | doc = wrap(doc); 298 | flags.dom && console.group("upgradeDocument: ", doc.baseURI.split("/").pop()); 299 | addedNode(doc); 300 | observe(doc); 301 | flags.dom && console.groupEnd(); 302 | } 303 | function upgradeDocumentTree(doc) { 304 | forDocumentTree(doc, upgradeDocument); 305 | } 306 | var originalCreateShadowRoot = Element.prototype.createShadowRoot; 307 | if (originalCreateShadowRoot) { 308 | Element.prototype.createShadowRoot = function() { 309 | var root = originalCreateShadowRoot.call(this); 310 | CustomElements.watchShadow(this); 311 | return root; 312 | }; 313 | } 314 | scope.watchShadow = watchShadow; 315 | scope.upgradeDocumentTree = upgradeDocumentTree; 316 | scope.upgradeSubtree = addedSubtree; 317 | scope.upgradeAll = addedNode; 318 | scope.attachedNode = attachedNode; 319 | scope.takeRecords = takeRecords; 320 | }); 321 | 322 | CustomElements.addModule(function(scope) { 323 | var flags = scope.flags; 324 | function upgrade(node) { 325 | if (!node.__upgraded__ && node.nodeType === Node.ELEMENT_NODE) { 326 | var is = node.getAttribute("is"); 327 | var definition = scope.getRegisteredDefinition(is || node.localName); 328 | if (definition) { 329 | if (is && definition.tag == node.localName) { 330 | return upgradeWithDefinition(node, definition); 331 | } else if (!is && !definition.extends) { 332 | return upgradeWithDefinition(node, definition); 333 | } 334 | } 335 | } 336 | } 337 | function upgradeWithDefinition(element, definition) { 338 | flags.upgrade && console.group("upgrade:", element.localName); 339 | if (definition.is) { 340 | element.setAttribute("is", definition.is); 341 | } 342 | implementPrototype(element, definition); 343 | element.__upgraded__ = true; 344 | created(element); 345 | scope.attachedNode(element); 346 | scope.upgradeSubtree(element); 347 | flags.upgrade && console.groupEnd(); 348 | return element; 349 | } 350 | function implementPrototype(element, definition) { 351 | if (Object.__proto__) { 352 | element.__proto__ = definition.prototype; 353 | } else { 354 | customMixin(element, definition.prototype, definition.native); 355 | element.__proto__ = definition.prototype; 356 | } 357 | } 358 | function customMixin(inTarget, inSrc, inNative) { 359 | var used = {}; 360 | var p = inSrc; 361 | while (p !== inNative && p !== HTMLElement.prototype) { 362 | var keys = Object.getOwnPropertyNames(p); 363 | for (var i = 0, k; k = keys[i]; i++) { 364 | if (!used[k]) { 365 | Object.defineProperty(inTarget, k, Object.getOwnPropertyDescriptor(p, k)); 366 | used[k] = 1; 367 | } 368 | } 369 | p = Object.getPrototypeOf(p); 370 | } 371 | } 372 | function created(element) { 373 | if (element.createdCallback) { 374 | element.createdCallback(); 375 | } 376 | } 377 | scope.upgrade = upgrade; 378 | scope.upgradeWithDefinition = upgradeWithDefinition; 379 | scope.implementPrototype = implementPrototype; 380 | }); 381 | 382 | CustomElements.addModule(function(scope) { 383 | var upgradeDocumentTree = scope.upgradeDocumentTree; 384 | var upgrade = scope.upgrade; 385 | var upgradeWithDefinition = scope.upgradeWithDefinition; 386 | var implementPrototype = scope.implementPrototype; 387 | var useNative = scope.useNative; 388 | function register(name, options) { 389 | var definition = options || {}; 390 | if (!name) { 391 | throw new Error("document.registerElement: first argument `name` must not be empty"); 392 | } 393 | if (name.indexOf("-") < 0) { 394 | throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '" + String(name) + "'."); 395 | } 396 | if (isReservedTag(name)) { 397 | throw new Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '" + String(name) + "'. The type name is invalid."); 398 | } 399 | if (getRegisteredDefinition(name)) { 400 | throw new Error("DuplicateDefinitionError: a type with name '" + String(name) + "' is already registered"); 401 | } 402 | if (!definition.prototype) { 403 | definition.prototype = Object.create(HTMLElement.prototype); 404 | } 405 | definition.__name = name.toLowerCase(); 406 | definition.lifecycle = definition.lifecycle || {}; 407 | definition.ancestry = ancestry(definition.extends); 408 | resolveTagName(definition); 409 | resolvePrototypeChain(definition); 410 | overrideAttributeApi(definition.prototype); 411 | registerDefinition(definition.__name, definition); 412 | definition.ctor = generateConstructor(definition); 413 | definition.ctor.prototype = definition.prototype; 414 | definition.prototype.constructor = definition.ctor; 415 | if (scope.ready) { 416 | upgradeDocumentTree(document); 417 | } 418 | return definition.ctor; 419 | } 420 | function overrideAttributeApi(prototype) { 421 | if (prototype.setAttribute._polyfilled) { 422 | return; 423 | } 424 | var setAttribute = prototype.setAttribute; 425 | prototype.setAttribute = function(name, value) { 426 | changeAttribute.call(this, name, value, setAttribute); 427 | }; 428 | var removeAttribute = prototype.removeAttribute; 429 | prototype.removeAttribute = function(name) { 430 | changeAttribute.call(this, name, null, removeAttribute); 431 | }; 432 | prototype.setAttribute._polyfilled = true; 433 | } 434 | function changeAttribute(name, value, operation) { 435 | name = name.toLowerCase(); 436 | var oldValue = this.getAttribute(name); 437 | operation.apply(this, arguments); 438 | var newValue = this.getAttribute(name); 439 | if (this.attributeChangedCallback && newValue !== oldValue) { 440 | this.attributeChangedCallback(name, oldValue, newValue); 441 | } 442 | } 443 | function isReservedTag(name) { 444 | for (var i = 0; i < reservedTagList.length; i++) { 445 | if (name === reservedTagList[i]) { 446 | return true; 447 | } 448 | } 449 | } 450 | var reservedTagList = [ "annotation-xml", "color-profile", "font-face", "font-face-src", "font-face-uri", "font-face-format", "font-face-name", "missing-glyph" ]; 451 | function ancestry(extnds) { 452 | var extendee = getRegisteredDefinition(extnds); 453 | if (extendee) { 454 | return ancestry(extendee.extends).concat([ extendee ]); 455 | } 456 | return []; 457 | } 458 | function resolveTagName(definition) { 459 | var baseTag = definition.extends; 460 | for (var i = 0, a; a = definition.ancestry[i]; i++) { 461 | baseTag = a.is && a.tag; 462 | } 463 | definition.tag = baseTag || definition.__name; 464 | if (baseTag) { 465 | definition.is = definition.__name; 466 | } 467 | } 468 | function resolvePrototypeChain(definition) { 469 | if (!Object.__proto__) { 470 | var nativePrototype = HTMLElement.prototype; 471 | if (definition.is) { 472 | var inst = document.createElement(definition.tag); 473 | var expectedPrototype = Object.getPrototypeOf(inst); 474 | if (expectedPrototype === definition.prototype) { 475 | nativePrototype = expectedPrototype; 476 | } 477 | } 478 | var proto = definition.prototype, ancestor; 479 | while (proto && proto !== nativePrototype) { 480 | ancestor = Object.getPrototypeOf(proto); 481 | proto.__proto__ = ancestor; 482 | proto = ancestor; 483 | } 484 | definition.native = nativePrototype; 485 | } 486 | } 487 | function instantiate(definition) { 488 | return upgradeWithDefinition(domCreateElement(definition.tag), definition); 489 | } 490 | var registry = {}; 491 | function getRegisteredDefinition(name) { 492 | if (name) { 493 | return registry[name.toLowerCase()]; 494 | } 495 | } 496 | function registerDefinition(name, definition) { 497 | registry[name] = definition; 498 | } 499 | function generateConstructor(definition) { 500 | return function() { 501 | return instantiate(definition); 502 | }; 503 | } 504 | var HTML_NAMESPACE = "http://www.w3.org/1999/xhtml"; 505 | function createElementNS(namespace, tag, typeExtension) { 506 | if (namespace === HTML_NAMESPACE) { 507 | return createElement(tag, typeExtension); 508 | } else { 509 | return domCreateElementNS(namespace, tag); 510 | } 511 | } 512 | function createElement(tag, typeExtension) { 513 | var definition = getRegisteredDefinition(typeExtension || tag); 514 | if (definition) { 515 | if (tag == definition.tag && typeExtension == definition.is) { 516 | return new definition.ctor(); 517 | } 518 | if (!typeExtension && !definition.is) { 519 | return new definition.ctor(); 520 | } 521 | } 522 | var element; 523 | if (typeExtension) { 524 | element = createElement(tag); 525 | element.setAttribute("is", typeExtension); 526 | return element; 527 | } 528 | element = domCreateElement(tag); 529 | if (tag.indexOf("-") >= 0) { 530 | implementPrototype(element, HTMLElement); 531 | } 532 | return element; 533 | } 534 | function cloneNode(deep) { 535 | var n = domCloneNode.call(this, deep); 536 | upgrade(n); 537 | return n; 538 | } 539 | var domCreateElement = document.createElement.bind(document); 540 | var domCreateElementNS = document.createElementNS.bind(document); 541 | var domCloneNode = Node.prototype.cloneNode; 542 | var isInstance; 543 | if (!Object.__proto__ && !useNative) { 544 | isInstance = function(obj, ctor) { 545 | var p = obj; 546 | while (p) { 547 | if (p === ctor.prototype) { 548 | return true; 549 | } 550 | p = p.__proto__; 551 | } 552 | return false; 553 | }; 554 | } else { 555 | isInstance = function(obj, base) { 556 | return obj instanceof base; 557 | }; 558 | } 559 | document.registerElement = register; 560 | document.createElement = createElement; 561 | document.createElementNS = createElementNS; 562 | Node.prototype.cloneNode = cloneNode; 563 | scope.registry = registry; 564 | scope.instanceof = isInstance; 565 | scope.reservedTagList = reservedTagList; 566 | scope.getRegisteredDefinition = getRegisteredDefinition; 567 | document.register = document.registerElement; 568 | }); 569 | 570 | (function(scope) { 571 | var useNative = scope.useNative; 572 | var initializeModules = scope.initializeModules; 573 | var isIE11OrOlder = /Trident/.test(navigator.userAgent); 574 | if (useNative) { 575 | var nop = function() {}; 576 | scope.watchShadow = nop; 577 | scope.upgrade = nop; 578 | scope.upgradeAll = nop; 579 | scope.upgradeDocumentTree = nop; 580 | scope.upgradeSubtree = nop; 581 | scope.takeRecords = nop; 582 | scope.instanceof = function(obj, base) { 583 | return obj instanceof base; 584 | }; 585 | } else { 586 | initializeModules(); 587 | } 588 | var upgradeDocumentTree = scope.upgradeDocumentTree; 589 | if (!window.wrap) { 590 | if (window.ShadowDOMPolyfill) { 591 | window.wrap = ShadowDOMPolyfill.wrapIfNeeded; 592 | window.unwrap = ShadowDOMPolyfill.unwrapIfNeeded; 593 | } else { 594 | window.wrap = window.unwrap = function(node) { 595 | return node; 596 | }; 597 | } 598 | } 599 | function bootstrap() { 600 | upgradeDocumentTree(wrap(document)); 601 | if (window.HTMLImports) { 602 | HTMLImports.__importsParsingHook = function(elt) { 603 | upgradeDocumentTree(wrap(elt.import)); 604 | }; 605 | } 606 | CustomElements.ready = true; 607 | setTimeout(function() { 608 | CustomElements.readyTime = Date.now(); 609 | if (window.HTMLImports) { 610 | CustomElements.elapsed = CustomElements.readyTime - HTMLImports.readyTime; 611 | } 612 | document.dispatchEvent(new CustomEvent("WebComponentsReady", { 613 | bubbles: true 614 | })); 615 | }); 616 | } 617 | if (isIE11OrOlder && typeof window.CustomEvent !== "function") { 618 | window.CustomEvent = function(inType, params) { 619 | params = params || {}; 620 | var e = document.createEvent("CustomEvent"); 621 | e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail); 622 | return e; 623 | }; 624 | window.CustomEvent.prototype = window.Event.prototype; 625 | } 626 | if (document.readyState === "complete" || scope.flags.eager) { 627 | bootstrap(); 628 | } else if (document.readyState === "interactive" && !window.attachEvent && (!window.HTMLImports || window.HTMLImports.ready)) { 629 | bootstrap(); 630 | } else { 631 | var loadEvent = window.HTMLImports && !HTMLImports.ready ? "HTMLImportsLoaded" : "DOMContentLoaded"; 632 | window.addEventListener(loadEvent, bootstrap); 633 | } 634 | })(window.CustomElements); -------------------------------------------------------------------------------- /bower_components/webcomponentsjs/CustomElements.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. 4 | * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 5 | * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 6 | * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 7 | * Code distributed by Google as part of the polymer project is also 8 | * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 9 | */ 10 | // @version 0.5.5 11 | "undefined"==typeof WeakMap&&!function(){var e=Object.defineProperty,t=Date.now()%1e9,o=function(){this.name="__st"+(1e9*Math.random()>>>0)+(t++ +"__")};o.prototype={set:function(t,o){var n=t[this.name];return n&&n[0]===t?n[1]=o:e(t,this.name,{value:[t,o],writable:!0}),this},get:function(e){var t;return(t=e[this.name])&&t[0]===e?t[1]:void 0},"delete":function(e){var t=e[this.name];return t&&t[0]===e?(t[0]=t[1]=void 0,!0):!1},has:function(e){var t=e[this.name];return t?t[0]===e:!1}},window.WeakMap=o}(),window.CustomElements=window.CustomElements||{flags:{}},function(e){var t=e.flags,o=[],n=function(e){o.push(e)},r=function(){o.forEach(function(t){t(e)})};e.addModule=n,e.initializeModules=r,e.hasNative=Boolean(document.registerElement),e.useNative=!t.register&&e.hasNative&&!window.ShadowDOMPolyfill&&(!window.HTMLImports||HTMLImports.useNative)}(CustomElements),CustomElements.addModule(function(e){function t(e,t){o(e,function(e){return t(e)?!0:void n(e,t)}),n(e,t)}function o(e,t,n){var r=e.firstElementChild;if(!r)for(r=e.firstChild;r&&r.nodeType!==Node.ELEMENT_NODE;)r=r.nextSibling;for(;r;)t(r,n)!==!0&&o(r,t,n),r=r.nextElementSibling;return null}function n(e,o){for(var n=e.shadowRoot;n;)t(n,o),n=n.olderShadowRoot}function r(e,t){i=[],a(e,t),i=null}function a(e,t){if(e=wrap(e),!(i.indexOf(e)>=0)){i.push(e);for(var o,n=e.querySelectorAll("link[rel="+u+"]"),r=0,d=n.length;d>r&&(o=n[r]);r++)o["import"]&&a(o["import"],t);t(e)}}var i,u=window.HTMLImports?HTMLImports.IMPORT_LINK_TYPE:"none";e.forDocumentTree=r,e.forSubtree=t}),CustomElements.addModule(function(e){function t(e){return o(e)||n(e)}function o(t){return e.upgrade(t)?!0:void u(t)}function n(e){y(e,function(e){return o(e)?!0:void 0})}function r(e){u(e),f(e)&&y(e,function(e){u(e)})}function a(e){M.push(e),C||(C=!0,setTimeout(i))}function i(){C=!1;for(var e,t=M,o=0,n=t.length;n>o&&(e=t[o]);o++)e();M=[]}function u(e){E?a(function(){d(e)}):d(e)}function d(e){e.__upgraded__&&(e.attachedCallback||e.detachedCallback)&&!e.__attached&&f(e)&&(e.__attached=!0,e.attachedCallback&&e.attachedCallback())}function c(e){s(e),y(e,function(e){s(e)})}function s(e){E?a(function(){l(e)}):l(e)}function l(e){e.__upgraded__&&(e.attachedCallback||e.detachedCallback)&&e.__attached&&!f(e)&&(e.__attached=!1,e.detachedCallback&&e.detachedCallback())}function f(e){for(var t=e,o=wrap(document);t;){if(t==o)return!0;t=t.parentNode||t.host}}function p(e){if(e.shadowRoot&&!e.shadowRoot.__watched){_.dom&&console.log("watching shadow-root for: ",e.localName);for(var t=e.shadowRoot;t;)h(t),t=t.olderShadowRoot}}function m(e){if(_.dom){var o=e[0];if(o&&"childList"===o.type&&o.addedNodes&&o.addedNodes){for(var n=o.addedNodes[0];n&&n!==document&&!n.host;)n=n.parentNode;var r=n&&(n.URL||n._URL||n.host&&n.host.localName)||"";r=r.split("/?").shift().split("/").pop()}console.group("mutations (%d) [%s]",e.length,r||"")}e.forEach(function(e){"childList"===e.type&&(N(e.addedNodes,function(e){e.localName&&t(e)}),N(e.removedNodes,function(e){e.localName&&c(e)}))}),_.dom&&console.groupEnd()}function w(e){for(e=wrap(e),e||(e=wrap(document));e.parentNode;)e=e.parentNode;var t=e.__observer;t&&(m(t.takeRecords()),i())}function h(e){if(!e.__observer){var t=new MutationObserver(m);t.observe(e,{childList:!0,subtree:!0}),e.__observer=t}}function g(e){e=wrap(e),_.dom&&console.group("upgradeDocument: ",e.baseURI.split("/").pop()),t(e),h(e),_.dom&&console.groupEnd()}function v(e){b(e,g)}var _=e.flags,y=e.forSubtree,b=e.forDocumentTree,E=!window.MutationObserver||window.MutationObserver===window.JsMutationObserver;e.hasPolyfillMutations=E;var C=!1,M=[],N=Array.prototype.forEach.call.bind(Array.prototype.forEach),T=Element.prototype.createShadowRoot;T&&(Element.prototype.createShadowRoot=function(){var e=T.call(this);return CustomElements.watchShadow(this),e}),e.watchShadow=p,e.upgradeDocumentTree=v,e.upgradeSubtree=n,e.upgradeAll=t,e.attachedNode=r,e.takeRecords=w}),CustomElements.addModule(function(e){function t(t){if(!t.__upgraded__&&t.nodeType===Node.ELEMENT_NODE){var n=t.getAttribute("is"),r=e.getRegisteredDefinition(n||t.localName);if(r){if(n&&r.tag==t.localName)return o(t,r);if(!n&&!r["extends"])return o(t,r)}}}function o(t,o){return i.upgrade&&console.group("upgrade:",t.localName),o.is&&t.setAttribute("is",o.is),n(t,o),t.__upgraded__=!0,a(t),e.attachedNode(t),e.upgradeSubtree(t),i.upgrade&&console.groupEnd(),t}function n(e,t){Object.__proto__?e.__proto__=t.prototype:(r(e,t.prototype,t["native"]),e.__proto__=t.prototype)}function r(e,t,o){for(var n={},r=t;r!==o&&r!==HTMLElement.prototype;){for(var a,i=Object.getOwnPropertyNames(r),u=0;a=i[u];u++)n[a]||(Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a)),n[a]=1);r=Object.getPrototypeOf(r)}}function a(e){e.createdCallback&&e.createdCallback()}var i=e.flags;e.upgrade=t,e.upgradeWithDefinition=o,e.implementPrototype=n}),CustomElements.addModule(function(e){function t(t,n){var d=n||{};if(!t)throw new Error("document.registerElement: first argument `name` must not be empty");if(t.indexOf("-")<0)throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '"+String(t)+"'.");if(r(t))throw new Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '"+String(t)+"'. The type name is invalid.");if(c(t))throw new Error("DuplicateDefinitionError: a type with name '"+String(t)+"' is already registered");return d.prototype||(d.prototype=Object.create(HTMLElement.prototype)),d.__name=t.toLowerCase(),d.lifecycle=d.lifecycle||{},d.ancestry=a(d["extends"]),i(d),u(d),o(d.prototype),s(d.__name,d),d.ctor=l(d),d.ctor.prototype=d.prototype,d.prototype.constructor=d.ctor,e.ready&&h(document),d.ctor}function o(e){if(!e.setAttribute._polyfilled){var t=e.setAttribute;e.setAttribute=function(e,o){n.call(this,e,o,t)};var o=e.removeAttribute;e.removeAttribute=function(e){n.call(this,e,null,o)},e.setAttribute._polyfilled=!0}}function n(e,t,o){e=e.toLowerCase();var n=this.getAttribute(e);o.apply(this,arguments);var r=this.getAttribute(e);this.attributeChangedCallback&&r!==n&&this.attributeChangedCallback(e,n,r)}function r(e){for(var t=0;t=0&&_(n,HTMLElement),n)}function m(e){var t=T.call(this,e);return g(t),t}var w,h=e.upgradeDocumentTree,g=e.upgrade,v=e.upgradeWithDefinition,_=e.implementPrototype,y=e.useNative,b=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"],E={},C="http://www.w3.org/1999/xhtml",M=document.createElement.bind(document),N=document.createElementNS.bind(document),T=Node.prototype.cloneNode;w=Object.__proto__||y?function(e,t){return e instanceof t}:function(e,t){for(var o=e;o;){if(o===t.prototype)return!0;o=o.__proto__}return!1},document.registerElement=t,document.createElement=p,document.createElementNS=f,Node.prototype.cloneNode=m,e.registry=E,e["instanceof"]=w,e.reservedTagList=b,e.getRegisteredDefinition=c,document.register=document.registerElement}),function(e){function t(){i(wrap(document)),window.HTMLImports&&(HTMLImports.__importsParsingHook=function(e){i(wrap(e["import"]))}),CustomElements.ready=!0,setTimeout(function(){CustomElements.readyTime=Date.now(),window.HTMLImports&&(CustomElements.elapsed=CustomElements.readyTime-HTMLImports.readyTime),document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})}var o=e.useNative,n=e.initializeModules,r=/Trident/.test(navigator.userAgent);if(o){var a=function(){};e.watchShadow=a,e.upgrade=a,e.upgradeAll=a,e.upgradeDocumentTree=a,e.upgradeSubtree=a,e.takeRecords=a,e["instanceof"]=function(e,t){return e instanceof t}}else n();var i=e.upgradeDocumentTree;if(window.wrap||(window.ShadowDOMPolyfill?(window.wrap=ShadowDOMPolyfill.wrapIfNeeded,window.unwrap=ShadowDOMPolyfill.unwrapIfNeeded):window.wrap=window.unwrap=function(e){return e}),r&&"function"!=typeof window.CustomEvent&&(window.CustomEvent=function(e,t){t=t||{};var o=document.createEvent("CustomEvent");return o.initCustomEvent(e,Boolean(t.bubbles),Boolean(t.cancelable),t.detail),o},window.CustomEvent.prototype=window.Event.prototype),"complete"===document.readyState||e.flags.eager)t();else if("interactive"!==document.readyState||window.attachEvent||window.HTMLImports&&!window.HTMLImports.ready){var u=window.HTMLImports&&!HTMLImports.ready?"HTMLImportsLoaded":"DOMContentLoaded";window.addEventListener(u,t)}else t()}(window.CustomElements); -------------------------------------------------------------------------------- /bower_components/webcomponentsjs/HTMLImports.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. 4 | * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 5 | * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 6 | * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 7 | * Code distributed by Google as part of the polymer project is also 8 | * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 9 | */ 10 | // @version 0.5.5 11 | if (typeof WeakMap === "undefined") { 12 | (function() { 13 | var defineProperty = Object.defineProperty; 14 | var counter = Date.now() % 1e9; 15 | var WeakMap = function() { 16 | this.name = "__st" + (Math.random() * 1e9 >>> 0) + (counter++ + "__"); 17 | }; 18 | WeakMap.prototype = { 19 | set: function(key, value) { 20 | var entry = key[this.name]; 21 | if (entry && entry[0] === key) entry[1] = value; else defineProperty(key, this.name, { 22 | value: [ key, value ], 23 | writable: true 24 | }); 25 | return this; 26 | }, 27 | get: function(key) { 28 | var entry; 29 | return (entry = key[this.name]) && entry[0] === key ? entry[1] : undefined; 30 | }, 31 | "delete": function(key) { 32 | var entry = key[this.name]; 33 | if (!entry || entry[0] !== key) return false; 34 | entry[0] = entry[1] = undefined; 35 | return true; 36 | }, 37 | has: function(key) { 38 | var entry = key[this.name]; 39 | if (!entry) return false; 40 | return entry[0] === key; 41 | } 42 | }; 43 | window.WeakMap = WeakMap; 44 | })(); 45 | } 46 | 47 | window.HTMLImports = window.HTMLImports || { 48 | flags: {} 49 | }; 50 | 51 | (function(scope) { 52 | var IMPORT_LINK_TYPE = "import"; 53 | var useNative = Boolean(IMPORT_LINK_TYPE in document.createElement("link")); 54 | var hasShadowDOMPolyfill = Boolean(window.ShadowDOMPolyfill); 55 | var wrap = function(node) { 56 | return hasShadowDOMPolyfill ? ShadowDOMPolyfill.wrapIfNeeded(node) : node; 57 | }; 58 | var rootDocument = wrap(document); 59 | var currentScriptDescriptor = { 60 | get: function() { 61 | var script = HTMLImports.currentScript || document.currentScript || (document.readyState !== "complete" ? document.scripts[document.scripts.length - 1] : null); 62 | return wrap(script); 63 | }, 64 | configurable: true 65 | }; 66 | Object.defineProperty(document, "_currentScript", currentScriptDescriptor); 67 | Object.defineProperty(rootDocument, "_currentScript", currentScriptDescriptor); 68 | var isIE = /Trident|Edge/.test(navigator.userAgent); 69 | function whenReady(callback, doc) { 70 | doc = doc || rootDocument; 71 | whenDocumentReady(function() { 72 | watchImportsLoad(callback, doc); 73 | }, doc); 74 | } 75 | var requiredReadyState = isIE ? "complete" : "interactive"; 76 | var READY_EVENT = "readystatechange"; 77 | function isDocumentReady(doc) { 78 | return doc.readyState === "complete" || doc.readyState === requiredReadyState; 79 | } 80 | function whenDocumentReady(callback, doc) { 81 | if (!isDocumentReady(doc)) { 82 | var checkReady = function() { 83 | if (doc.readyState === "complete" || doc.readyState === requiredReadyState) { 84 | doc.removeEventListener(READY_EVENT, checkReady); 85 | whenDocumentReady(callback, doc); 86 | } 87 | }; 88 | doc.addEventListener(READY_EVENT, checkReady); 89 | } else if (callback) { 90 | callback(); 91 | } 92 | } 93 | function markTargetLoaded(event) { 94 | event.target.__loaded = true; 95 | } 96 | function watchImportsLoad(callback, doc) { 97 | var imports = doc.querySelectorAll("link[rel=import]"); 98 | var loaded = 0, l = imports.length; 99 | function checkDone(d) { 100 | if (loaded == l && callback) { 101 | callback(); 102 | } 103 | } 104 | function loadedImport(e) { 105 | markTargetLoaded(e); 106 | loaded++; 107 | checkDone(); 108 | } 109 | if (l) { 110 | for (var i = 0, imp; i < l && (imp = imports[i]); i++) { 111 | if (isImportLoaded(imp)) { 112 | loadedImport.call(imp, { 113 | target: imp 114 | }); 115 | } else { 116 | imp.addEventListener("load", loadedImport); 117 | imp.addEventListener("error", loadedImport); 118 | } 119 | } 120 | } else { 121 | checkDone(); 122 | } 123 | } 124 | function isImportLoaded(link) { 125 | return useNative ? link.__loaded || link.import && link.import.readyState !== "loading" : link.__importParsed; 126 | } 127 | if (useNative) { 128 | new MutationObserver(function(mxns) { 129 | for (var i = 0, l = mxns.length, m; i < l && (m = mxns[i]); i++) { 130 | if (m.addedNodes) { 131 | handleImports(m.addedNodes); 132 | } 133 | } 134 | }).observe(document.head, { 135 | childList: true 136 | }); 137 | function handleImports(nodes) { 138 | for (var i = 0, l = nodes.length, n; i < l && (n = nodes[i]); i++) { 139 | if (isImport(n)) { 140 | handleImport(n); 141 | } 142 | } 143 | } 144 | function isImport(element) { 145 | return element.localName === "link" && element.rel === "import"; 146 | } 147 | function handleImport(element) { 148 | var loaded = element.import; 149 | if (loaded) { 150 | markTargetLoaded({ 151 | target: element 152 | }); 153 | } else { 154 | element.addEventListener("load", markTargetLoaded); 155 | element.addEventListener("error", markTargetLoaded); 156 | } 157 | } 158 | (function() { 159 | if (document.readyState === "loading") { 160 | var imports = document.querySelectorAll("link[rel=import]"); 161 | for (var i = 0, l = imports.length, imp; i < l && (imp = imports[i]); i++) { 162 | handleImport(imp); 163 | } 164 | } 165 | })(); 166 | } 167 | whenReady(function() { 168 | HTMLImports.ready = true; 169 | HTMLImports.readyTime = new Date().getTime(); 170 | var evt = rootDocument.createEvent("CustomEvent"); 171 | evt.initCustomEvent("HTMLImportsLoaded", true, true, {}); 172 | rootDocument.dispatchEvent(evt); 173 | }); 174 | scope.IMPORT_LINK_TYPE = IMPORT_LINK_TYPE; 175 | scope.useNative = useNative; 176 | scope.rootDocument = rootDocument; 177 | scope.whenReady = whenReady; 178 | scope.isIE = isIE; 179 | })(HTMLImports); 180 | 181 | (function(scope) { 182 | var modules = []; 183 | var addModule = function(module) { 184 | modules.push(module); 185 | }; 186 | var initializeModules = function() { 187 | modules.forEach(function(module) { 188 | module(scope); 189 | }); 190 | }; 191 | scope.addModule = addModule; 192 | scope.initializeModules = initializeModules; 193 | })(HTMLImports); 194 | 195 | HTMLImports.addModule(function(scope) { 196 | var CSS_URL_REGEXP = /(url\()([^)]*)(\))/g; 197 | var CSS_IMPORT_REGEXP = /(@import[\s]+(?!url\())([^;]*)(;)/g; 198 | var path = { 199 | resolveUrlsInStyle: function(style) { 200 | var doc = style.ownerDocument; 201 | var resolver = doc.createElement("a"); 202 | style.textContent = this.resolveUrlsInCssText(style.textContent, resolver); 203 | return style; 204 | }, 205 | resolveUrlsInCssText: function(cssText, urlObj) { 206 | var r = this.replaceUrls(cssText, urlObj, CSS_URL_REGEXP); 207 | r = this.replaceUrls(r, urlObj, CSS_IMPORT_REGEXP); 208 | return r; 209 | }, 210 | replaceUrls: function(text, urlObj, regexp) { 211 | return text.replace(regexp, function(m, pre, url, post) { 212 | var urlPath = url.replace(/["']/g, ""); 213 | urlObj.href = urlPath; 214 | urlPath = urlObj.href; 215 | return pre + "'" + urlPath + "'" + post; 216 | }); 217 | } 218 | }; 219 | scope.path = path; 220 | }); 221 | 222 | HTMLImports.addModule(function(scope) { 223 | var xhr = { 224 | async: true, 225 | ok: function(request) { 226 | return request.status >= 200 && request.status < 300 || request.status === 304 || request.status === 0; 227 | }, 228 | load: function(url, next, nextContext) { 229 | var request = new XMLHttpRequest(); 230 | if (scope.flags.debug || scope.flags.bust) { 231 | url += "?" + Math.random(); 232 | } 233 | request.open("GET", url, xhr.async); 234 | request.addEventListener("readystatechange", function(e) { 235 | if (request.readyState === 4) { 236 | var locationHeader = request.getResponseHeader("Location"); 237 | var redirectedUrl = null; 238 | if (locationHeader) { 239 | var redirectedUrl = locationHeader.substr(0, 1) === "/" ? location.origin + locationHeader : locationHeader; 240 | } 241 | next.call(nextContext, !xhr.ok(request) && request, request.response || request.responseText, redirectedUrl); 242 | } 243 | }); 244 | request.send(); 245 | return request; 246 | }, 247 | loadDocument: function(url, next, nextContext) { 248 | this.load(url, next, nextContext).responseType = "document"; 249 | } 250 | }; 251 | scope.xhr = xhr; 252 | }); 253 | 254 | HTMLImports.addModule(function(scope) { 255 | var xhr = scope.xhr; 256 | var flags = scope.flags; 257 | var Loader = function(onLoad, onComplete) { 258 | this.cache = {}; 259 | this.onload = onLoad; 260 | this.oncomplete = onComplete; 261 | this.inflight = 0; 262 | this.pending = {}; 263 | }; 264 | Loader.prototype = { 265 | addNodes: function(nodes) { 266 | this.inflight += nodes.length; 267 | for (var i = 0, l = nodes.length, n; i < l && (n = nodes[i]); i++) { 268 | this.require(n); 269 | } 270 | this.checkDone(); 271 | }, 272 | addNode: function(node) { 273 | this.inflight++; 274 | this.require(node); 275 | this.checkDone(); 276 | }, 277 | require: function(elt) { 278 | var url = elt.src || elt.href; 279 | elt.__nodeUrl = url; 280 | if (!this.dedupe(url, elt)) { 281 | this.fetch(url, elt); 282 | } 283 | }, 284 | dedupe: function(url, elt) { 285 | if (this.pending[url]) { 286 | this.pending[url].push(elt); 287 | return true; 288 | } 289 | var resource; 290 | if (this.cache[url]) { 291 | this.onload(url, elt, this.cache[url]); 292 | this.tail(); 293 | return true; 294 | } 295 | this.pending[url] = [ elt ]; 296 | return false; 297 | }, 298 | fetch: function(url, elt) { 299 | flags.load && console.log("fetch", url, elt); 300 | if (!url) { 301 | setTimeout(function() { 302 | this.receive(url, elt, { 303 | error: "href must be specified" 304 | }, null); 305 | }.bind(this), 0); 306 | } else if (url.match(/^data:/)) { 307 | var pieces = url.split(","); 308 | var header = pieces[0]; 309 | var body = pieces[1]; 310 | if (header.indexOf(";base64") > -1) { 311 | body = atob(body); 312 | } else { 313 | body = decodeURIComponent(body); 314 | } 315 | setTimeout(function() { 316 | this.receive(url, elt, null, body); 317 | }.bind(this), 0); 318 | } else { 319 | var receiveXhr = function(err, resource, redirectedUrl) { 320 | this.receive(url, elt, err, resource, redirectedUrl); 321 | }.bind(this); 322 | xhr.load(url, receiveXhr); 323 | } 324 | }, 325 | receive: function(url, elt, err, resource, redirectedUrl) { 326 | this.cache[url] = resource; 327 | var $p = this.pending[url]; 328 | for (var i = 0, l = $p.length, p; i < l && (p = $p[i]); i++) { 329 | this.onload(url, p, resource, err, redirectedUrl); 330 | this.tail(); 331 | } 332 | this.pending[url] = null; 333 | }, 334 | tail: function() { 335 | --this.inflight; 336 | this.checkDone(); 337 | }, 338 | checkDone: function() { 339 | if (!this.inflight) { 340 | this.oncomplete(); 341 | } 342 | } 343 | }; 344 | scope.Loader = Loader; 345 | }); 346 | 347 | HTMLImports.addModule(function(scope) { 348 | var Observer = function(addCallback) { 349 | this.addCallback = addCallback; 350 | this.mo = new MutationObserver(this.handler.bind(this)); 351 | }; 352 | Observer.prototype = { 353 | handler: function(mutations) { 354 | for (var i = 0, l = mutations.length, m; i < l && (m = mutations[i]); i++) { 355 | if (m.type === "childList" && m.addedNodes.length) { 356 | this.addedNodes(m.addedNodes); 357 | } 358 | } 359 | }, 360 | addedNodes: function(nodes) { 361 | if (this.addCallback) { 362 | this.addCallback(nodes); 363 | } 364 | for (var i = 0, l = nodes.length, n, loading; i < l && (n = nodes[i]); i++) { 365 | if (n.children && n.children.length) { 366 | this.addedNodes(n.children); 367 | } 368 | } 369 | }, 370 | observe: function(root) { 371 | this.mo.observe(root, { 372 | childList: true, 373 | subtree: true 374 | }); 375 | } 376 | }; 377 | scope.Observer = Observer; 378 | }); 379 | 380 | HTMLImports.addModule(function(scope) { 381 | var path = scope.path; 382 | var rootDocument = scope.rootDocument; 383 | var flags = scope.flags; 384 | var isIE = scope.isIE; 385 | var IMPORT_LINK_TYPE = scope.IMPORT_LINK_TYPE; 386 | var IMPORT_SELECTOR = "link[rel=" + IMPORT_LINK_TYPE + "]"; 387 | var importParser = { 388 | documentSelectors: IMPORT_SELECTOR, 389 | importsSelectors: [ IMPORT_SELECTOR, "link[rel=stylesheet]", "style", "script:not([type])", 'script[type="text/javascript"]' ].join(","), 390 | map: { 391 | link: "parseLink", 392 | script: "parseScript", 393 | style: "parseStyle" 394 | }, 395 | dynamicElements: [], 396 | parseNext: function() { 397 | var next = this.nextToParse(); 398 | if (next) { 399 | this.parse(next); 400 | } 401 | }, 402 | parse: function(elt) { 403 | if (this.isParsed(elt)) { 404 | flags.parse && console.log("[%s] is already parsed", elt.localName); 405 | return; 406 | } 407 | var fn = this[this.map[elt.localName]]; 408 | if (fn) { 409 | this.markParsing(elt); 410 | fn.call(this, elt); 411 | } 412 | }, 413 | parseDynamic: function(elt, quiet) { 414 | this.dynamicElements.push(elt); 415 | if (!quiet) { 416 | this.parseNext(); 417 | } 418 | }, 419 | markParsing: function(elt) { 420 | flags.parse && console.log("parsing", elt); 421 | this.parsingElement = elt; 422 | }, 423 | markParsingComplete: function(elt) { 424 | elt.__importParsed = true; 425 | this.markDynamicParsingComplete(elt); 426 | if (elt.__importElement) { 427 | elt.__importElement.__importParsed = true; 428 | this.markDynamicParsingComplete(elt.__importElement); 429 | } 430 | this.parsingElement = null; 431 | flags.parse && console.log("completed", elt); 432 | }, 433 | markDynamicParsingComplete: function(elt) { 434 | var i = this.dynamicElements.indexOf(elt); 435 | if (i >= 0) { 436 | this.dynamicElements.splice(i, 1); 437 | } 438 | }, 439 | parseImport: function(elt) { 440 | if (HTMLImports.__importsParsingHook) { 441 | HTMLImports.__importsParsingHook(elt); 442 | } 443 | if (elt.import) { 444 | elt.import.__importParsed = true; 445 | } 446 | this.markParsingComplete(elt); 447 | if (elt.__resource && !elt.__error) { 448 | elt.dispatchEvent(new CustomEvent("load", { 449 | bubbles: false 450 | })); 451 | } else { 452 | elt.dispatchEvent(new CustomEvent("error", { 453 | bubbles: false 454 | })); 455 | } 456 | if (elt.__pending) { 457 | var fn; 458 | while (elt.__pending.length) { 459 | fn = elt.__pending.shift(); 460 | if (fn) { 461 | fn({ 462 | target: elt 463 | }); 464 | } 465 | } 466 | } 467 | this.parseNext(); 468 | }, 469 | parseLink: function(linkElt) { 470 | if (nodeIsImport(linkElt)) { 471 | this.parseImport(linkElt); 472 | } else { 473 | linkElt.href = linkElt.href; 474 | this.parseGeneric(linkElt); 475 | } 476 | }, 477 | parseStyle: function(elt) { 478 | var src = elt; 479 | elt = cloneStyle(elt); 480 | elt.__importElement = src; 481 | this.parseGeneric(elt); 482 | }, 483 | parseGeneric: function(elt) { 484 | this.trackElement(elt); 485 | this.addElementToDocument(elt); 486 | }, 487 | rootImportForElement: function(elt) { 488 | var n = elt; 489 | while (n.ownerDocument.__importLink) { 490 | n = n.ownerDocument.__importLink; 491 | } 492 | return n; 493 | }, 494 | addElementToDocument: function(elt) { 495 | var port = this.rootImportForElement(elt.__importElement || elt); 496 | port.parentNode.insertBefore(elt, port); 497 | }, 498 | trackElement: function(elt, callback) { 499 | var self = this; 500 | var done = function(e) { 501 | if (callback) { 502 | callback(e); 503 | } 504 | self.markParsingComplete(elt); 505 | self.parseNext(); 506 | }; 507 | elt.addEventListener("load", done); 508 | elt.addEventListener("error", done); 509 | if (isIE && elt.localName === "style") { 510 | var fakeLoad = false; 511 | if (elt.textContent.indexOf("@import") == -1) { 512 | fakeLoad = true; 513 | } else if (elt.sheet) { 514 | fakeLoad = true; 515 | var csr = elt.sheet.cssRules; 516 | var len = csr ? csr.length : 0; 517 | for (var i = 0, r; i < len && (r = csr[i]); i++) { 518 | if (r.type === CSSRule.IMPORT_RULE) { 519 | fakeLoad = fakeLoad && Boolean(r.styleSheet); 520 | } 521 | } 522 | } 523 | if (fakeLoad) { 524 | elt.dispatchEvent(new CustomEvent("load", { 525 | bubbles: false 526 | })); 527 | } 528 | } 529 | }, 530 | parseScript: function(scriptElt) { 531 | var script = document.createElement("script"); 532 | script.__importElement = scriptElt; 533 | script.src = scriptElt.src ? scriptElt.src : generateScriptDataUrl(scriptElt); 534 | scope.currentScript = scriptElt; 535 | this.trackElement(script, function(e) { 536 | script.parentNode.removeChild(script); 537 | scope.currentScript = null; 538 | }); 539 | this.addElementToDocument(script); 540 | }, 541 | nextToParse: function() { 542 | this._mayParse = []; 543 | return !this.parsingElement && (this.nextToParseInDoc(rootDocument) || this.nextToParseDynamic()); 544 | }, 545 | nextToParseInDoc: function(doc, link) { 546 | if (doc && this._mayParse.indexOf(doc) < 0) { 547 | this._mayParse.push(doc); 548 | var nodes = doc.querySelectorAll(this.parseSelectorsForNode(doc)); 549 | for (var i = 0, l = nodes.length, p = 0, n; i < l && (n = nodes[i]); i++) { 550 | if (!this.isParsed(n)) { 551 | if (this.hasResource(n)) { 552 | return nodeIsImport(n) ? this.nextToParseInDoc(n.import, n) : n; 553 | } else { 554 | return; 555 | } 556 | } 557 | } 558 | } 559 | return link; 560 | }, 561 | nextToParseDynamic: function() { 562 | return this.dynamicElements[0]; 563 | }, 564 | parseSelectorsForNode: function(node) { 565 | var doc = node.ownerDocument || node; 566 | return doc === rootDocument ? this.documentSelectors : this.importsSelectors; 567 | }, 568 | isParsed: function(node) { 569 | return node.__importParsed; 570 | }, 571 | needsDynamicParsing: function(elt) { 572 | return this.dynamicElements.indexOf(elt) >= 0; 573 | }, 574 | hasResource: function(node) { 575 | if (nodeIsImport(node) && node.import === undefined) { 576 | return false; 577 | } 578 | return true; 579 | } 580 | }; 581 | function nodeIsImport(elt) { 582 | return elt.localName === "link" && elt.rel === IMPORT_LINK_TYPE; 583 | } 584 | function generateScriptDataUrl(script) { 585 | var scriptContent = generateScriptContent(script); 586 | return "data:text/javascript;charset=utf-8," + encodeURIComponent(scriptContent); 587 | } 588 | function generateScriptContent(script) { 589 | return script.textContent + generateSourceMapHint(script); 590 | } 591 | function generateSourceMapHint(script) { 592 | var owner = script.ownerDocument; 593 | owner.__importedScripts = owner.__importedScripts || 0; 594 | var moniker = script.ownerDocument.baseURI; 595 | var num = owner.__importedScripts ? "-" + owner.__importedScripts : ""; 596 | owner.__importedScripts++; 597 | return "\n//# sourceURL=" + moniker + num + ".js\n"; 598 | } 599 | function cloneStyle(style) { 600 | var clone = style.ownerDocument.createElement("style"); 601 | clone.textContent = style.textContent; 602 | path.resolveUrlsInStyle(clone); 603 | return clone; 604 | } 605 | scope.parser = importParser; 606 | scope.IMPORT_SELECTOR = IMPORT_SELECTOR; 607 | }); 608 | 609 | HTMLImports.addModule(function(scope) { 610 | var flags = scope.flags; 611 | var IMPORT_LINK_TYPE = scope.IMPORT_LINK_TYPE; 612 | var IMPORT_SELECTOR = scope.IMPORT_SELECTOR; 613 | var rootDocument = scope.rootDocument; 614 | var Loader = scope.Loader; 615 | var Observer = scope.Observer; 616 | var parser = scope.parser; 617 | var importer = { 618 | documents: {}, 619 | documentPreloadSelectors: IMPORT_SELECTOR, 620 | importsPreloadSelectors: [ IMPORT_SELECTOR ].join(","), 621 | loadNode: function(node) { 622 | importLoader.addNode(node); 623 | }, 624 | loadSubtree: function(parent) { 625 | var nodes = this.marshalNodes(parent); 626 | importLoader.addNodes(nodes); 627 | }, 628 | marshalNodes: function(parent) { 629 | return parent.querySelectorAll(this.loadSelectorsForNode(parent)); 630 | }, 631 | loadSelectorsForNode: function(node) { 632 | var doc = node.ownerDocument || node; 633 | return doc === rootDocument ? this.documentPreloadSelectors : this.importsPreloadSelectors; 634 | }, 635 | loaded: function(url, elt, resource, err, redirectedUrl) { 636 | flags.load && console.log("loaded", url, elt); 637 | elt.__resource = resource; 638 | elt.__error = err; 639 | if (isImportLink(elt)) { 640 | var doc = this.documents[url]; 641 | if (doc === undefined) { 642 | doc = err ? null : makeDocument(resource, redirectedUrl || url); 643 | if (doc) { 644 | doc.__importLink = elt; 645 | this.bootDocument(doc); 646 | } 647 | this.documents[url] = doc; 648 | } 649 | elt.import = doc; 650 | } 651 | parser.parseNext(); 652 | }, 653 | bootDocument: function(doc) { 654 | this.loadSubtree(doc); 655 | this.observer.observe(doc); 656 | parser.parseNext(); 657 | }, 658 | loadedAll: function() { 659 | parser.parseNext(); 660 | } 661 | }; 662 | var importLoader = new Loader(importer.loaded.bind(importer), importer.loadedAll.bind(importer)); 663 | importer.observer = new Observer(); 664 | function isImportLink(elt) { 665 | return isLinkRel(elt, IMPORT_LINK_TYPE); 666 | } 667 | function isLinkRel(elt, rel) { 668 | return elt.localName === "link" && elt.getAttribute("rel") === rel; 669 | } 670 | function hasBaseURIAccessor(doc) { 671 | return !!Object.getOwnPropertyDescriptor(doc, "baseURI"); 672 | } 673 | function makeDocument(resource, url) { 674 | var doc = document.implementation.createHTMLDocument(IMPORT_LINK_TYPE); 675 | doc._URL = url; 676 | var base = doc.createElement("base"); 677 | base.setAttribute("href", url); 678 | if (!doc.baseURI && !hasBaseURIAccessor(doc)) { 679 | Object.defineProperty(doc, "baseURI", { 680 | value: url 681 | }); 682 | } 683 | var meta = doc.createElement("meta"); 684 | meta.setAttribute("charset", "utf-8"); 685 | doc.head.appendChild(meta); 686 | doc.head.appendChild(base); 687 | doc.body.innerHTML = resource; 688 | if (window.HTMLTemplateElement && HTMLTemplateElement.bootstrap) { 689 | HTMLTemplateElement.bootstrap(doc); 690 | } 691 | return doc; 692 | } 693 | if (!document.baseURI) { 694 | var baseURIDescriptor = { 695 | get: function() { 696 | var base = document.querySelector("base"); 697 | return base ? base.href : window.location.href; 698 | }, 699 | configurable: true 700 | }; 701 | Object.defineProperty(document, "baseURI", baseURIDescriptor); 702 | Object.defineProperty(rootDocument, "baseURI", baseURIDescriptor); 703 | } 704 | scope.importer = importer; 705 | scope.importLoader = importLoader; 706 | }); 707 | 708 | HTMLImports.addModule(function(scope) { 709 | var parser = scope.parser; 710 | var importer = scope.importer; 711 | var dynamic = { 712 | added: function(nodes) { 713 | var owner, parsed, loading; 714 | for (var i = 0, l = nodes.length, n; i < l && (n = nodes[i]); i++) { 715 | if (!owner) { 716 | owner = n.ownerDocument; 717 | parsed = parser.isParsed(owner); 718 | } 719 | loading = this.shouldLoadNode(n); 720 | if (loading) { 721 | importer.loadNode(n); 722 | } 723 | if (this.shouldParseNode(n) && parsed) { 724 | parser.parseDynamic(n, loading); 725 | } 726 | } 727 | }, 728 | shouldLoadNode: function(node) { 729 | return node.nodeType === 1 && matches.call(node, importer.loadSelectorsForNode(node)); 730 | }, 731 | shouldParseNode: function(node) { 732 | return node.nodeType === 1 && matches.call(node, parser.parseSelectorsForNode(node)); 733 | } 734 | }; 735 | importer.observer.addCallback = dynamic.added.bind(dynamic); 736 | var matches = HTMLElement.prototype.matches || HTMLElement.prototype.matchesSelector || HTMLElement.prototype.webkitMatchesSelector || HTMLElement.prototype.mozMatchesSelector || HTMLElement.prototype.msMatchesSelector; 737 | }); 738 | 739 | (function(scope) { 740 | var initializeModules = scope.initializeModules; 741 | var isIE = scope.isIE; 742 | if (scope.useNative) { 743 | return; 744 | } 745 | if (isIE && typeof window.CustomEvent !== "function") { 746 | window.CustomEvent = function(inType, params) { 747 | params = params || {}; 748 | var e = document.createEvent("CustomEvent"); 749 | e.initCustomEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable), params.detail); 750 | return e; 751 | }; 752 | window.CustomEvent.prototype = window.Event.prototype; 753 | } 754 | initializeModules(); 755 | var rootDocument = scope.rootDocument; 756 | function bootstrap() { 757 | HTMLImports.importer.bootDocument(rootDocument); 758 | } 759 | if (document.readyState === "complete" || document.readyState === "interactive" && !window.attachEvent) { 760 | bootstrap(); 761 | } else { 762 | document.addEventListener("DOMContentLoaded", bootstrap); 763 | } 764 | })(HTMLImports); -------------------------------------------------------------------------------- /bower_components/webcomponentsjs/HTMLImports.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. 4 | * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 5 | * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 6 | * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 7 | * Code distributed by Google as part of the polymer project is also 8 | * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 9 | */ 10 | // @version 0.5.5 11 | "undefined"==typeof WeakMap&&!function(){var e=Object.defineProperty,t=Date.now()%1e9,n=function(){this.name="__st"+(1e9*Math.random()>>>0)+(t++ +"__")};n.prototype={set:function(t,n){var r=t[this.name];return r&&r[0]===t?r[1]=n:e(t,this.name,{value:[t,n],writable:!0}),this},get:function(e){var t;return(t=e[this.name])&&t[0]===e?t[1]:void 0},"delete":function(e){var t=e[this.name];return t&&t[0]===e?(t[0]=t[1]=void 0,!0):!1},has:function(e){var t=e[this.name];return t?t[0]===e:!1}},window.WeakMap=n}(),window.HTMLImports=window.HTMLImports||{flags:{}},function(e){function t(e,t){t=t||h,r(function(){i(e,t)},t)}function n(e){return"complete"===e.readyState||e.readyState===g}function r(e,t){if(n(t))e&&e();else{var o=function(){("complete"===t.readyState||t.readyState===g)&&(t.removeEventListener(_,o),r(e,t))};t.addEventListener(_,o)}}function o(e){e.target.__loaded=!0}function i(e,t){function n(){s==c&&e&&e()}function r(e){o(e),s++,n()}var i=t.querySelectorAll("link[rel=import]"),s=0,c=i.length;if(c)for(var d,l=0;c>l&&(d=i[l]);l++)a(d)?r.call(d,{target:d}):(d.addEventListener("load",r),d.addEventListener("error",r));else n()}function a(e){return u?e.__loaded||e["import"]&&"loading"!==e["import"].readyState:e.__importParsed}function s(e){for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)c(t)&&d(t)}function c(e){return"link"===e.localName&&"import"===e.rel}function d(e){var t=e["import"];t?o({target:e}):(e.addEventListener("load",o),e.addEventListener("error",o))}var l="import",u=Boolean(l in document.createElement("link")),m=Boolean(window.ShadowDOMPolyfill),p=function(e){return m?ShadowDOMPolyfill.wrapIfNeeded(e):e},h=p(document),f={get:function(){var e=HTMLImports.currentScript||document.currentScript||("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null);return p(e)},configurable:!0};Object.defineProperty(document,"_currentScript",f),Object.defineProperty(h,"_currentScript",f);var v=/Trident|Edge/.test(navigator.userAgent),g=v?"complete":"interactive",_="readystatechange";u&&(new MutationObserver(function(e){for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)t.addedNodes&&s(t.addedNodes)}).observe(document.head,{childList:!0}),function(){if("loading"===document.readyState)for(var e,t=document.querySelectorAll("link[rel=import]"),n=0,r=t.length;r>n&&(e=t[n]);n++)d(e)}()),t(function(){HTMLImports.ready=!0,HTMLImports.readyTime=(new Date).getTime();var e=h.createEvent("CustomEvent");e.initCustomEvent("HTMLImportsLoaded",!0,!0,{}),h.dispatchEvent(e)}),e.IMPORT_LINK_TYPE=l,e.useNative=u,e.rootDocument=h,e.whenReady=t,e.isIE=v}(HTMLImports),function(e){var t=[],n=function(e){t.push(e)},r=function(){t.forEach(function(t){t(e)})};e.addModule=n,e.initializeModules=r}(HTMLImports),HTMLImports.addModule(function(e){var t=/(url\()([^)]*)(\))/g,n=/(@import[\s]+(?!url\())([^;]*)(;)/g,r={resolveUrlsInStyle:function(e){var t=e.ownerDocument,n=t.createElement("a");return e.textContent=this.resolveUrlsInCssText(e.textContent,n),e},resolveUrlsInCssText:function(e,r){var o=this.replaceUrls(e,r,t);return o=this.replaceUrls(o,r,n)},replaceUrls:function(e,t,n){return e.replace(n,function(e,n,r,o){var i=r.replace(/["']/g,"");return t.href=i,i=t.href,n+"'"+i+"'"+o})}};e.path=r}),HTMLImports.addModule(function(e){var t={async:!0,ok:function(e){return e.status>=200&&e.status<300||304===e.status||0===e.status},load:function(n,r,o){var i=new XMLHttpRequest;return(e.flags.debug||e.flags.bust)&&(n+="?"+Math.random()),i.open("GET",n,t.async),i.addEventListener("readystatechange",function(){if(4===i.readyState){var e=i.getResponseHeader("Location"),n=null;if(e)var n="/"===e.substr(0,1)?location.origin+e:e;r.call(o,!t.ok(i)&&i,i.response||i.responseText,n)}}),i.send(),i},loadDocument:function(e,t,n){this.load(e,t,n).responseType="document"}};e.xhr=t}),HTMLImports.addModule(function(e){var t=e.xhr,n=e.flags,r=function(e,t){this.cache={},this.onload=e,this.oncomplete=t,this.inflight=0,this.pending={}};r.prototype={addNodes:function(e){this.inflight+=e.length;for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)this.require(t);this.checkDone()},addNode:function(e){this.inflight++,this.require(e),this.checkDone()},require:function(e){var t=e.src||e.href;e.__nodeUrl=t,this.dedupe(t,e)||this.fetch(t,e)},dedupe:function(e,t){if(this.pending[e])return this.pending[e].push(t),!0;return this.cache[e]?(this.onload(e,t,this.cache[e]),this.tail(),!0):(this.pending[e]=[t],!1)},fetch:function(e,r){if(n.load&&console.log("fetch",e,r),e)if(e.match(/^data:/)){var o=e.split(","),i=o[0],a=o[1];a=i.indexOf(";base64")>-1?atob(a):decodeURIComponent(a),setTimeout(function(){this.receive(e,r,null,a)}.bind(this),0)}else{var s=function(t,n,o){this.receive(e,r,t,n,o)}.bind(this);t.load(e,s)}else setTimeout(function(){this.receive(e,r,{error:"href must be specified"},null)}.bind(this),0)},receive:function(e,t,n,r,o){this.cache[e]=r;for(var i,a=this.pending[e],s=0,c=a.length;c>s&&(i=a[s]);s++)this.onload(e,i,r,n,o),this.tail();this.pending[e]=null},tail:function(){--this.inflight,this.checkDone()},checkDone:function(){this.inflight||this.oncomplete()}},e.Loader=r}),HTMLImports.addModule(function(e){var t=function(e){this.addCallback=e,this.mo=new MutationObserver(this.handler.bind(this))};t.prototype={handler:function(e){for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)"childList"===t.type&&t.addedNodes.length&&this.addedNodes(t.addedNodes)},addedNodes:function(e){this.addCallback&&this.addCallback(e);for(var t,n=0,r=e.length;r>n&&(t=e[n]);n++)t.children&&t.children.length&&this.addedNodes(t.children)},observe:function(e){this.mo.observe(e,{childList:!0,subtree:!0})}},e.Observer=t}),HTMLImports.addModule(function(e){function t(e){return"link"===e.localName&&e.rel===l}function n(e){var t=r(e);return"data:text/javascript;charset=utf-8,"+encodeURIComponent(t)}function r(e){return e.textContent+o(e)}function o(e){var t=e.ownerDocument;t.__importedScripts=t.__importedScripts||0;var n=e.ownerDocument.baseURI,r=t.__importedScripts?"-"+t.__importedScripts:"";return t.__importedScripts++,"\n//# sourceURL="+n+r+".js\n"}function i(e){var t=e.ownerDocument.createElement("style");return t.textContent=e.textContent,a.resolveUrlsInStyle(t),t}var a=e.path,s=e.rootDocument,c=e.flags,d=e.isIE,l=e.IMPORT_LINK_TYPE,u="link[rel="+l+"]",m={documentSelectors:u,importsSelectors:[u,"link[rel=stylesheet]","style","script:not([type])",'script[type="text/javascript"]'].join(","),map:{link:"parseLink",script:"parseScript",style:"parseStyle"},dynamicElements:[],parseNext:function(){var e=this.nextToParse();e&&this.parse(e)},parse:function(e){if(this.isParsed(e))return void(c.parse&&console.log("[%s] is already parsed",e.localName));var t=this[this.map[e.localName]];t&&(this.markParsing(e),t.call(this,e))},parseDynamic:function(e,t){this.dynamicElements.push(e),t||this.parseNext()},markParsing:function(e){c.parse&&console.log("parsing",e),this.parsingElement=e},markParsingComplete:function(e){e.__importParsed=!0,this.markDynamicParsingComplete(e),e.__importElement&&(e.__importElement.__importParsed=!0,this.markDynamicParsingComplete(e.__importElement)),this.parsingElement=null,c.parse&&console.log("completed",e)},markDynamicParsingComplete:function(e){var t=this.dynamicElements.indexOf(e);t>=0&&this.dynamicElements.splice(t,1)},parseImport:function(e){if(HTMLImports.__importsParsingHook&&HTMLImports.__importsParsingHook(e),e["import"]&&(e["import"].__importParsed=!0),this.markParsingComplete(e),e.dispatchEvent(e.__resource&&!e.__error?new CustomEvent("load",{bubbles:!1}):new CustomEvent("error",{bubbles:!1})),e.__pending)for(var t;e.__pending.length;)t=e.__pending.shift(),t&&t({target:e});this.parseNext()},parseLink:function(e){t(e)?this.parseImport(e):(e.href=e.href,this.parseGeneric(e))},parseStyle:function(e){var t=e;e=i(e),e.__importElement=t,this.parseGeneric(e)},parseGeneric:function(e){this.trackElement(e),this.addElementToDocument(e)},rootImportForElement:function(e){for(var t=e;t.ownerDocument.__importLink;)t=t.ownerDocument.__importLink;return t},addElementToDocument:function(e){var t=this.rootImportForElement(e.__importElement||e);t.parentNode.insertBefore(e,t)},trackElement:function(e,t){var n=this,r=function(r){t&&t(r),n.markParsingComplete(e),n.parseNext()};if(e.addEventListener("load",r),e.addEventListener("error",r),d&&"style"===e.localName){var o=!1;if(-1==e.textContent.indexOf("@import"))o=!0;else if(e.sheet){o=!0;for(var i,a=e.sheet.cssRules,s=a?a.length:0,c=0;s>c&&(i=a[c]);c++)i.type===CSSRule.IMPORT_RULE&&(o=o&&Boolean(i.styleSheet))}o&&e.dispatchEvent(new CustomEvent("load",{bubbles:!1}))}},parseScript:function(t){var r=document.createElement("script");r.__importElement=t,r.src=t.src?t.src:n(t),e.currentScript=t,this.trackElement(r,function(){r.parentNode.removeChild(r),e.currentScript=null}),this.addElementToDocument(r)},nextToParse:function(){return this._mayParse=[],!this.parsingElement&&(this.nextToParseInDoc(s)||this.nextToParseDynamic())},nextToParseInDoc:function(e,n){if(e&&this._mayParse.indexOf(e)<0){this._mayParse.push(e);for(var r,o=e.querySelectorAll(this.parseSelectorsForNode(e)),i=0,a=o.length;a>i&&(r=o[i]);i++)if(!this.isParsed(r))return this.hasResource(r)?t(r)?this.nextToParseInDoc(r["import"],r):r:void 0}return n},nextToParseDynamic:function(){return this.dynamicElements[0]},parseSelectorsForNode:function(e){var t=e.ownerDocument||e;return t===s?this.documentSelectors:this.importsSelectors},isParsed:function(e){return e.__importParsed},needsDynamicParsing:function(e){return this.dynamicElements.indexOf(e)>=0},hasResource:function(e){return t(e)&&void 0===e["import"]?!1:!0}};e.parser=m,e.IMPORT_SELECTOR=u}),HTMLImports.addModule(function(e){function t(e){return n(e,a)}function n(e,t){return"link"===e.localName&&e.getAttribute("rel")===t}function r(e){return!!Object.getOwnPropertyDescriptor(e,"baseURI")}function o(e,t){var n=document.implementation.createHTMLDocument(a);n._URL=t;var o=n.createElement("base");o.setAttribute("href",t),n.baseURI||r(n)||Object.defineProperty(n,"baseURI",{value:t});var i=n.createElement("meta");return i.setAttribute("charset","utf-8"),n.head.appendChild(i),n.head.appendChild(o),n.body.innerHTML=e,window.HTMLTemplateElement&&HTMLTemplateElement.bootstrap&&HTMLTemplateElement.bootstrap(n),n}var i=e.flags,a=e.IMPORT_LINK_TYPE,s=e.IMPORT_SELECTOR,c=e.rootDocument,d=e.Loader,l=e.Observer,u=e.parser,m={documents:{},documentPreloadSelectors:s,importsPreloadSelectors:[s].join(","),loadNode:function(e){p.addNode(e)},loadSubtree:function(e){var t=this.marshalNodes(e);p.addNodes(t)},marshalNodes:function(e){return e.querySelectorAll(this.loadSelectorsForNode(e))},loadSelectorsForNode:function(e){var t=e.ownerDocument||e;return t===c?this.documentPreloadSelectors:this.importsPreloadSelectors},loaded:function(e,n,r,a,s){if(i.load&&console.log("loaded",e,n),n.__resource=r,n.__error=a,t(n)){var c=this.documents[e];void 0===c&&(c=a?null:o(r,s||e),c&&(c.__importLink=n,this.bootDocument(c)),this.documents[e]=c),n["import"]=c}u.parseNext()},bootDocument:function(e){this.loadSubtree(e),this.observer.observe(e),u.parseNext()},loadedAll:function(){u.parseNext()}},p=new d(m.loaded.bind(m),m.loadedAll.bind(m));if(m.observer=new l,!document.baseURI){var h={get:function(){var e=document.querySelector("base");return e?e.href:window.location.href},configurable:!0};Object.defineProperty(document,"baseURI",h),Object.defineProperty(c,"baseURI",h)}e.importer=m,e.importLoader=p}),HTMLImports.addModule(function(e){var t=e.parser,n=e.importer,r={added:function(e){for(var r,o,i,a,s=0,c=e.length;c>s&&(a=e[s]);s++)r||(r=a.ownerDocument,o=t.isParsed(r)),i=this.shouldLoadNode(a),i&&n.loadNode(a),this.shouldParseNode(a)&&o&&t.parseDynamic(a,i)},shouldLoadNode:function(e){return 1===e.nodeType&&o.call(e,n.loadSelectorsForNode(e))},shouldParseNode:function(e){return 1===e.nodeType&&o.call(e,t.parseSelectorsForNode(e))}};n.observer.addCallback=r.added.bind(r);var o=HTMLElement.prototype.matches||HTMLElement.prototype.matchesSelector||HTMLElement.prototype.webkitMatchesSelector||HTMLElement.prototype.mozMatchesSelector||HTMLElement.prototype.msMatchesSelector}),function(e){function t(){HTMLImports.importer.bootDocument(o)}var n=e.initializeModules,r=e.isIE;if(!e.useNative){r&&"function"!=typeof window.CustomEvent&&(window.CustomEvent=function(e,t){t=t||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,Boolean(t.bubbles),Boolean(t.cancelable),t.detail),n},window.CustomEvent.prototype=window.Event.prototype),n();var o=e.rootDocument;"complete"===document.readyState||"interactive"===document.readyState&&!window.attachEvent?t():document.addEventListener("DOMContentLoaded",t)}}(HTMLImports); -------------------------------------------------------------------------------- /bower_components/webcomponentsjs/README.md: -------------------------------------------------------------------------------- 1 | webcomponents.js 2 | ================ 3 | 4 | [![Join the chat at https://gitter.im/webcomponents/webcomponentsjs](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/webcomponents/webcomponentsjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) 5 | 6 | A suite of polyfills supporting the [Web Components](http://webcomponents.org) specs: 7 | 8 | **Custom Elements**: allows authors to define their own custom tags ([spec](https://w3c.github.io/webcomponents/spec/custom/)). 9 | 10 | **HTML Imports**: a way to include and reuse HTML documents via other HTML documents ([spec](https://w3c.github.io/webcomponents/spec/imports/)). 11 | 12 | **Shadow DOM**: provides encapsulation by hiding DOM subtrees under shadow roots ([spec](https://w3c.github.io/webcomponents/spec/shadow/)). 13 | 14 | This also folds in polyfills for `MutationObserver` and `WeakMap`. 15 | 16 | 17 | ## Releases 18 | 19 | Pre-built (concatenated & minified) versions of the polyfills are maintained in the [tagged versions](https://github.com/webcomponents/webcomponentsjs/releases) of this repo. There are two variants: 20 | 21 | `webcomponents.js` includes all of the polyfills. 22 | 23 | `webcomponents-lite.js` includes all polyfills except for shadow DOM. 24 | 25 | 26 | ## Browser Support 27 | 28 | Our polyfills are intended to work in the latest versions of evergreen browsers. See below 29 | for our complete browser support matrix: 30 | 31 | | Polyfill | IE10 | IE11+ | Chrome* | Firefox* | Safari 7+* | Chrome Android* | Mobile Safari* | 32 | | ---------- |:----:|:-----:|:-------:|:--------:|:----------:|:---------------:|:--------------:| 33 | | Custom Elements | ~ | ✓ | ✓ | ✓ | ✓ | ✓| ✓ | 34 | | HTML Imports | ~ | ✓ | ✓ | ✓ | ✓| ✓| ✓ | 35 | | Shadow DOM | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | 36 | | Templates | ✓ | ✓ | ✓ | ✓| ✓ | ✓ | ✓ | 37 | 38 | 39 | *Indicates the current version of the browser 40 | 41 | ~Indicates support may be flaky. If using Custom Elements or HTML Imports with Shadow DOM, 42 | you will get the non-flaky Mutation Observer polyfill that Shadow DOM includes. 43 | 44 | The polyfills may work in older browsers, however require additional polyfills (such as classList) 45 | to be used. We cannot guarantee support for browsers outside of our compatibility matrix. 46 | 47 | 48 | ### Manually Building 49 | 50 | If you wish to build the polyfills yourself, you'll need `node` and `gulp` on your system: 51 | 52 | * install [node.js](http://nodejs.org/) using the instructions on their website 53 | * use `npm` to install [gulp.js](http://gulpjs.com/): `npm install -g gulp` 54 | 55 | Now you are ready to build the polyfills with: 56 | 57 | # install dependencies 58 | npm install 59 | # build 60 | gulp build 61 | 62 | The builds will be placed into the `dist/` directory. 63 | 64 | ## Contribute 65 | 66 | See the [contributing guide](CONTRIBUTING.md) 67 | 68 | ## License 69 | 70 | Everything in this repository is BSD style license unless otherwise specified. 71 | 72 | Copyright (c) 2015 The Polymer Authors. All rights reserved. 73 | 74 | -------------------------------------------------------------------------------- /bower_components/webcomponentsjs/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "webcomponentsjs", 3 | "main": "webcomponents.js", 4 | "version": "0.5.5", 5 | "homepage": "http://webcomponents.org", 6 | "authors": [ 7 | "The Polymer Authors" 8 | ], 9 | "keywords": [ 10 | "webcomponents" 11 | ], 12 | "license": "BSD", 13 | "ignore": [] 14 | } -------------------------------------------------------------------------------- /bower_components/webcomponentsjs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "webcomponents.js", 3 | "version": "0.5.5", 4 | "description": "webcomponents.js", 5 | "main": "webcomponents.js", 6 | "directories": { 7 | "test": "tests" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "https://github.com/webcomponents/webcomponentsjs.git" 12 | }, 13 | "author": "The Polymer Authors", 14 | "license": { 15 | "type": "BSD-3-Clause", 16 | "url": "http://polymer.github.io/LICENSE.txt" 17 | }, 18 | "bugs": { 19 | "url": "https://github.com/webcomponents/webcomponentsjs/issues" 20 | }, 21 | "homepage": "http://webcomponents.org", 22 | "devDependencies": { 23 | "gulp": "^3.8.8", 24 | "gulp-audit": "^1.0.0", 25 | "gulp-concat": "^2.4.1", 26 | "gulp-header": "^1.1.1", 27 | "gulp-uglify": "^1.0.1", 28 | "run-sequence": "^1.0.1", 29 | "web-component-tester": "*" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /bower_components/webcomponentsjs/webcomponents-lite.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @license 3 | * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. 4 | * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 5 | * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 6 | * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 7 | * Code distributed by Google as part of the polymer project is also 8 | * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 9 | */ 10 | // @version 0.5.5 11 | window.WebComponents=window.WebComponents||{},function(e){var t=e.flags||{},n="webcomponents.js",o=document.querySelector('script[src*="'+n+'"]');if(!t.noOpts){if(location.search.slice(1).split("&").forEach(function(e){e=e.split("="),e[0]&&(t[e[0]]=e[1]||!0)}),o)for(var r,i=0;r=o.attributes[i];i++)"src"!==r.name&&(t[r.name]=r.value||!0);if(t.log){var a=t.log.split(",");t.log={},a.forEach(function(e){t.log[e]=!0})}else t.log={}}t.shadow=t.shadow||t.shadowdom||t.polyfill,t.shadow="native"===t.shadow?!1:t.shadow||!HTMLElement.prototype.createShadowRoot,t.register&&(window.CustomElements=window.CustomElements||{flags:{}},window.CustomElements.flags.register=t.register),e.flags=t}(WebComponents),function(e){function t(e){_.push(e),w||(w=!0,h(o))}function n(e){return window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(e)||e}function o(){w=!1;var e=_;_=[],e.sort(function(e,t){return e.uid_-t.uid_});var t=!1;e.forEach(function(e){var n=e.takeRecords();r(e),n.length&&(e.callback_(n,e),t=!0)}),t&&o()}function r(e){e.nodes_.forEach(function(t){var n=v.get(t);n&&n.forEach(function(t){t.observer===e&&t.removeTransientObservers()})})}function i(e,t){for(var n=e;n;n=n.parentNode){var o=v.get(n);if(o)for(var r=0;r0){var r=n[o-1],i=m(r,e);if(i)return void(n[o-1]=i)}else t(this.observer);n[o]=e},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(e){var t=this.options;t.attributes&&e.addEventListener("DOMAttrModified",this,!0),t.characterData&&e.addEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.addEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(e){var t=this.options;t.attributes&&e.removeEventListener("DOMAttrModified",this,!0),t.characterData&&e.removeEventListener("DOMCharacterDataModified",this,!0),t.childList&&e.removeEventListener("DOMNodeInserted",this,!0),(t.childList||t.subtree)&&e.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(e){if(e!==this.target){this.addListeners_(e),this.transientObservedNodes.push(e);var t=v.get(e);t||v.set(e,t=[]),t.push(this)}},removeTransientObservers:function(){var e=this.transientObservedNodes;this.transientObservedNodes=[],e.forEach(function(e){this.removeListeners_(e);for(var t=v.get(e),n=0;n>>0)+(t++ +"__")};n.prototype={set:function(t,n){var o=t[this.name];return o&&o[0]===t?o[1]=n:e(t,this.name,{value:[t,n],writable:!0}),this},get:function(e){var t;return(t=e[this.name])&&t[0]===e?t[1]:void 0},"delete":function(e){var t=e[this.name];return t&&t[0]===e?(t[0]=t[1]=void 0,!0):!1},has:function(e){var t=e[this.name];return t?t[0]===e:!1}},window.WeakMap=n}(),window.HTMLImports=window.HTMLImports||{flags:{}},function(e){function t(e,t){t=t||p,o(function(){i(e,t)},t)}function n(e){return"complete"===e.readyState||e.readyState===g}function o(e,t){if(n(t))e&&e();else{var r=function(){("complete"===t.readyState||t.readyState===g)&&(t.removeEventListener(b,r),o(e,t))};t.addEventListener(b,r)}}function r(e){e.target.__loaded=!0}function i(e,t){function n(){s==d&&e&&e()}function o(e){r(e),s++,n()}var i=t.querySelectorAll("link[rel=import]"),s=0,d=i.length;if(d)for(var c,u=0;d>u&&(c=i[u]);u++)a(c)?o.call(c,{target:c}):(c.addEventListener("load",o),c.addEventListener("error",o));else n()}function a(e){return l?e.__loaded||e["import"]&&"loading"!==e["import"].readyState:e.__importParsed}function s(e){for(var t,n=0,o=e.length;o>n&&(t=e[n]);n++)d(t)&&c(t)}function d(e){return"link"===e.localName&&"import"===e.rel}function c(e){var t=e["import"];t?r({target:e}):(e.addEventListener("load",r),e.addEventListener("error",r))}var u="import",l=Boolean(u in document.createElement("link")),f=Boolean(window.ShadowDOMPolyfill),m=function(e){return f?ShadowDOMPolyfill.wrapIfNeeded(e):e},p=m(document),h={get:function(){var e=HTMLImports.currentScript||document.currentScript||("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null);return m(e)},configurable:!0};Object.defineProperty(document,"_currentScript",h),Object.defineProperty(p,"_currentScript",h);var v=/Trident|Edge/.test(navigator.userAgent),g=v?"complete":"interactive",b="readystatechange";l&&(new MutationObserver(function(e){for(var t,n=0,o=e.length;o>n&&(t=e[n]);n++)t.addedNodes&&s(t.addedNodes)}).observe(document.head,{childList:!0}),function(){if("loading"===document.readyState)for(var e,t=document.querySelectorAll("link[rel=import]"),n=0,o=t.length;o>n&&(e=t[n]);n++)c(e)}()),t(function(){HTMLImports.ready=!0,HTMLImports.readyTime=(new Date).getTime();var e=p.createEvent("CustomEvent");e.initCustomEvent("HTMLImportsLoaded",!0,!0,{}),p.dispatchEvent(e)}),e.IMPORT_LINK_TYPE=u,e.useNative=l,e.rootDocument=p,e.whenReady=t,e.isIE=v}(HTMLImports),function(e){var t=[],n=function(e){t.push(e)},o=function(){t.forEach(function(t){t(e)})};e.addModule=n,e.initializeModules=o}(HTMLImports),HTMLImports.addModule(function(e){var t=/(url\()([^)]*)(\))/g,n=/(@import[\s]+(?!url\())([^;]*)(;)/g,o={resolveUrlsInStyle:function(e){var t=e.ownerDocument,n=t.createElement("a");return e.textContent=this.resolveUrlsInCssText(e.textContent,n),e},resolveUrlsInCssText:function(e,o){var r=this.replaceUrls(e,o,t);return r=this.replaceUrls(r,o,n)},replaceUrls:function(e,t,n){return e.replace(n,function(e,n,o,r){var i=o.replace(/["']/g,"");return t.href=i,i=t.href,n+"'"+i+"'"+r})}};e.path=o}),HTMLImports.addModule(function(e){var t={async:!0,ok:function(e){return e.status>=200&&e.status<300||304===e.status||0===e.status},load:function(n,o,r){var i=new XMLHttpRequest;return(e.flags.debug||e.flags.bust)&&(n+="?"+Math.random()),i.open("GET",n,t.async),i.addEventListener("readystatechange",function(){if(4===i.readyState){var e=i.getResponseHeader("Location"),n=null;if(e)var n="/"===e.substr(0,1)?location.origin+e:e;o.call(r,!t.ok(i)&&i,i.response||i.responseText,n)}}),i.send(),i},loadDocument:function(e,t,n){this.load(e,t,n).responseType="document"}};e.xhr=t}),HTMLImports.addModule(function(e){var t=e.xhr,n=e.flags,o=function(e,t){this.cache={},this.onload=e,this.oncomplete=t,this.inflight=0,this.pending={}};o.prototype={addNodes:function(e){this.inflight+=e.length;for(var t,n=0,o=e.length;o>n&&(t=e[n]);n++)this.require(t);this.checkDone()},addNode:function(e){this.inflight++,this.require(e),this.checkDone()},require:function(e){var t=e.src||e.href;e.__nodeUrl=t,this.dedupe(t,e)||this.fetch(t,e)},dedupe:function(e,t){if(this.pending[e])return this.pending[e].push(t),!0;return this.cache[e]?(this.onload(e,t,this.cache[e]),this.tail(),!0):(this.pending[e]=[t],!1)},fetch:function(e,o){if(n.load&&console.log("fetch",e,o),e)if(e.match(/^data:/)){var r=e.split(","),i=r[0],a=r[1];a=i.indexOf(";base64")>-1?atob(a):decodeURIComponent(a),setTimeout(function(){this.receive(e,o,null,a)}.bind(this),0)}else{var s=function(t,n,r){this.receive(e,o,t,n,r)}.bind(this);t.load(e,s)}else setTimeout(function(){this.receive(e,o,{error:"href must be specified"},null)}.bind(this),0)},receive:function(e,t,n,o,r){this.cache[e]=o;for(var i,a=this.pending[e],s=0,d=a.length;d>s&&(i=a[s]);s++)this.onload(e,i,o,n,r),this.tail();this.pending[e]=null},tail:function(){--this.inflight,this.checkDone()},checkDone:function(){this.inflight||this.oncomplete()}},e.Loader=o}),HTMLImports.addModule(function(e){var t=function(e){this.addCallback=e,this.mo=new MutationObserver(this.handler.bind(this))};t.prototype={handler:function(e){for(var t,n=0,o=e.length;o>n&&(t=e[n]);n++)"childList"===t.type&&t.addedNodes.length&&this.addedNodes(t.addedNodes)},addedNodes:function(e){this.addCallback&&this.addCallback(e);for(var t,n=0,o=e.length;o>n&&(t=e[n]);n++)t.children&&t.children.length&&this.addedNodes(t.children)},observe:function(e){this.mo.observe(e,{childList:!0,subtree:!0})}},e.Observer=t}),HTMLImports.addModule(function(e){function t(e){return"link"===e.localName&&e.rel===u}function n(e){var t=o(e);return"data:text/javascript;charset=utf-8,"+encodeURIComponent(t)}function o(e){return e.textContent+r(e)}function r(e){var t=e.ownerDocument;t.__importedScripts=t.__importedScripts||0;var n=e.ownerDocument.baseURI,o=t.__importedScripts?"-"+t.__importedScripts:"";return t.__importedScripts++,"\n//# sourceURL="+n+o+".js\n"}function i(e){var t=e.ownerDocument.createElement("style");return t.textContent=e.textContent,a.resolveUrlsInStyle(t),t}var a=e.path,s=e.rootDocument,d=e.flags,c=e.isIE,u=e.IMPORT_LINK_TYPE,l="link[rel="+u+"]",f={documentSelectors:l,importsSelectors:[l,"link[rel=stylesheet]","style","script:not([type])",'script[type="text/javascript"]'].join(","),map:{link:"parseLink",script:"parseScript",style:"parseStyle"},dynamicElements:[],parseNext:function(){var e=this.nextToParse();e&&this.parse(e)},parse:function(e){if(this.isParsed(e))return void(d.parse&&console.log("[%s] is already parsed",e.localName));var t=this[this.map[e.localName]];t&&(this.markParsing(e),t.call(this,e))},parseDynamic:function(e,t){this.dynamicElements.push(e),t||this.parseNext()},markParsing:function(e){d.parse&&console.log("parsing",e),this.parsingElement=e},markParsingComplete:function(e){e.__importParsed=!0,this.markDynamicParsingComplete(e),e.__importElement&&(e.__importElement.__importParsed=!0,this.markDynamicParsingComplete(e.__importElement)),this.parsingElement=null,d.parse&&console.log("completed",e)},markDynamicParsingComplete:function(e){var t=this.dynamicElements.indexOf(e);t>=0&&this.dynamicElements.splice(t,1)},parseImport:function(e){if(HTMLImports.__importsParsingHook&&HTMLImports.__importsParsingHook(e),e["import"]&&(e["import"].__importParsed=!0),this.markParsingComplete(e),e.dispatchEvent(e.__resource&&!e.__error?new CustomEvent("load",{bubbles:!1}):new CustomEvent("error",{bubbles:!1})),e.__pending)for(var t;e.__pending.length;)t=e.__pending.shift(),t&&t({target:e});this.parseNext()},parseLink:function(e){t(e)?this.parseImport(e):(e.href=e.href,this.parseGeneric(e))},parseStyle:function(e){var t=e;e=i(e),e.__importElement=t,this.parseGeneric(e)},parseGeneric:function(e){this.trackElement(e),this.addElementToDocument(e)},rootImportForElement:function(e){for(var t=e;t.ownerDocument.__importLink;)t=t.ownerDocument.__importLink;return t},addElementToDocument:function(e){var t=this.rootImportForElement(e.__importElement||e);t.parentNode.insertBefore(e,t)},trackElement:function(e,t){var n=this,o=function(o){t&&t(o),n.markParsingComplete(e),n.parseNext()};if(e.addEventListener("load",o),e.addEventListener("error",o),c&&"style"===e.localName){var r=!1;if(-1==e.textContent.indexOf("@import"))r=!0;else if(e.sheet){r=!0;for(var i,a=e.sheet.cssRules,s=a?a.length:0,d=0;s>d&&(i=a[d]);d++)i.type===CSSRule.IMPORT_RULE&&(r=r&&Boolean(i.styleSheet))}r&&e.dispatchEvent(new CustomEvent("load",{bubbles:!1}))}},parseScript:function(t){var o=document.createElement("script");o.__importElement=t,o.src=t.src?t.src:n(t),e.currentScript=t,this.trackElement(o,function(){o.parentNode.removeChild(o),e.currentScript=null}),this.addElementToDocument(o)},nextToParse:function(){return this._mayParse=[],!this.parsingElement&&(this.nextToParseInDoc(s)||this.nextToParseDynamic())},nextToParseInDoc:function(e,n){if(e&&this._mayParse.indexOf(e)<0){this._mayParse.push(e);for(var o,r=e.querySelectorAll(this.parseSelectorsForNode(e)),i=0,a=r.length;a>i&&(o=r[i]);i++)if(!this.isParsed(o))return this.hasResource(o)?t(o)?this.nextToParseInDoc(o["import"],o):o:void 0}return n},nextToParseDynamic:function(){return this.dynamicElements[0]},parseSelectorsForNode:function(e){var t=e.ownerDocument||e;return t===s?this.documentSelectors:this.importsSelectors},isParsed:function(e){return e.__importParsed},needsDynamicParsing:function(e){return this.dynamicElements.indexOf(e)>=0},hasResource:function(e){return t(e)&&void 0===e["import"]?!1:!0}};e.parser=f,e.IMPORT_SELECTOR=l}),HTMLImports.addModule(function(e){function t(e){return n(e,a)}function n(e,t){return"link"===e.localName&&e.getAttribute("rel")===t}function o(e){return!!Object.getOwnPropertyDescriptor(e,"baseURI")}function r(e,t){var n=document.implementation.createHTMLDocument(a);n._URL=t;var r=n.createElement("base");r.setAttribute("href",t),n.baseURI||o(n)||Object.defineProperty(n,"baseURI",{value:t});var i=n.createElement("meta");return i.setAttribute("charset","utf-8"),n.head.appendChild(i),n.head.appendChild(r),n.body.innerHTML=e,window.HTMLTemplateElement&&HTMLTemplateElement.bootstrap&&HTMLTemplateElement.bootstrap(n),n}var i=e.flags,a=e.IMPORT_LINK_TYPE,s=e.IMPORT_SELECTOR,d=e.rootDocument,c=e.Loader,u=e.Observer,l=e.parser,f={documents:{},documentPreloadSelectors:s,importsPreloadSelectors:[s].join(","),loadNode:function(e){m.addNode(e)},loadSubtree:function(e){var t=this.marshalNodes(e);m.addNodes(t)},marshalNodes:function(e){return e.querySelectorAll(this.loadSelectorsForNode(e))},loadSelectorsForNode:function(e){var t=e.ownerDocument||e;return t===d?this.documentPreloadSelectors:this.importsPreloadSelectors},loaded:function(e,n,o,a,s){if(i.load&&console.log("loaded",e,n),n.__resource=o,n.__error=a,t(n)){var d=this.documents[e];void 0===d&&(d=a?null:r(o,s||e),d&&(d.__importLink=n,this.bootDocument(d)),this.documents[e]=d),n["import"]=d}l.parseNext()},bootDocument:function(e){this.loadSubtree(e),this.observer.observe(e),l.parseNext()},loadedAll:function(){l.parseNext()}},m=new c(f.loaded.bind(f),f.loadedAll.bind(f));if(f.observer=new u,!document.baseURI){var p={get:function(){var e=document.querySelector("base");return e?e.href:window.location.href},configurable:!0};Object.defineProperty(document,"baseURI",p),Object.defineProperty(d,"baseURI",p)}e.importer=f,e.importLoader=m}),HTMLImports.addModule(function(e){var t=e.parser,n=e.importer,o={added:function(e){for(var o,r,i,a,s=0,d=e.length;d>s&&(a=e[s]);s++)o||(o=a.ownerDocument,r=t.isParsed(o)),i=this.shouldLoadNode(a),i&&n.loadNode(a),this.shouldParseNode(a)&&r&&t.parseDynamic(a,i)},shouldLoadNode:function(e){return 1===e.nodeType&&r.call(e,n.loadSelectorsForNode(e))},shouldParseNode:function(e){return 1===e.nodeType&&r.call(e,t.parseSelectorsForNode(e))}};n.observer.addCallback=o.added.bind(o);var r=HTMLElement.prototype.matches||HTMLElement.prototype.matchesSelector||HTMLElement.prototype.webkitMatchesSelector||HTMLElement.prototype.mozMatchesSelector||HTMLElement.prototype.msMatchesSelector}),function(e){function t(){HTMLImports.importer.bootDocument(r)}var n=e.initializeModules,o=e.isIE;if(!e.useNative){o&&"function"!=typeof window.CustomEvent&&(window.CustomEvent=function(e,t){t=t||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,Boolean(t.bubbles),Boolean(t.cancelable),t.detail),n},window.CustomEvent.prototype=window.Event.prototype),n();var r=e.rootDocument;"complete"===document.readyState||"interactive"===document.readyState&&!window.attachEvent?t():document.addEventListener("DOMContentLoaded",t)}}(HTMLImports),window.CustomElements=window.CustomElements||{flags:{}},function(e){var t=e.flags,n=[],o=function(e){n.push(e)},r=function(){n.forEach(function(t){t(e)})};e.addModule=o,e.initializeModules=r,e.hasNative=Boolean(document.registerElement),e.useNative=!t.register&&e.hasNative&&!window.ShadowDOMPolyfill&&(!window.HTMLImports||HTMLImports.useNative)}(CustomElements),CustomElements.addModule(function(e){function t(e,t){n(e,function(e){return t(e)?!0:void o(e,t)}),o(e,t)}function n(e,t,o){var r=e.firstElementChild;if(!r)for(r=e.firstChild;r&&r.nodeType!==Node.ELEMENT_NODE;)r=r.nextSibling;for(;r;)t(r,o)!==!0&&n(r,t,o),r=r.nextElementSibling;return null}function o(e,n){for(var o=e.shadowRoot;o;)t(o,n),o=o.olderShadowRoot}function r(e,t){a=[],i(e,t),a=null}function i(e,t){if(e=wrap(e),!(a.indexOf(e)>=0)){a.push(e);for(var n,o=e.querySelectorAll("link[rel="+s+"]"),r=0,d=o.length;d>r&&(n=o[r]);r++)n["import"]&&i(n["import"],t);t(e)}}var a,s=window.HTMLImports?HTMLImports.IMPORT_LINK_TYPE:"none";e.forDocumentTree=r,e.forSubtree=t}),CustomElements.addModule(function(e){function t(e){return n(e)||o(e)}function n(t){return e.upgrade(t)?!0:void s(t)}function o(e){_(e,function(e){return n(e)?!0:void 0})}function r(e){s(e),f(e)&&_(e,function(e){s(e)})}function i(e){M.push(e),L||(L=!0,setTimeout(a))}function a(){L=!1;for(var e,t=M,n=0,o=t.length;o>n&&(e=t[n]);n++)e();M=[]}function s(e){y?i(function(){d(e)}):d(e)}function d(e){e.__upgraded__&&(e.attachedCallback||e.detachedCallback)&&!e.__attached&&f(e)&&(e.__attached=!0,e.attachedCallback&&e.attachedCallback())}function c(e){u(e),_(e,function(e){u(e)})}function u(e){y?i(function(){l(e)}):l(e)}function l(e){e.__upgraded__&&(e.attachedCallback||e.detachedCallback)&&e.__attached&&!f(e)&&(e.__attached=!1,e.detachedCallback&&e.detachedCallback())}function f(e){for(var t=e,n=wrap(document);t;){if(t==n)return!0;t=t.parentNode||t.host}}function m(e){if(e.shadowRoot&&!e.shadowRoot.__watched){w.dom&&console.log("watching shadow-root for: ",e.localName);for(var t=e.shadowRoot;t;)v(t),t=t.olderShadowRoot}}function p(e){if(w.dom){var n=e[0];if(n&&"childList"===n.type&&n.addedNodes&&n.addedNodes){for(var o=n.addedNodes[0];o&&o!==document&&!o.host;)o=o.parentNode;var r=o&&(o.URL||o._URL||o.host&&o.host.localName)||"";r=r.split("/?").shift().split("/").pop()}console.group("mutations (%d) [%s]",e.length,r||"")}e.forEach(function(e){"childList"===e.type&&(T(e.addedNodes,function(e){e.localName&&t(e)}),T(e.removedNodes,function(e){e.localName&&c(e)}))}),w.dom&&console.groupEnd()}function h(e){for(e=wrap(e),e||(e=wrap(document));e.parentNode;)e=e.parentNode;var t=e.__observer;t&&(p(t.takeRecords()),a())}function v(e){if(!e.__observer){var t=new MutationObserver(p);t.observe(e,{childList:!0,subtree:!0}),e.__observer=t}}function g(e){e=wrap(e),w.dom&&console.group("upgradeDocument: ",e.baseURI.split("/").pop()),t(e),v(e),w.dom&&console.groupEnd()}function b(e){E(e,g)}var w=e.flags,_=e.forSubtree,E=e.forDocumentTree,y=!window.MutationObserver||window.MutationObserver===window.JsMutationObserver;e.hasPolyfillMutations=y;var L=!1,M=[],T=Array.prototype.forEach.call.bind(Array.prototype.forEach),N=Element.prototype.createShadowRoot;N&&(Element.prototype.createShadowRoot=function(){var e=N.call(this);return CustomElements.watchShadow(this),e}),e.watchShadow=m,e.upgradeDocumentTree=b,e.upgradeSubtree=o,e.upgradeAll=t,e.attachedNode=r,e.takeRecords=h}),CustomElements.addModule(function(e){function t(t){if(!t.__upgraded__&&t.nodeType===Node.ELEMENT_NODE){var o=t.getAttribute("is"),r=e.getRegisteredDefinition(o||t.localName);if(r){if(o&&r.tag==t.localName)return n(t,r);if(!o&&!r["extends"])return n(t,r)}}}function n(t,n){return a.upgrade&&console.group("upgrade:",t.localName),n.is&&t.setAttribute("is",n.is),o(t,n),t.__upgraded__=!0,i(t),e.attachedNode(t),e.upgradeSubtree(t),a.upgrade&&console.groupEnd(),t}function o(e,t){Object.__proto__?e.__proto__=t.prototype:(r(e,t.prototype,t["native"]),e.__proto__=t.prototype)}function r(e,t,n){for(var o={},r=t;r!==n&&r!==HTMLElement.prototype;){for(var i,a=Object.getOwnPropertyNames(r),s=0;i=a[s];s++)o[i]||(Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i)),o[i]=1);r=Object.getPrototypeOf(r)}}function i(e){e.createdCallback&&e.createdCallback()}var a=e.flags;e.upgrade=t,e.upgradeWithDefinition=n,e.implementPrototype=o}),CustomElements.addModule(function(e){function t(t,o){var d=o||{};if(!t)throw new Error("document.registerElement: first argument `name` must not be empty");if(t.indexOf("-")<0)throw new Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '"+String(t)+"'.");if(r(t))throw new Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '"+String(t)+"'. The type name is invalid.");if(c(t))throw new Error("DuplicateDefinitionError: a type with name '"+String(t)+"' is already registered");return d.prototype||(d.prototype=Object.create(HTMLElement.prototype)),d.__name=t.toLowerCase(),d.lifecycle=d.lifecycle||{},d.ancestry=i(d["extends"]),a(d),s(d),n(d.prototype),u(d.__name,d),d.ctor=l(d),d.ctor.prototype=d.prototype,d.prototype.constructor=d.ctor,e.ready&&v(document),d.ctor}function n(e){if(!e.setAttribute._polyfilled){var t=e.setAttribute;e.setAttribute=function(e,n){o.call(this,e,n,t)};var n=e.removeAttribute;e.removeAttribute=function(e){o.call(this,e,null,n)},e.setAttribute._polyfilled=!0}}function o(e,t,n){e=e.toLowerCase();var o=this.getAttribute(e);n.apply(this,arguments);var r=this.getAttribute(e);this.attributeChangedCallback&&r!==o&&this.attributeChangedCallback(e,o,r)}function r(e){for(var t=0;t=0&&w(o,HTMLElement),o)}function p(e){var t=N.call(this,e);return g(t),t}var h,v=e.upgradeDocumentTree,g=e.upgrade,b=e.upgradeWithDefinition,w=e.implementPrototype,_=e.useNative,E=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"],y={},L="http://www.w3.org/1999/xhtml",M=document.createElement.bind(document),T=document.createElementNS.bind(document),N=Node.prototype.cloneNode;h=Object.__proto__||_?function(e,t){return e instanceof t}:function(e,t){for(var n=e;n;){if(n===t.prototype)return!0;n=n.__proto__}return!1},document.registerElement=t,document.createElement=m,document.createElementNS=f,Node.prototype.cloneNode=p,e.registry=y,e["instanceof"]=h,e.reservedTagList=E,e.getRegisteredDefinition=c,document.register=document.registerElement}),function(e){function t(){a(wrap(document)),window.HTMLImports&&(HTMLImports.__importsParsingHook=function(e){a(wrap(e["import"]))}),CustomElements.ready=!0,setTimeout(function(){CustomElements.readyTime=Date.now(),window.HTMLImports&&(CustomElements.elapsed=CustomElements.readyTime-HTMLImports.readyTime),document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})}var n=e.useNative,o=e.initializeModules,r=/Trident/.test(navigator.userAgent);if(n){var i=function(){};e.watchShadow=i,e.upgrade=i,e.upgradeAll=i,e.upgradeDocumentTree=i,e.upgradeSubtree=i,e.takeRecords=i,e["instanceof"]=function(e,t){return e instanceof t}}else o();var a=e.upgradeDocumentTree;if(window.wrap||(window.ShadowDOMPolyfill?(window.wrap=ShadowDOMPolyfill.wrapIfNeeded,window.unwrap=ShadowDOMPolyfill.unwrapIfNeeded):window.wrap=window.unwrap=function(e){return e}),r&&"function"!=typeof window.CustomEvent&&(window.CustomEvent=function(e,t){t=t||{};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,Boolean(t.bubbles),Boolean(t.cancelable),t.detail),n},window.CustomEvent.prototype=window.Event.prototype),"complete"===document.readyState||e.flags.eager)t();else if("interactive"!==document.readyState||window.attachEvent||window.HTMLImports&&!window.HTMLImports.ready){var s=window.HTMLImports&&!HTMLImports.ready?"HTMLImportsLoaded":"DOMContentLoaded";window.addEventListener(s,t)}else t()}(window.CustomElements),"undefined"==typeof HTMLTemplateElement&&!function(){var e="template";HTMLTemplateElement=function(){},HTMLTemplateElement.prototype=Object.create(HTMLElement.prototype),HTMLTemplateElement.decorate=function(e){if(!e.content){e.content=e.ownerDocument.createDocumentFragment();for(var t;t=e.firstChild;)e.content.appendChild(t)}},HTMLTemplateElement.bootstrap=function(t){for(var n,o=t.querySelectorAll(e),r=0,i=o.length;i>r&&(n=o[r]);r++)HTMLTemplateElement.decorate(n)},addEventListener("DOMContentLoaded",function(){HTMLTemplateElement.bootstrap(document)})}(),function(){var e=document.createElement("style");e.textContent="body {transition: opacity ease-in 0.2s; } \nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \n";var t=document.querySelector("head");t.insertBefore(e,t.firstChild)}(window.WebComponents); -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // Include Gulp & Tools We'll Use 4 | var gulp = require('gulp'); 5 | var $ = require('gulp-load-plugins')(); 6 | var del = require('del'); 7 | var runSequence = require('run-sequence'); 8 | var browserSync = require('browser-sync'); 9 | var pagespeed = require('psi'); 10 | var reload = browserSync.reload; 11 | var merge = require('merge-stream'); 12 | 13 | var AUTOPREFIXER_BROWSERS = [ 14 | 'ie >= 10', 15 | 'ie_mob >= 10', 16 | 'ff >= 30', 17 | 'chrome >= 34', 18 | 'safari >= 7', 19 | 'opera >= 23', 20 | 'ios >= 7', 21 | 'android >= 4.4', 22 | 'bb >= 10' 23 | ]; 24 | 25 | // Lint JavaScript 26 | gulp.task('jshint', function () { 27 | return gulp.src([ 28 | 'app/scripts/**/*.js', 29 | 'app/elements/**/*.js', 30 | 'app/elements/**/*.html' 31 | ]) 32 | .pipe(reload({stream: true, once: true})) 33 | .pipe($.jshint.extract()) // Extract JS from .html files 34 | .pipe($.jshint()) 35 | .pipe($.jshint.reporter('jshint-stylish')) 36 | .pipe($.if(!browserSync.active, $.jshint.reporter('fail'))); 37 | }); 38 | 39 | // Optimize Images 40 | gulp.task('images', function () { 41 | return gulp.src('app/images/**/*') 42 | .pipe($.cache($.imagemin({ 43 | progressive: true, 44 | interlaced: true 45 | }))) 46 | .pipe(gulp.dest('dist/images')) 47 | .pipe($.size({title: 'images'})); 48 | }); 49 | 50 | // Copy All Files At The Root Level (app) 51 | gulp.task('copy', function () { 52 | var app = gulp.src([ 53 | 'app/*', 54 | '!app/test', 55 | 'node_modules/apache-server-configs/dist/.htaccess' 56 | ], { 57 | dot: true 58 | }).pipe(gulp.dest('dist')); 59 | 60 | var bower = gulp.src([ 61 | 'bower_components/**/*' 62 | ]).pipe(gulp.dest('dist/bower_components')); 63 | 64 | var elements = gulp.src(['app/elements/**/*.html']) 65 | .pipe(gulp.dest('dist/elements')); 66 | 67 | var vulcanized = gulp.src(['app/elements/elements.html']) 68 | .pipe($.rename('elements.vulcanized.html')) 69 | .pipe(gulp.dest('dist/elements')); 70 | 71 | return merge(app, bower, elements, vulcanized).pipe($.size({title: 'copy'})); 72 | }); 73 | 74 | // Copy Web Fonts To Dist 75 | gulp.task('fonts', function () { 76 | return gulp.src(['app/fonts/**']) 77 | .pipe(gulp.dest('dist/fonts')) 78 | .pipe($.size({title: 'fonts'})); 79 | }); 80 | 81 | // Compile and Automatically Prefix Stylesheets 82 | gulp.task('styles', function () { 83 | return gulp.src([ 84 | 'app/styles/**/*.css', 85 | 'app/styles/*.scss' 86 | ]) 87 | .pipe($.changed('styles', {extension: '.scss'})) 88 | .pipe($.rubySass({ 89 | style: 'expanded', 90 | precision: 10 91 | }) 92 | .on('error', console.error.bind(console)) 93 | ) 94 | .pipe($.autoprefixer(AUTOPREFIXER_BROWSERS)) 95 | .pipe(gulp.dest('.tmp/styles')) 96 | // Concatenate And Minify Styles 97 | .pipe($.if('*.css', $.cssmin())) 98 | .pipe(gulp.dest('dist/styles')) 99 | .pipe($.size({title: 'styles'})); 100 | }); 101 | 102 | gulp.task('elements', function () { 103 | return gulp.src([ 104 | 'app/elements/**/*.css', 105 | 'app/elements/**/*.scss' 106 | ]) 107 | .pipe($.changed('elements', {extension: '.scss'})) 108 | .pipe($.rubySass({ 109 | style: 'expanded', 110 | precision: 10 111 | }) 112 | .on('error', console.error.bind(console)) 113 | ) 114 | .pipe($.autoprefixer(AUTOPREFIXER_BROWSERS)) 115 | .pipe(gulp.dest('.tmp/elements')) 116 | // Concatenate And Minify Styles 117 | .pipe($.if('*.css', $.cssmin())) 118 | .pipe(gulp.dest('dist/elements')) 119 | .pipe($.size({title: 'elements'})); 120 | }); 121 | 122 | // Scan Your HTML For Assets & Optimize Them 123 | gulp.task('html', function () { 124 | var assets = $.useref.assets({searchPath: ['.tmp', 'app', 'dist']}); 125 | 126 | return gulp.src(['app/**/*.html', '!app/{elements,test}/**/*.html']) 127 | // Replace path for vulcanized assets 128 | .pipe($.if('*.html', $.replace('elements/elements.html', 'elements/elements.vulcanized.html'))) 129 | .pipe(assets) 130 | // Concatenate And Minify JavaScript 131 | .pipe($.if('*.js', $.uglify({preserveComments: 'some'}))) 132 | // Concatenate And Minify Styles 133 | // In case you are still using useref build blocks 134 | .pipe($.if('*.css', $.cssmin())) 135 | .pipe(assets.restore()) 136 | .pipe($.useref()) 137 | // Minify Any HTML 138 | .pipe($.if('*.html', $.minifyHtml({ 139 | quotes: true, 140 | empty: true, 141 | spare: true 142 | }))) 143 | // Output Files 144 | .pipe(gulp.dest('dist')) 145 | .pipe($.size({title: 'html'})); 146 | }); 147 | 148 | // Vulcanize imports 149 | gulp.task('vulcanize', function () { 150 | var DEST_DIR = 'dist/elements'; 151 | 152 | return gulp.src('dist/elements/elements.vulcanized.html') 153 | .pipe($.vulcanize({ 154 | dest: DEST_DIR, 155 | strip: true 156 | })) 157 | .pipe(gulp.dest(DEST_DIR)) 158 | .pipe($.size({title: 'vulcanize'})); 159 | }); 160 | 161 | // Clean Output Directory 162 | gulp.task('clean', del.bind(null, ['.tmp', 'dist'])); 163 | 164 | // Watch Files For Changes & Reload 165 | gulp.task('serve', ['styles', 'elements'], function () { 166 | browserSync({ 167 | notify: false, 168 | // Run as an https by uncommenting 'https: true' 169 | // Note: this uses an unsigned certificate which on first access 170 | // will present a certificate warning in the browser. 171 | // https: true, 172 | server: { 173 | baseDir: ['.tmp', 'app'], 174 | routes: { 175 | '/bower_components': 'bower_components' 176 | } 177 | } 178 | }); 179 | 180 | gulp.watch(['app/**/*.html'], reload); 181 | gulp.watch(['app/styles/**/*.{scss,css}'], ['styles', reload]); 182 | gulp.watch(['app/elements/**/*.{scss,css}'], ['elements', reload]); 183 | gulp.watch(['app/scripts/**/*.js'], ['jshint']); 184 | gulp.watch(['app/images/**/*'], reload); 185 | }); 186 | 187 | // Build and serve the output from the dist build 188 | gulp.task('serve:dist', ['default'], function () { 189 | browserSync({ 190 | notify: false, 191 | // Run as an https by uncommenting 'https: true' 192 | // Note: this uses an unsigned certificate which on first access 193 | // will present a certificate warning in the browser. 194 | // https: true, 195 | server: 'dist' 196 | }); 197 | }); 198 | 199 | // Build Production Files, the Default Task 200 | gulp.task('default', ['clean'], function (cb) { 201 | runSequence( 202 | ['copy', 'styles'], 203 | 'elements', 204 | ['jshint', 'images', 'fonts', 'html'], 205 | 'vulcanize', 206 | cb); 207 | }); 208 | 209 | // Run PageSpeed Insights 210 | // Update `url` below to the public URL for your site 211 | gulp.task('pagespeed', function (cb) { 212 | // Update the below URL to the public URL of your site 213 | pagespeed.output('example.com', { 214 | strategy: 'mobile', 215 | // By default we use the PageSpeed Insights free (no API key) tier. 216 | // Use a Google Developer API key if you have one: http://goo.gl/RkN0vE 217 | // key: 'YOUR_API_KEY' 218 | }, cb); 219 | }); 220 | 221 | // Load tasks for web-component-tester 222 | // Adds tasks for `gulp test:local` and `gulp test:remote` 223 | try { require('web-component-tester').gulp.init(gulp); } catch (err) {} 224 | 225 | // Load custom tasks from the `tasks` directory 226 | try { require('require-dir')('tasks'); } catch (err) {} 227 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cards-ui", 3 | "version": "0.0.0", 4 | "dependencies": {}, 5 | "devDependencies": { 6 | "web-component-tester": "^2.2.3", 7 | "apache-server-configs": "^2.7.1", 8 | "browser-sync": "^1.3.0", 9 | "del": "^0.1.2", 10 | "gulp": "^3.8.5", 11 | "gulp-autoprefixer": "^0.0.8", 12 | "gulp-cache": "^0.2.2", 13 | "gulp-changed": "^1.0.0", 14 | "gulp-cssmin": "^0.1.6", 15 | "gulp-flatten": "^0.0.2", 16 | "gulp-if": "^1.2.1", 17 | "gulp-imagemin": "^1.0.0", 18 | "gulp-jshint": "^1.6.3", 19 | "gulp-load-plugins": "^0.5.3", 20 | "gulp-minify-html": "^0.1.4", 21 | "gulp-rename": "^1.2.0", 22 | "gulp-replace": "^0.4.0", 23 | "gulp-ruby-sass": "^0.7.1", 24 | "gulp-size": "^1.0.0", 25 | "gulp-uglify": "^0.3.1", 26 | "gulp-uncss": "^0.4.5", 27 | "gulp-useref": "^0.6.0", 28 | "gulp-vulcanize": "^5.0.0", 29 | "jshint-stylish": "^0.4.0", 30 | "merge-stream": "^0.1.6", 31 | "opn": "^1.0.0", 32 | "psi": "^1.0.4", 33 | "require-dir": "^0.1.0", 34 | "run-sequence": "^0.3.6" 35 | }, 36 | "engines": { 37 | "node": ">=0.10.0" 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /wct.conf.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: '.', 3 | suites: ['app/test'] 4 | }; 5 | --------------------------------------------------------------------------------