From 1bb035c4268f13a27ae385db6d7b5ba6025d3b19 Mon Sep 17 00:00:00 2001 From: Radek Stepan Date: Sun, 26 Oct 2014 21:13:30 -0600 Subject: [PATCH] do not keep unminified versions around --- public/css/app.bundle.css | 548 - public/css/app.css | 120 - public/js/app.bundle.js | 41819 ------------------------------------ 3 files changed, 42487 deletions(-) delete mode 100644 public/css/app.bundle.css delete mode 100644 public/css/app.css delete mode 100644 public/js/app.bundle.js diff --git a/public/css/app.bundle.css b/public/css/app.bundle.css deleted file mode 100644 index 1243568..0000000 --- a/public/css/app.bundle.css +++ /dev/null @@ -1,548 +0,0 @@ -/*! normalize.css v3.0.2 | MIT License | git.io/normalize */ - -/** - * 1. Set default font family to sans-serif. - * 2. Prevent iOS text size adjust after orientation change, without disabling - * user zoom. - */ - -html { - font-family: sans-serif; /* 1 */ - -ms-text-size-adjust: 100%; /* 2 */ - -webkit-text-size-adjust: 100%; /* 2 */ -} - -/** - * Remove default margin. - */ - -body { - margin: 0; -} - -/* HTML5 display definitions - ========================================================================== */ - -/** - * Correct `block` display not defined for any HTML5 element in IE 8/9. - * Correct `block` display not defined for `details` or `summary` in IE 10/11 - * and Firefox. - * Correct `block` display not defined for `main` in IE 11. - */ - -article, -aside, -details, -figcaption, -figure, -footer, -header, -hgroup, -main, -menu, -nav, -section, -summary { - display: block; -} - -/** - * 1. Correct `inline-block` display not defined in IE 8/9. - * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. - */ - -audio, -canvas, -progress, -video { - display: inline-block; /* 1 */ - vertical-align: baseline; /* 2 */ -} - -/** - * Prevent modern browsers from displaying `audio` without controls. - * Remove excess height in iOS 5 devices. - */ - -audio:not([controls]) { - display: none; - height: 0; -} - -/** - * Address `[hidden]` styling not present in IE 8/9/10. - * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22. - */ - -[hidden], -template { - display: none; -} - -/* Links - ========================================================================== */ - -/** - * Remove the gray background color from active links in IE 10. - */ - -a { - background-color: transparent; -} - -/** - * Improve readability when focused and also mouse hovered in all browsers. - */ - -a:active, -a:hover { - outline: 0; -} - -/* Text-level semantics - ========================================================================== */ - -/** - * Address styling not present in IE 8/9/10/11, Safari, and Chrome. - */ - -abbr[title] { - border-bottom: 1px dotted; -} - -/** - * Address style set to `bolder` in Firefox 4+, Safari, and Chrome. - */ - -b, -strong { - font-weight: bold; -} - -/** - * Address styling not present in Safari and Chrome. - */ - -dfn { - font-style: italic; -} - -/** - * Address variable `h1` font-size and margin within `section` and `article` - * contexts in Firefox 4+, Safari, and Chrome. - */ - -h1 { - font-size: 2em; - margin: 0.67em 0; -} - -/** - * Address styling not present in IE 8/9. - */ - -mark { - background: #ff0; - color: #000; -} - -/** - * Address inconsistent and variable font size in all browsers. - */ - -small { - font-size: 80%; -} - -/** - * Prevent `sub` and `sup` affecting `line-height` in all browsers. - */ - -sub, -sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; -} - -sup { - top: -0.5em; -} - -sub { - bottom: -0.25em; -} - -/* Embedded content - ========================================================================== */ - -/** - * Remove border when inside `a` element in IE 8/9/10. - */ - -img { - border: 0; -} - -/** - * Correct overflow not hidden in IE 9/10/11. - */ - -svg:not(:root) { - overflow: hidden; -} - -/* Grouping content - ========================================================================== */ - -/** - * Address margin not present in IE 8/9 and Safari. - */ - -figure { - margin: 1em 40px; -} - -/** - * Address differences between Firefox and other browsers. - */ - -hr { - -moz-box-sizing: content-box; - box-sizing: content-box; - height: 0; -} - -/** - * Contain overflow in all browsers. - */ - -pre { - overflow: auto; -} - -/** - * Address odd `em`-unit font size rendering in all browsers. - */ - -code, -kbd, -pre, -samp { - font-family: monospace, monospace; - font-size: 1em; -} - -/* Forms - ========================================================================== */ - -/** - * Known limitation: by default, Chrome and Safari on OS X allow very limited - * styling of `select`, unless a `border` property is set. - */ - -/** - * 1. Correct color not being inherited. - * Known issue: affects color of disabled elements. - * 2. Correct font properties not being inherited. - * 3. Address margins set differently in Firefox 4+, Safari, and Chrome. - */ - -button, -input, -optgroup, -select, -textarea { - color: inherit; /* 1 */ - font: inherit; /* 2 */ - margin: 0; /* 3 */ -} - -/** - * Address `overflow` set to `hidden` in IE 8/9/10/11. - */ - -button { - overflow: visible; -} - -/** - * Address inconsistent `text-transform` inheritance for `button` and `select`. - * All other form control elements do not inherit `text-transform` values. - * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. - * Correct `select` style inheritance in Firefox. - */ - -button, -select { - text-transform: none; -} - -/** - * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` - * and `video` controls. - * 2. Correct inability to style clickable `input` types in iOS. - * 3. Improve usability and consistency of cursor style between image-type - * `input` and others. - */ - -button, -html input[type="button"], /* 1 */ -input[type="reset"], -input[type="submit"] { - -webkit-appearance: button; /* 2 */ - cursor: pointer; /* 3 */ -} - -/** - * Re-set default cursor for disabled elements. - */ - -button[disabled], -html input[disabled] { - cursor: default; -} - -/** - * Remove inner padding and border in Firefox 4+. - */ - -button::-moz-focus-inner, -input::-moz-focus-inner { - border: 0; - padding: 0; -} - -/** - * Address Firefox 4+ setting `line-height` on `input` using `!important` in - * the UA stylesheet. - */ - -input { - line-height: normal; -} - -/** - * It's recommended that you don't attempt to style these elements. - * Firefox's implementation doesn't respect box-sizing, padding, or width. - * - * 1. Address box sizing set to `content-box` in IE 8/9/10. - * 2. Remove excess padding in IE 8/9/10. - */ - -input[type="checkbox"], -input[type="radio"] { - box-sizing: border-box; /* 1 */ - padding: 0; /* 2 */ -} - -/** - * Fix the cursor style for Chrome's increment/decrement buttons. For certain - * `font-size` values of the `input`, it causes the cursor style of the - * decrement button to change from `default` to `text`. - */ - -input[type="number"]::-webkit-inner-spin-button, -input[type="number"]::-webkit-outer-spin-button { - height: auto; -} - -/** - * 1. Address `appearance` set to `searchfield` in Safari and Chrome. - * 2. Address `box-sizing` set to `border-box` in Safari and Chrome - * (include `-moz` to future-proof). - */ - -input[type="search"] { - -webkit-appearance: textfield; /* 1 */ - -moz-box-sizing: content-box; - -webkit-box-sizing: content-box; /* 2 */ - box-sizing: content-box; -} - -/** - * Remove inner padding and search cancel button in Safari and Chrome on OS X. - * Safari (but not Chrome) clips the cancel button when the search input has - * padding (and `textfield` appearance). - */ - -input[type="search"]::-webkit-search-cancel-button, -input[type="search"]::-webkit-search-decoration { - -webkit-appearance: none; -} - -/** - * Define consistent border, margin, and padding. - */ - -fieldset { - border: 1px solid #c0c0c0; - margin: 0 2px; - padding: 0.35em 0.625em 0.75em; -} - -/** - * 1. Correct `color` not being inherited in IE 8/9/10/11. - * 2. Remove padding so people aren't caught out if they zero out fieldsets. - */ - -legend { - border: 0; /* 1 */ - padding: 0; /* 2 */ -} - -/** - * Remove default vertical scrollbar in IE 8/9/10/11. - */ - -textarea { - overflow: auto; -} - -/** - * Don't inherit the `font-weight` (applied by a rule above). - * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. - */ - -optgroup { - font-weight: bold; -} - -/* Tables - ========================================================================== */ - -/** - * Remove most spacing between table cells. - */ - -table { - border-collapse: collapse; - border-spacing: 0; -} - -td, -th { - padding: 0; -} - -@font-face{font-family:'MuseoSlab500Regular';src:url("../fonts/museo-slab-500.eot");src:url("../fonts/museo-slab-500.eot?#iefix") format('embedded-opentype'),url("../fonts/museo-slab-500.woff") format('woff'),url("../fonts/museo-slab-500.ttf") format('truetype'),url("../fonts/museo-slab-500.svg#MuseoSlab500Regular") format('svg');font-weight:normal;font-style:normal} -@font-face{font-family:'MuseoSans500Regular';src:url("../fonts/museo-sans-500.eot");src:url("../fonts/museo-sans-500.eot?#iefix") format('embedded-opentype'),url("../fonts/museo-sans-500.woff") format('woff'),url("../fonts/museo-sans-500.ttf") format('truetype'),url("../fonts/museo-sans-500.svg#MuseoSans500Regular") format('svg');font-weight:normal;font-style:normal} -@font-face{font-family:'Fontello';src:url("../fonts/fontello.eot?74672344");src:url("../fonts/fontello.eot?74672344#iefix") format('embedded-opentype'),url("../fonts/fontello.woff?74672344") format('woff'),url("../fonts/fontello.ttf?74672344") format('truetype'),url("../fonts/fontello.svg?74672344#fontello") format('svg');font-weight:normal;font-style:normal} - -.icon{vertical-align:middle;font-family:"Fontello";font-style:normal;font-weight:normal;speak:none;display:inline-block;text-decoration:inherit;text-align:center;font-variant:normal;text-transform:none;} -.icon[class^='spin'],.icon[class*=' spin']{-webkit-animation:spin 2s infinite linear;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;-ms-animation:spin 2s infinite linear;animation:spin 2s infinite linear} -@-moz-keyframes spin{0%{-moz-transform:rotate(0)} -100%{-moz-transform:rotate(360deg)} -}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0)} -100%{-webkit-transform:rotate(360deg)} -}@-moz-keyframes spin{0%{-webkit-transform:rotate(0);-moz-transform:rotate(0);-o-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0)} -100%{-webkit-transform:rotate(360deg);-moz-transform:rotate(360deg);-o-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg)} -}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0);-moz-transform:rotate(0);-o-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0)} -100%{-webkit-transform:rotate(360deg);-moz-transform:rotate(360deg);-o-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg)} -}@-o-keyframes spin{0%{-webkit-transform:rotate(0);-moz-transform:rotate(0);-o-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0)} -100%{-webkit-transform:rotate(360deg);-moz-transform:rotate(360deg);-o-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg)} -}@-ms-keyframes spin{0%{-webkit-transform:rotate(0);-moz-transform:rotate(0);-o-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0)} -100%{-webkit-transform:rotate(360deg);-moz-transform:rotate(360deg);-o-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg)} -}@keyframes spin{0%{-webkit-transform:rotate(0);-moz-transform:rotate(0);-o-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0)} -100%{-webkit-transform:rotate(360deg);-moz-transform:rotate(360deg);-o-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg)} -} -#chart{height:300px;position:relative;} -#chart #tooltip{position:absolute;top:0;left:0} -#chart svg path.line{fill:none;stroke-width:1px;clip-path:url("#clip");} -#chart svg path.line.actual{stroke:#64584c;stroke-width:3px} -#chart svg path.line.ideal{stroke:#cacaca;stroke-width:3px} -#chart svg path.line.trendline{stroke:#64584c;stroke-width:1.5px;stroke-dasharray:5,5} -#chart svg line.today{stroke:#cacaca;stroke-width:1px;shape-rendering:crispEdges;stroke-dasharray:5,5} -#chart svg circle{fill:#64584c;stroke:transparent;stroke-width:15px;cursor:pointer} -#chart svg .axis{shape-rendering:crispEdges;} -#chart svg .axis line{stroke:rgba(202,202,202,0.25);shape-rendering:crispEdges} -#chart svg .axis text{font-weight:bold;fill:#cacaca} -#chart svg .axis path{display:none} -.d3-tip{margin-top:-10px;font-size:11px;padding:8px 10px 7px 10px;text-align:center;background:rgba(0,0,0,0.75);color:#fff;-webkit-border-radius:3px;border-radius:3px;} -.d3-tip:after{width:100%;color:rgba(0,0,0,0.8);content:"\25BC";position:absolute} -.d3-tip.n:after{margin:-3px 0 0 0;top:100%;left:0} - -html,body{margin:0;padding:0;height:100%} -body{color:#3e4457;font-family:'MuseoSans500Regular',sans-serif} -#app{position:relative;height:auto !important;min-height:100%} -a{text-decoration:none;color:#aaafbf;cursor:pointer} -h1,h2,h3,p{margin:0} -ul{list-style-type:none;margin:0;padding:0;} -ul li{display:inline-block} -.wrap{width:800px;margin:0 auto} -#notify{position:fixed;top:-68px;z-index:1;width:100%;background:#fcfcfc;color:#aaafbf;border-top:3px solid #aaafbf;border-bottom:1px solid #f3f4f8;} -#notify .close{float:right;font-size:16px;padding:22px;cursor:pointer;} -#notify .close:before{content:"\d7";display:block} -#notify.system{top:0%;left:50%;-webkit-transform:translateX(-50%) translateY(-50%);-moz-transform:translateX(-50%) translateY(-50%);-o-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%);width:500px;} -#notify.system p{padding-top:20px} -#notify.success,#notify.ok,#notify.good{border-top-color:#00b361;color:#00b361} -#notify.warn,#notify.trouble{border-top-color:#ea9712;color:#ea9712} -#notify.alert,#notify.bad,#notify.fucked{border-top-color:#c1041c;color:#c1041c} -#notify .icon,#notify p{display:block} -#notify .icon{font-size:26px;padding:18px;width:38px;float:left} -#notify p{padding:22px 20px 20px 74px;text-align:justify} -#head{background:#c1041c;height:64px;} -#head #icon{font-size:26px;margin:0;padding:10px 0;line-height:44px;height:44px;width:74px;background:#77000e;display:inline-block;color:#c1041c;margin:0;text-align:center} -#head .q{position:relative;display:inline-block;margin:13px 20px 0 20px;vertical-align:top;} -#head .q .icon{position:absolute;color:#c1041c;} -#head .q .icon.search{top:8px;left:12px} -#head .q .icon.down-open{top:8px;right:12px} -#head .q input{background:#77000e;border:0;padding:10px 12px 10px 36px;font-size:14px;-webkit-border-radius:2px;border-radius:2px;color:#fff;width:220px} -#head ul{display:inline-block;} -#head ul li{margin-left:30px} -#head a{color:#e0808d;font-weight:bold;} -#head a.active,#head a:hover{color:#fff} -#head .right{float:right;margin-right:20px;line-height:64px;color:#e0808d;} -#head .right a{-webkit-border-radius:2px;border-radius:2px;background:#ffbb2a;color:#c1041c;padding:11px 20px} -#title{border-bottom:3px solid #f3f4f8;} -#title .title{border-bottom:3px solid #aaafbf;margin:30px 0 -3px 0;display:inline-block;padding-bottom:20px} -#title .sub{font-size:16px;font-weight:bold;margin:0 20px} -#title .description{display:inline-block;font-family:'MuseoSlab500Regular',serif;white-space:nowrap;color:#b1b6c4} -#page{padding-bottom:80px;} -#page #content{padding:20px;margin-top:20px;margin-bottom:40px;} -#page #content #hero{background:url("../img/hires/2.jpg") center;-webkit-background-size:cover;-moz-background-size:cover;background-size:cover;-webkit-border-radius:2px;border-radius:2px;margin-bottom:30px;} -#page #content #hero .content{-webkit-border-radius:2px;border-radius:2px;color:#fff;padding:30px;background:rgba(0,0,0,0.3);-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.2);box-shadow:inset 0 1px 2px rgba(0,0,0,0.2);} -#page #content #hero .content h2{margin-bottom:20px;margin-left:140px} -#page #content #hero .content p{font-family:'MuseoSlab500Regular',serif;font-size:18px;line-height:24px;margin-left:140px;text-align:justify;text-justify:inter-word} -#page #content #hero .content .address{font-size:120px;float:left} -#page #content #hero .content .cta{text-align:center;margin-top:10px;} -#page #content #hero .content .cta a{font-family:'MuseoSlab500Regular',serif;padding:11px 20px;-webkit-border-radius:2px;border-radius:2px;display:inline-block;margin:0 4px;} -#page #content #hero .content .cta a.primary{font-weight:bold;background:#c1041c;color:#fff} -#page #content #hero .content .cta a.secondary{background:#fff;color:#c1041c} -#page #content #add h2{color:#3e4457} -#page #content #add p{font-family:'MuseoSlab500Regular',serif;color:#b1b6c4;margin-top:10px;line-height:20px;text-align:justify;text-justify:inter-word;} -#page #content #add p a{color:#3e4457} -#page #content #add .form{margin-top:20px;} -#page #content #add .form table{width:100%;} -#page #content #add .form table tr td:first-child{width:100%} -#page #content #add .form input{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:10px;width:100%;-webkit-border-radius:2px 0 0 2px;border-radius:2px 0 0 2px;border:1px solid #dde1ed;border-right:0;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.2);box-shadow:inset 0 1px 2px rgba(0,0,0,0.2)} -#page #content #add .form a{margin-left:-2px;font-family:'MuseoSlab500Regular',serif;padding:11px 20px;-webkit-border-radius:0 2px 2px 0;border-radius:0 2px 2px 0;display:inline-block;font-weight:bold;background:#c1041c;color:#fff} -#page #content #projects{border:1px solid #cdcecf;-webkit-border-radius:2px;border-radius:2px;} -#page #content #projects h2{color:#3e4457;display:inline-block} -#page #content #projects .sort{float:right;line-height:30px} -#page #content #projects table{width:100%;} -#page #content #projects table tr td{background:#fcfcfc;padding:20px 30px;border-bottom:1px solid #eaecf2;} -#page #content #projects table tr td .project{color:inherit;} -#page #content #projects table tr td .project .error{cursor:help;color:#c1041c} -#page #content #projects table tr td a.project{font-weight:bold} -#page #content #projects table tr td .milestone .icon{font-size:10px;margin:0} -#page #content #projects table tr td .progress{width:200px;} -#page #content #projects table tr td .progress .percent,#page #content #projects table tr td .progress .due{color:#9399ad;font-size:13px} -#page #content #projects table tr td .progress .percent{float:right} -#page #content #projects table tr td .progress .bar{-webkit-border-radius:4px;border-radius:4px;background:#eaecf2;height:10px;width:100%;} -#page #content #projects table tr td .progress .bar.inner{-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.2);box-shadow:inset 0 1px 2px rgba(0,0,0,0.2)} -#page #content #projects table tr td .progress .bar.red{background:#c1041c} -#page #content #projects table tr td .progress .bar.green{background:#00b361} -#page #content #projects table tr td .progress .due.red{color:#c1041c;font-weight:bold} -#page #content #projects table tr td:first-child{color:#3e4457} -#page #content #projects table tr:nth-child(even) td{background:#fefefe} -#page #content #projects table tr:last-child td{border:0} -#page #content #projects table tr.done td{background:#ebf6f1;} -#page #content #projects table tr.done td .milestone,#page #content #projects table tr.done td .percent,#page #content #projects table tr.done td .due{color:#00b361} -#page #content #projects .header,#page #content #projects .footer{padding:20px 30px} -#page #content #projects .header{-webkit-box-shadow:0 1px 2px rgba(221,225,237,0.5);box-shadow:0 1px 2px rgba(221,225,237,0.5);margin-bottom:2px;border-bottom:1px solid #dde1ed;} -#page #content #projects .header a{font-family:'MuseoSlab500Regular',serif} -#page #content #projects .footer{background:#f9fafb;color:#aaafbf;-webkit-box-shadow:inset 0 1px 2px rgba(221,225,237,0.2);box-shadow:inset 0 1px 2px rgba(221,225,237,0.2);border-top:1px solid #dde1ed;text-align:right;font-family:'MuseoSlab500Regular',serif;} -#page #content #projects .footer .icon{color:#aaafbf} -#footer{position:absolute;width:100%;bottom:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;border-top:1px solid #f3f4f8;text-align:center;padding:30px;font-family:'MuseoSlab500Regular',serif} diff --git a/public/css/app.css b/public/css/app.css deleted file mode 100644 index 0a1d1ca..0000000 --- a/public/css/app.css +++ /dev/null @@ -1,120 +0,0 @@ -@font-face{font-family:'MuseoSlab500Regular';src:url("../fonts/museo-slab-500.eot");src:url("../fonts/museo-slab-500.eot?#iefix") format('embedded-opentype'),url("../fonts/museo-slab-500.woff") format('woff'),url("../fonts/museo-slab-500.ttf") format('truetype'),url("../fonts/museo-slab-500.svg#MuseoSlab500Regular") format('svg');font-weight:normal;font-style:normal} -@font-face{font-family:'MuseoSans500Regular';src:url("../fonts/museo-sans-500.eot");src:url("../fonts/museo-sans-500.eot?#iefix") format('embedded-opentype'),url("../fonts/museo-sans-500.woff") format('woff'),url("../fonts/museo-sans-500.ttf") format('truetype'),url("../fonts/museo-sans-500.svg#MuseoSans500Regular") format('svg');font-weight:normal;font-style:normal} -@font-face{font-family:'Fontello';src:url("../fonts/fontello.eot?74672344");src:url("../fonts/fontello.eot?74672344#iefix") format('embedded-opentype'),url("../fonts/fontello.woff?74672344") format('woff'),url("../fonts/fontello.ttf?74672344") format('truetype'),url("../fonts/fontello.svg?74672344#fontello") format('svg');font-weight:normal;font-style:normal} - -.icon{vertical-align:middle;font-family:"Fontello";font-style:normal;font-weight:normal;speak:none;display:inline-block;text-decoration:inherit;text-align:center;font-variant:normal;text-transform:none;} -.icon[class^='spin'],.icon[class*=' spin']{-webkit-animation:spin 2s infinite linear;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;-ms-animation:spin 2s infinite linear;animation:spin 2s infinite linear} -@-moz-keyframes spin{0%{-moz-transform:rotate(0)} -100%{-moz-transform:rotate(360deg)} -}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0)} -100%{-webkit-transform:rotate(360deg)} -}@-moz-keyframes spin{0%{-webkit-transform:rotate(0);-moz-transform:rotate(0);-o-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0)} -100%{-webkit-transform:rotate(360deg);-moz-transform:rotate(360deg);-o-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg)} -}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0);-moz-transform:rotate(0);-o-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0)} -100%{-webkit-transform:rotate(360deg);-moz-transform:rotate(360deg);-o-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg)} -}@-o-keyframes spin{0%{-webkit-transform:rotate(0);-moz-transform:rotate(0);-o-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0)} -100%{-webkit-transform:rotate(360deg);-moz-transform:rotate(360deg);-o-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg)} -}@-ms-keyframes spin{0%{-webkit-transform:rotate(0);-moz-transform:rotate(0);-o-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0)} -100%{-webkit-transform:rotate(360deg);-moz-transform:rotate(360deg);-o-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg)} -}@keyframes spin{0%{-webkit-transform:rotate(0);-moz-transform:rotate(0);-o-transform:rotate(0);-ms-transform:rotate(0);transform:rotate(0)} -100%{-webkit-transform:rotate(360deg);-moz-transform:rotate(360deg);-o-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg)} -} -#chart{height:300px;position:relative;} -#chart #tooltip{position:absolute;top:0;left:0} -#chart svg path.line{fill:none;stroke-width:1px;clip-path:url("#clip");} -#chart svg path.line.actual{stroke:#64584c;stroke-width:3px} -#chart svg path.line.ideal{stroke:#cacaca;stroke-width:3px} -#chart svg path.line.trendline{stroke:#64584c;stroke-width:1.5px;stroke-dasharray:5,5} -#chart svg line.today{stroke:#cacaca;stroke-width:1px;shape-rendering:crispEdges;stroke-dasharray:5,5} -#chart svg circle{fill:#64584c;stroke:transparent;stroke-width:15px;cursor:pointer} -#chart svg .axis{shape-rendering:crispEdges;} -#chart svg .axis line{stroke:rgba(202,202,202,0.25);shape-rendering:crispEdges} -#chart svg .axis text{font-weight:bold;fill:#cacaca} -#chart svg .axis path{display:none} -.d3-tip{margin-top:-10px;font-size:11px;padding:8px 10px 7px 10px;text-align:center;background:rgba(0,0,0,0.75);color:#fff;-webkit-border-radius:3px;border-radius:3px;} -.d3-tip:after{width:100%;color:rgba(0,0,0,0.8);content:"\25BC";position:absolute} -.d3-tip.n:after{margin:-3px 0 0 0;top:100%;left:0} - -html,body{margin:0;padding:0;height:100%} -body{color:#3e4457;font-family:'MuseoSans500Regular',sans-serif} -#app{position:relative;height:auto !important;min-height:100%} -a{text-decoration:none;color:#aaafbf;cursor:pointer} -h1,h2,h3,p{margin:0} -ul{list-style-type:none;margin:0;padding:0;} -ul li{display:inline-block} -.wrap{width:800px;margin:0 auto} -#notify{position:fixed;top:-68px;z-index:1;width:100%;background:#fcfcfc;color:#aaafbf;border-top:3px solid #aaafbf;border-bottom:1px solid #f3f4f8;} -#notify .close{float:right;font-size:16px;padding:22px;cursor:pointer;} -#notify .close:before{content:"\d7";display:block} -#notify.system{top:0%;left:50%;-webkit-transform:translateX(-50%) translateY(-50%);-moz-transform:translateX(-50%) translateY(-50%);-o-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%);width:500px;} -#notify.system p{padding-top:20px} -#notify.success,#notify.ok,#notify.good{border-top-color:#00b361;color:#00b361} -#notify.warn,#notify.trouble{border-top-color:#ea9712;color:#ea9712} -#notify.alert,#notify.bad,#notify.fucked{border-top-color:#c1041c;color:#c1041c} -#notify .icon,#notify p{display:block} -#notify .icon{font-size:26px;padding:18px;width:38px;float:left} -#notify p{padding:22px 20px 20px 74px;text-align:justify} -#head{background:#c1041c;height:64px;} -#head #icon{font-size:26px;margin:0;padding:10px 0;line-height:44px;height:44px;width:74px;background:#77000e;display:inline-block;color:#c1041c;margin:0;text-align:center} -#head .q{position:relative;display:inline-block;margin:13px 20px 0 20px;vertical-align:top;} -#head .q .icon{position:absolute;color:#c1041c;} -#head .q .icon.search{top:8px;left:12px} -#head .q .icon.down-open{top:8px;right:12px} -#head .q input{background:#77000e;border:0;padding:10px 12px 10px 36px;font-size:14px;-webkit-border-radius:2px;border-radius:2px;color:#fff;width:220px} -#head ul{display:inline-block;} -#head ul li{margin-left:30px} -#head a{color:#e0808d;font-weight:bold;} -#head a.active,#head a:hover{color:#fff} -#head .right{float:right;margin-right:20px;line-height:64px;color:#e0808d;} -#head .right a{-webkit-border-radius:2px;border-radius:2px;background:#ffbb2a;color:#c1041c;padding:11px 20px} -#title{border-bottom:3px solid #f3f4f8;} -#title .title{border-bottom:3px solid #aaafbf;margin:30px 0 -3px 0;display:inline-block;padding-bottom:20px} -#title .sub{font-size:16px;font-weight:bold;margin:0 20px} -#title .description{display:inline-block;font-family:'MuseoSlab500Regular',serif;white-space:nowrap;color:#b1b6c4} -#page{padding-bottom:80px;} -#page #content{padding:20px;margin-top:20px;margin-bottom:40px;} -#page #content #hero{background:url("../img/hires/2.jpg") center;-webkit-background-size:cover;-moz-background-size:cover;background-size:cover;-webkit-border-radius:2px;border-radius:2px;margin-bottom:30px;} -#page #content #hero .content{-webkit-border-radius:2px;border-radius:2px;color:#fff;padding:30px;background:rgba(0,0,0,0.3);-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.2);box-shadow:inset 0 1px 2px rgba(0,0,0,0.2);} -#page #content #hero .content h2{margin-bottom:20px;margin-left:140px} -#page #content #hero .content p{font-family:'MuseoSlab500Regular',serif;font-size:18px;line-height:24px;margin-left:140px;text-align:justify;text-justify:inter-word} -#page #content #hero .content .address{font-size:120px;float:left} -#page #content #hero .content .cta{text-align:center;margin-top:10px;} -#page #content #hero .content .cta a{font-family:'MuseoSlab500Regular',serif;padding:11px 20px;-webkit-border-radius:2px;border-radius:2px;display:inline-block;margin:0 4px;} -#page #content #hero .content .cta a.primary{font-weight:bold;background:#c1041c;color:#fff} -#page #content #hero .content .cta a.secondary{background:#fff;color:#c1041c} -#page #content #add h2{color:#3e4457} -#page #content #add p{font-family:'MuseoSlab500Regular',serif;color:#b1b6c4;margin-top:10px;line-height:20px;text-align:justify;text-justify:inter-word;} -#page #content #add p a{color:#3e4457} -#page #content #add .form{margin-top:20px;} -#page #content #add .form table{width:100%;} -#page #content #add .form table tr td:first-child{width:100%} -#page #content #add .form input{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:10px;width:100%;-webkit-border-radius:2px 0 0 2px;border-radius:2px 0 0 2px;border:1px solid #dde1ed;border-right:0;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.2);box-shadow:inset 0 1px 2px rgba(0,0,0,0.2)} -#page #content #add .form a{margin-left:-2px;font-family:'MuseoSlab500Regular',serif;padding:11px 20px;-webkit-border-radius:0 2px 2px 0;border-radius:0 2px 2px 0;display:inline-block;font-weight:bold;background:#c1041c;color:#fff} -#page #content #projects{border:1px solid #cdcecf;-webkit-border-radius:2px;border-radius:2px;} -#page #content #projects h2{color:#3e4457;display:inline-block} -#page #content #projects .sort{float:right;line-height:30px} -#page #content #projects table{width:100%;} -#page #content #projects table tr td{background:#fcfcfc;padding:20px 30px;border-bottom:1px solid #eaecf2;} -#page #content #projects table tr td .project{color:inherit;} -#page #content #projects table tr td .project .error{cursor:help;color:#c1041c} -#page #content #projects table tr td a.project{font-weight:bold} -#page #content #projects table tr td .milestone .icon{font-size:10px;margin:0} -#page #content #projects table tr td .progress{width:200px;} -#page #content #projects table tr td .progress .percent,#page #content #projects table tr td .progress .due{color:#9399ad;font-size:13px} -#page #content #projects table tr td .progress .percent{float:right} -#page #content #projects table tr td .progress .bar{-webkit-border-radius:4px;border-radius:4px;background:#eaecf2;height:10px;width:100%;} -#page #content #projects table tr td .progress .bar.inner{-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.2);box-shadow:inset 0 1px 2px rgba(0,0,0,0.2)} -#page #content #projects table tr td .progress .bar.red{background:#c1041c} -#page #content #projects table tr td .progress .bar.green{background:#00b361} -#page #content #projects table tr td .progress .due.red{color:#c1041c;font-weight:bold} -#page #content #projects table tr td:first-child{color:#3e4457} -#page #content #projects table tr:nth-child(even) td{background:#fefefe} -#page #content #projects table tr:last-child td{border:0} -#page #content #projects table tr.done td{background:#ebf6f1;} -#page #content #projects table tr.done td .milestone,#page #content #projects table tr.done td .percent,#page #content #projects table tr.done td .due{color:#00b361} -#page #content #projects .header,#page #content #projects .footer{padding:20px 30px} -#page #content #projects .header{-webkit-box-shadow:0 1px 2px rgba(221,225,237,0.5);box-shadow:0 1px 2px rgba(221,225,237,0.5);margin-bottom:2px;border-bottom:1px solid #dde1ed;} -#page #content #projects .header a{font-family:'MuseoSlab500Regular',serif} -#page #content #projects .footer{background:#f9fafb;color:#aaafbf;-webkit-box-shadow:inset 0 1px 2px rgba(221,225,237,0.2);box-shadow:inset 0 1px 2px rgba(221,225,237,0.2);border-top:1px solid #dde1ed;text-align:right;font-family:'MuseoSlab500Regular',serif;} -#page #content #projects .footer .icon{color:#aaafbf} -#footer{position:absolute;width:100%;bottom:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;border-top:1px solid #f3f4f8;text-align:center;padding:30px;font-family:'MuseoSlab500Regular',serif} diff --git a/public/js/app.bundle.js b/public/js/app.bundle.js deleted file mode 100644 index eab6322..0000000 --- a/public/js/app.bundle.js +++ /dev/null @@ -1,41819 +0,0 @@ -(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o= arr.length) { - callback(); - } - } - } - }; - async.forEach = async.each; - - async.eachSeries = function (arr, iterator, callback) { - callback = callback || function () {}; - if (!arr.length) { - return callback(); - } - var completed = 0; - var iterate = function () { - iterator(arr[completed], function (err) { - if (err) { - callback(err); - callback = function () {}; - } - else { - completed += 1; - if (completed >= arr.length) { - callback(); - } - else { - iterate(); - } - } - }); - }; - iterate(); - }; - async.forEachSeries = async.eachSeries; - - async.eachLimit = function (arr, limit, iterator, callback) { - var fn = _eachLimit(limit); - fn.apply(null, [arr, iterator, callback]); - }; - async.forEachLimit = async.eachLimit; - - var _eachLimit = function (limit) { - - return function (arr, iterator, callback) { - callback = callback || function () {}; - if (!arr.length || limit <= 0) { - return callback(); - } - var completed = 0; - var started = 0; - var running = 0; - - (function replenish () { - if (completed >= arr.length) { - return callback(); - } - - while (running < limit && started < arr.length) { - started += 1; - running += 1; - iterator(arr[started - 1], function (err) { - if (err) { - callback(err); - callback = function () {}; - } - else { - completed += 1; - running -= 1; - if (completed >= arr.length) { - callback(); - } - else { - replenish(); - } - } - }); - } - })(); - }; - }; - - - var doParallel = function (fn) { - return function () { - var args = Array.prototype.slice.call(arguments); - return fn.apply(null, [async.each].concat(args)); - }; - }; - var doParallelLimit = function(limit, fn) { - return function () { - var args = Array.prototype.slice.call(arguments); - return fn.apply(null, [_eachLimit(limit)].concat(args)); - }; - }; - var doSeries = function (fn) { - return function () { - var args = Array.prototype.slice.call(arguments); - return fn.apply(null, [async.eachSeries].concat(args)); - }; - }; - - - var _asyncMap = function (eachfn, arr, iterator, callback) { - arr = _map(arr, function (x, i) { - return {index: i, value: x}; - }); - if (!callback) { - eachfn(arr, function (x, callback) { - iterator(x.value, function (err) { - callback(err); - }); - }); - } else { - var results = []; - eachfn(arr, function (x, callback) { - iterator(x.value, function (err, v) { - results[x.index] = v; - callback(err); - }); - }, function (err) { - callback(err, results); - }); - } - }; - async.map = doParallel(_asyncMap); - async.mapSeries = doSeries(_asyncMap); - async.mapLimit = function (arr, limit, iterator, callback) { - return _mapLimit(limit)(arr, iterator, callback); - }; - - var _mapLimit = function(limit) { - return doParallelLimit(limit, _asyncMap); - }; - - // reduce only has a series version, as doing reduce in parallel won't - // work in many situations. - async.reduce = function (arr, memo, iterator, callback) { - async.eachSeries(arr, function (x, callback) { - iterator(memo, x, function (err, v) { - memo = v; - callback(err); - }); - }, function (err) { - callback(err, memo); - }); - }; - // inject alias - async.inject = async.reduce; - // foldl alias - async.foldl = async.reduce; - - async.reduceRight = function (arr, memo, iterator, callback) { - var reversed = _map(arr, function (x) { - return x; - }).reverse(); - async.reduce(reversed, memo, iterator, callback); - }; - // foldr alias - async.foldr = async.reduceRight; - - var _filter = function (eachfn, arr, iterator, callback) { - var results = []; - arr = _map(arr, function (x, i) { - return {index: i, value: x}; - }); - eachfn(arr, function (x, callback) { - iterator(x.value, function (v) { - if (v) { - results.push(x); - } - callback(); - }); - }, function (err) { - callback(_map(results.sort(function (a, b) { - return a.index - b.index; - }), function (x) { - return x.value; - })); - }); - }; - async.filter = doParallel(_filter); - async.filterSeries = doSeries(_filter); - // select alias - async.select = async.filter; - async.selectSeries = async.filterSeries; - - var _reject = function (eachfn, arr, iterator, callback) { - var results = []; - arr = _map(arr, function (x, i) { - return {index: i, value: x}; - }); - eachfn(arr, function (x, callback) { - iterator(x.value, function (v) { - if (!v) { - results.push(x); - } - callback(); - }); - }, function (err) { - callback(_map(results.sort(function (a, b) { - return a.index - b.index; - }), function (x) { - return x.value; - })); - }); - }; - async.reject = doParallel(_reject); - async.rejectSeries = doSeries(_reject); - - var _detect = function (eachfn, arr, iterator, main_callback) { - eachfn(arr, function (x, callback) { - iterator(x, function (result) { - if (result) { - main_callback(x); - main_callback = function () {}; - } - else { - callback(); - } - }); - }, function (err) { - main_callback(); - }); - }; - async.detect = doParallel(_detect); - async.detectSeries = doSeries(_detect); - - async.some = function (arr, iterator, main_callback) { - async.each(arr, function (x, callback) { - iterator(x, function (v) { - if (v) { - main_callback(true); - main_callback = function () {}; - } - callback(); - }); - }, function (err) { - main_callback(false); - }); - }; - // any alias - async.any = async.some; - - async.every = function (arr, iterator, main_callback) { - async.each(arr, function (x, callback) { - iterator(x, function (v) { - if (!v) { - main_callback(false); - main_callback = function () {}; - } - callback(); - }); - }, function (err) { - main_callback(true); - }); - }; - // all alias - async.all = async.every; - - async.sortBy = function (arr, iterator, callback) { - async.map(arr, function (x, callback) { - iterator(x, function (err, criteria) { - if (err) { - callback(err); - } - else { - callback(null, {value: x, criteria: criteria}); - } - }); - }, function (err, results) { - if (err) { - return callback(err); - } - else { - var fn = function (left, right) { - var a = left.criteria, b = right.criteria; - return a < b ? -1 : a > b ? 1 : 0; - }; - callback(null, _map(results.sort(fn), function (x) { - return x.value; - })); - } - }); - }; - - async.auto = function (tasks, callback) { - callback = callback || function () {}; - var keys = _keys(tasks); - var remainingTasks = keys.length - if (!remainingTasks) { - return callback(); - } - - var results = {}; - - var listeners = []; - var addListener = function (fn) { - listeners.unshift(fn); - }; - var removeListener = function (fn) { - for (var i = 0; i < listeners.length; i += 1) { - if (listeners[i] === fn) { - listeners.splice(i, 1); - return; - } - } - }; - var taskComplete = function () { - remainingTasks-- - _each(listeners.slice(0), function (fn) { - fn(); - }); - }; - - addListener(function () { - if (!remainingTasks) { - var theCallback = callback; - // prevent final callback from calling itself if it errors - callback = function () {}; - - theCallback(null, results); - } - }); - - _each(keys, function (k) { - var task = _isArray(tasks[k]) ? tasks[k]: [tasks[k]]; - var taskCallback = function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - if (err) { - var safeResults = {}; - _each(_keys(results), function(rkey) { - safeResults[rkey] = results[rkey]; - }); - safeResults[k] = args; - callback(err, safeResults); - // stop subsequent errors hitting callback multiple times - callback = function () {}; - } - else { - results[k] = args; - async.setImmediate(taskComplete); - } - }; - var requires = task.slice(0, Math.abs(task.length - 1)) || []; - var ready = function () { - return _reduce(requires, function (a, x) { - return (a && results.hasOwnProperty(x)); - }, true) && !results.hasOwnProperty(k); - }; - if (ready()) { - task[task.length - 1](taskCallback, results); - } - else { - var listener = function () { - if (ready()) { - removeListener(listener); - task[task.length - 1](taskCallback, results); - } - }; - addListener(listener); - } - }); - }; - - async.retry = function(times, task, callback) { - var DEFAULT_TIMES = 5; - var attempts = []; - // Use defaults if times not passed - if (typeof times === 'function') { - callback = task; - task = times; - times = DEFAULT_TIMES; - } - // Make sure times is a number - times = parseInt(times, 10) || DEFAULT_TIMES; - var wrappedTask = function(wrappedCallback, wrappedResults) { - var retryAttempt = function(task, finalAttempt) { - return function(seriesCallback) { - task(function(err, result){ - seriesCallback(!err || finalAttempt, {err: err, result: result}); - }, wrappedResults); - }; - }; - while (times) { - attempts.push(retryAttempt(task, !(times-=1))); - } - async.series(attempts, function(done, data){ - data = data[data.length - 1]; - (wrappedCallback || callback)(data.err, data.result); - }); - } - // If a callback is passed, run this as a controll flow - return callback ? wrappedTask() : wrappedTask - }; - - async.waterfall = function (tasks, callback) { - callback = callback || function () {}; - if (!_isArray(tasks)) { - var err = new Error('First argument to waterfall must be an array of functions'); - return callback(err); - } - if (!tasks.length) { - return callback(); - } - var wrapIterator = function (iterator) { - return function (err) { - if (err) { - callback.apply(null, arguments); - callback = function () {}; - } - else { - var args = Array.prototype.slice.call(arguments, 1); - var next = iterator.next(); - if (next) { - args.push(wrapIterator(next)); - } - else { - args.push(callback); - } - async.setImmediate(function () { - iterator.apply(null, args); - }); - } - }; - }; - wrapIterator(async.iterator(tasks))(); - }; - - var _parallel = function(eachfn, tasks, callback) { - callback = callback || function () {}; - if (_isArray(tasks)) { - eachfn.map(tasks, function (fn, callback) { - if (fn) { - fn(function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - callback.call(null, err, args); - }); - } - }, callback); - } - else { - var results = {}; - eachfn.each(_keys(tasks), function (k, callback) { - tasks[k](function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - results[k] = args; - callback(err); - }); - }, function (err) { - callback(err, results); - }); - } - }; - - async.parallel = function (tasks, callback) { - _parallel({ map: async.map, each: async.each }, tasks, callback); - }; - - async.parallelLimit = function(tasks, limit, callback) { - _parallel({ map: _mapLimit(limit), each: _eachLimit(limit) }, tasks, callback); - }; - - async.series = function (tasks, callback) { - callback = callback || function () {}; - if (_isArray(tasks)) { - async.mapSeries(tasks, function (fn, callback) { - if (fn) { - fn(function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - callback.call(null, err, args); - }); - } - }, callback); - } - else { - var results = {}; - async.eachSeries(_keys(tasks), function (k, callback) { - tasks[k](function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - results[k] = args; - callback(err); - }); - }, function (err) { - callback(err, results); - }); - } - }; - - async.iterator = function (tasks) { - var makeCallback = function (index) { - var fn = function () { - if (tasks.length) { - tasks[index].apply(null, arguments); - } - return fn.next(); - }; - fn.next = function () { - return (index < tasks.length - 1) ? makeCallback(index + 1): null; - }; - return fn; - }; - return makeCallback(0); - }; - - async.apply = function (fn) { - var args = Array.prototype.slice.call(arguments, 1); - return function () { - return fn.apply( - null, args.concat(Array.prototype.slice.call(arguments)) - ); - }; - }; - - var _concat = function (eachfn, arr, fn, callback) { - var r = []; - eachfn(arr, function (x, cb) { - fn(x, function (err, y) { - r = r.concat(y || []); - cb(err); - }); - }, function (err) { - callback(err, r); - }); - }; - async.concat = doParallel(_concat); - async.concatSeries = doSeries(_concat); - - async.whilst = function (test, iterator, callback) { - if (test()) { - iterator(function (err) { - if (err) { - return callback(err); - } - async.whilst(test, iterator, callback); - }); - } - else { - callback(); - } - }; - - async.doWhilst = function (iterator, test, callback) { - iterator(function (err) { - if (err) { - return callback(err); - } - var args = Array.prototype.slice.call(arguments, 1); - if (test.apply(null, args)) { - async.doWhilst(iterator, test, callback); - } - else { - callback(); - } - }); - }; - - async.until = function (test, iterator, callback) { - if (!test()) { - iterator(function (err) { - if (err) { - return callback(err); - } - async.until(test, iterator, callback); - }); - } - else { - callback(); - } - }; - - async.doUntil = function (iterator, test, callback) { - iterator(function (err) { - if (err) { - return callback(err); - } - var args = Array.prototype.slice.call(arguments, 1); - if (!test.apply(null, args)) { - async.doUntil(iterator, test, callback); - } - else { - callback(); - } - }); - }; - - async.queue = function (worker, concurrency) { - if (concurrency === undefined) { - concurrency = 1; - } - function _insert(q, data, pos, callback) { - if (!q.started){ - q.started = true; - } - if (!_isArray(data)) { - data = [data]; - } - if(data.length == 0) { - // call drain immediately if there are no tasks - return async.setImmediate(function() { - if (q.drain) { - q.drain(); - } - }); - } - _each(data, function(task) { - var item = { - data: task, - callback: typeof callback === 'function' ? callback : null - }; - - if (pos) { - q.tasks.unshift(item); - } else { - q.tasks.push(item); - } - - if (q.saturated && q.tasks.length === q.concurrency) { - q.saturated(); - } - async.setImmediate(q.process); - }); - } - - var workers = 0; - var q = { - tasks: [], - concurrency: concurrency, - saturated: null, - empty: null, - drain: null, - started: false, - paused: false, - push: function (data, callback) { - _insert(q, data, false, callback); - }, - kill: function () { - q.drain = null; - q.tasks = []; - }, - unshift: function (data, callback) { - _insert(q, data, true, callback); - }, - process: function () { - if (!q.paused && workers < q.concurrency && q.tasks.length) { - var task = q.tasks.shift(); - if (q.empty && q.tasks.length === 0) { - q.empty(); - } - workers += 1; - var next = function () { - workers -= 1; - if (task.callback) { - task.callback.apply(task, arguments); - } - if (q.drain && q.tasks.length + workers === 0) { - q.drain(); - } - q.process(); - }; - var cb = only_once(next); - worker(task.data, cb); - } - }, - length: function () { - return q.tasks.length; - }, - running: function () { - return workers; - }, - idle: function() { - return q.tasks.length + workers === 0; - }, - pause: function () { - if (q.paused === true) { return; } - q.paused = true; - q.process(); - }, - resume: function () { - if (q.paused === false) { return; } - q.paused = false; - q.process(); - } - }; - return q; - }; - - async.priorityQueue = function (worker, concurrency) { - - function _compareTasks(a, b){ - return a.priority - b.priority; - }; - - function _binarySearch(sequence, item, compare) { - var beg = -1, - end = sequence.length - 1; - while (beg < end) { - var mid = beg + ((end - beg + 1) >>> 1); - if (compare(item, sequence[mid]) >= 0) { - beg = mid; - } else { - end = mid - 1; - } - } - return beg; - } - - function _insert(q, data, priority, callback) { - if (!q.started){ - q.started = true; - } - if (!_isArray(data)) { - data = [data]; - } - if(data.length == 0) { - // call drain immediately if there are no tasks - return async.setImmediate(function() { - if (q.drain) { - q.drain(); - } - }); - } - _each(data, function(task) { - var item = { - data: task, - priority: priority, - callback: typeof callback === 'function' ? callback : null - }; - - q.tasks.splice(_binarySearch(q.tasks, item, _compareTasks) + 1, 0, item); - - if (q.saturated && q.tasks.length === q.concurrency) { - q.saturated(); - } - async.setImmediate(q.process); - }); - } - - // Start with a normal queue - var q = async.queue(worker, concurrency); - - // Override push to accept second parameter representing priority - q.push = function (data, priority, callback) { - _insert(q, data, priority, callback); - }; - - // Remove unshift function - delete q.unshift; - - return q; - }; - - async.cargo = function (worker, payload) { - var working = false, - tasks = []; - - var cargo = { - tasks: tasks, - payload: payload, - saturated: null, - empty: null, - drain: null, - drained: true, - push: function (data, callback) { - if (!_isArray(data)) { - data = [data]; - } - _each(data, function(task) { - tasks.push({ - data: task, - callback: typeof callback === 'function' ? callback : null - }); - cargo.drained = false; - if (cargo.saturated && tasks.length === payload) { - cargo.saturated(); - } - }); - async.setImmediate(cargo.process); - }, - process: function process() { - if (working) return; - if (tasks.length === 0) { - if(cargo.drain && !cargo.drained) cargo.drain(); - cargo.drained = true; - return; - } - - var ts = typeof payload === 'number' - ? tasks.splice(0, payload) - : tasks.splice(0, tasks.length); - - var ds = _map(ts, function (task) { - return task.data; - }); - - if(cargo.empty) cargo.empty(); - working = true; - worker(ds, function () { - working = false; - - var args = arguments; - _each(ts, function (data) { - if (data.callback) { - data.callback.apply(null, args); - } - }); - - process(); - }); - }, - length: function () { - return tasks.length; - }, - running: function () { - return working; - } - }; - return cargo; - }; - - var _console_fn = function (name) { - return function (fn) { - var args = Array.prototype.slice.call(arguments, 1); - fn.apply(null, args.concat([function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (typeof console !== 'undefined') { - if (err) { - if (console.error) { - console.error(err); - } - } - else if (console[name]) { - _each(args, function (x) { - console[name](x); - }); - } - } - }])); - }; - }; - async.log = _console_fn('log'); - async.dir = _console_fn('dir'); - /*async.info = _console_fn('info'); - async.warn = _console_fn('warn'); - async.error = _console_fn('error');*/ - - async.memoize = function (fn, hasher) { - var memo = {}; - var queues = {}; - hasher = hasher || function (x) { - return x; - }; - var memoized = function () { - var args = Array.prototype.slice.call(arguments); - var callback = args.pop(); - var key = hasher.apply(null, args); - if (key in memo) { - async.nextTick(function () { - callback.apply(null, memo[key]); - }); - } - else if (key in queues) { - queues[key].push(callback); - } - else { - queues[key] = [callback]; - fn.apply(null, args.concat([function () { - memo[key] = arguments; - var q = queues[key]; - delete queues[key]; - for (var i = 0, l = q.length; i < l; i++) { - q[i].apply(null, arguments); - } - }])); - } - }; - memoized.memo = memo; - memoized.unmemoized = fn; - return memoized; - }; - - async.unmemoize = function (fn) { - return function () { - return (fn.unmemoized || fn).apply(null, arguments); - }; - }; - - async.times = function (count, iterator, callback) { - var counter = []; - for (var i = 0; i < count; i++) { - counter.push(i); - } - return async.map(counter, iterator, callback); - }; - - async.timesSeries = function (count, iterator, callback) { - var counter = []; - for (var i = 0; i < count; i++) { - counter.push(i); - } - return async.mapSeries(counter, iterator, callback); - }; - - async.seq = function (/* functions... */) { - var fns = arguments; - return function () { - var that = this; - var args = Array.prototype.slice.call(arguments); - var callback = args.pop(); - async.reduce(fns, args, function (newargs, fn, cb) { - fn.apply(that, newargs.concat([function () { - var err = arguments[0]; - var nextargs = Array.prototype.slice.call(arguments, 1); - cb(err, nextargs); - }])) - }, - function (err, results) { - callback.apply(that, [err].concat(results)); - }); - }; - }; - - async.compose = function (/* functions... */) { - return async.seq.apply(null, Array.prototype.reverse.call(arguments)); - }; - - var _applyEach = function (eachfn, fns /*args...*/) { - var go = function () { - var that = this; - var args = Array.prototype.slice.call(arguments); - var callback = args.pop(); - return eachfn(fns, function (fn, cb) { - fn.apply(that, args.concat([cb])); - }, - callback); - }; - if (arguments.length > 2) { - var args = Array.prototype.slice.call(arguments, 2); - return go.apply(this, args); - } - else { - return go; - } - }; - async.applyEach = doParallel(_applyEach); - async.applyEachSeries = doSeries(_applyEach); - - async.forever = function (fn, callback) { - function next(err) { - if (err) { - if (callback) { - return callback(err); - } - throw err; - } - fn(next); - } - next(); - }; - - // Node.js - if (typeof module !== 'undefined' && module.exports) { - module.exports = async; - } - // AMD / RequireJS - else if (typeof define !== 'undefined' && define.amd) { - define([], function () { - return async; - }); - } - // included directly via - - - Or, if you're using a module loader, require this module: - - // requiring the plugin will 'activate' it - no need to use - // the return value - require( 'ractive-transitions-fade' ); - - Add a fade transition like so: - -
this will fade in
- -*/ - -(function ( global, factory ) { - - 'use strict'; - - // Common JS (i.e. browserify) environment - if ( typeof module !== 'undefined' && module.exports && typeof require === 'function' ) { - factory( require( 'ractive' ) ); - } - - // AMD? - else if ( typeof define === 'function' && define.amd ) { - define([ 'ractive' ], factory ); - } - - // browser global - else if ( global.Ractive ) { - factory( global.Ractive ); - } - - else { - throw new Error( 'Could not find Ractive! It must be loaded before the ractive-transitions-fade plugin' ); - } - -}( typeof window !== 'undefined' ? window : this, function ( Ractive ) { - - 'use strict'; - - var fade, defaults; - - defaults = { - delay: 0, - duration: 300, - easing: 'linear' - }; - - fade = function ( t, params ) { - var targetOpacity; - - params = t.processParams( params, defaults ); - - if ( t.isIntro ) { - targetOpacity = t.getStyle( 'opacity' ); - t.setStyle( 'opacity', 0 ); - } else { - targetOpacity = 0; - } - - t.animateStyle( 'opacity', targetOpacity, params ).then( t.complete ); - }; - - Ractive.transitions.fade = fade; - -})); - -},{"ractive":"/home/radek/dev/burnchart.io/node_modules/ractive/ractive.js"}],"/home/radek/dev/burnchart.io/node_modules/ractive/ractive.js":[function(require,module,exports){ -/* - ractive.js v0.6.1 - 2014-10-25 - commit 3a576eb3 - - http://ractivejs.org - http://twitter.com/RactiveJS - - Released under the MIT License. -*/ - -( function( global ) { - - 'use strict'; - - var noConflict = global.Ractive; - - /* config/defaults/options.js */ - var options = function() { - - var defaultOptions = { - // render placement: - el: void 0, - append: false, - // template: - template: { - v: 1, - t: [] - }, - yield: null, - // parse: - preserveWhitespace: false, - sanitize: false, - stripComments: true, - // data & binding: - data: {}, - computed: {}, - magic: false, - modifyArrays: true, - adapt: [], - isolated: false, - twoway: true, - lazy: false, - // transitions: - noIntro: false, - transitionsEnabled: true, - complete: void 0, - // css: - noCssTransform: false, - // debug: - debug: false - }; - return defaultOptions; - }(); - - /* config/defaults/easing.js */ - var easing = { - linear: function( pos ) { - return pos; - }, - easeIn: function( pos ) { - return Math.pow( pos, 3 ); - }, - easeOut: function( pos ) { - return Math.pow( pos - 1, 3 ) + 1; - }, - easeInOut: function( pos ) { - if ( ( pos /= 0.5 ) < 1 ) { - return 0.5 * Math.pow( pos, 3 ); - } - return 0.5 * ( Math.pow( pos - 2, 3 ) + 2 ); - } - }; - - /* circular.js */ - var circular = []; - - /* utils/hasOwnProperty.js */ - var hasOwn = Object.prototype.hasOwnProperty; - - /* utils/isArray.js */ - var isArray = function() { - - var toString = Object.prototype.toString; - // thanks, http://perfectionkills.com/instanceof-considered-harmful-or-how-to-write-a-robust-isarray/ - return function( thing ) { - return toString.call( thing ) === '[object Array]'; - }; - }(); - - /* utils/isObject.js */ - var isObject = function() { - - var toString = Object.prototype.toString; - return function( thing ) { - return thing && toString.call( thing ) === '[object Object]'; - }; - }(); - - /* utils/isNumeric.js */ - var isNumeric = function( thing ) { - return !isNaN( parseFloat( thing ) ) && isFinite( thing ); - }; - - /* config/defaults/interpolators.js */ - var interpolators = function( circular, hasOwnProperty, isArray, isObject, isNumeric ) { - - var interpolators, interpolate, cssLengthPattern; - circular.push( function() { - interpolate = circular.interpolate; - } ); - cssLengthPattern = /^([+-]?[0-9]+\.?(?:[0-9]+)?)(px|em|ex|%|in|cm|mm|pt|pc)$/; - interpolators = { - number: function( from, to ) { - var delta; - if ( !isNumeric( from ) || !isNumeric( to ) ) { - return null; - } - from = +from; - to = +to; - delta = to - from; - if ( !delta ) { - return function() { - return from; - }; - } - return function( t ) { - return from + t * delta; - }; - }, - array: function( from, to ) { - var intermediate, interpolators, len, i; - if ( !isArray( from ) || !isArray( to ) ) { - return null; - } - intermediate = []; - interpolators = []; - i = len = Math.min( from.length, to.length ); - while ( i-- ) { - interpolators[ i ] = interpolate( from[ i ], to[ i ] ); - } - // surplus values - don't interpolate, but don't exclude them either - for ( i = len; i < from.length; i += 1 ) { - intermediate[ i ] = from[ i ]; - } - for ( i = len; i < to.length; i += 1 ) { - intermediate[ i ] = to[ i ]; - } - return function( t ) { - var i = len; - while ( i-- ) { - intermediate[ i ] = interpolators[ i ]( t ); - } - return intermediate; - }; - }, - object: function( from, to ) { - var properties, len, interpolators, intermediate, prop; - if ( !isObject( from ) || !isObject( to ) ) { - return null; - } - properties = []; - intermediate = {}; - interpolators = {}; - for ( prop in from ) { - if ( hasOwnProperty.call( from, prop ) ) { - if ( hasOwnProperty.call( to, prop ) ) { - properties.push( prop ); - interpolators[ prop ] = interpolate( from[ prop ], to[ prop ] ); - } else { - intermediate[ prop ] = from[ prop ]; - } - } - } - for ( prop in to ) { - if ( hasOwnProperty.call( to, prop ) && !hasOwnProperty.call( from, prop ) ) { - intermediate[ prop ] = to[ prop ]; - } - } - len = properties.length; - return function( t ) { - var i = len, - prop; - while ( i-- ) { - prop = properties[ i ]; - intermediate[ prop ] = interpolators[ prop ]( t ); - } - return intermediate; - }; - } - }; - return interpolators; - }( circular, hasOwn, isArray, isObject, isNumeric ); - - /* config/svg.js */ - var svg = function() { - - var svg; - if ( typeof document === 'undefined' ) { - svg = false; - } else { - svg = document && document.implementation.hasFeature( 'http://www.w3.org/TR/SVG11/feature#BasicStructure', '1.1' ); - } - return svg; - }(); - - /* utils/warn.js */ - var warn = function() { - - /* global console */ - var warn, warned = {}; - if ( typeof console !== 'undefined' && typeof console.warn === 'function' && typeof console.warn.apply === 'function' ) { - warn = function( message, allowDuplicates ) { - if ( !allowDuplicates ) { - if ( warned[ message ] ) { - return; - } - warned[ message ] = true; - } - console.warn( '%cRactive.js: %c' + message, 'color: rgb(114, 157, 52);', 'color: rgb(85, 85, 85);' ); - }; - } else { - warn = function() {}; - } - return warn; - }(); - - /* config/errors.js */ - var errors = { - missingParser: 'Missing Ractive.parse - cannot parse template. Either preparse or use the version that includes the parser', - mergeComparisonFail: 'Merge operation: comparison failed. Falling back to identity checking', - noComponentEventArguments: 'Components currently only support simple events - you cannot include arguments. Sorry!', - noTemplateForPartial: 'Could not find template for partial "{name}"', - noNestedPartials: 'Partials ({{>{name}}}) cannot contain nested inline partials', - evaluationError: 'Error evaluating "{uniqueString}": {err}', - badArguments: 'Bad arguments "{arguments}". I\'m not allowed to argue unless you\'ve paid.', - failedComputation: 'Failed to compute "{key}": {err}', - missingPlugin: 'Missing "{name}" {plugin} plugin. You may need to download a {plugin} via http://docs.ractivejs.org/latest/plugins#{plugin}s', - badRadioInputBinding: 'A radio input can have two-way binding on its name attribute, or its checked attribute - not both', - noRegistryFunctionReturn: 'A function was specified for "{name}" {registry}, but no {registry} was returned', - defaultElSpecified: 'The <{name}/> component has a default `el` property; it has been disregarded', - noElementProxyEventWildcards: 'Only component proxy-events may contain "*" wildcards, <{element} on-{event}/> is not valid.', - methodDeprecated: 'The method "{deprecated}" has been deprecated in favor of "{replacement}" and will likely be removed in a future release. See http://docs.ractivejs.org/latest/migrating for more information.' - }; - - /* utils/log.js */ - var log = function( consolewarn, errors ) { - - var log = { - warn: function( options, passthru ) { - if ( !options.debug && !passthru ) { - return; - } - this.warnAlways( options ); - }, - warnAlways: function( options ) { - this.logger( getMessage( options ), options.allowDuplicates ); - }, - error: function( options ) { - this.errorOnly( options ); - if ( !options.debug ) { - this.warn( options, true ); - } - }, - errorOnly: function( options ) { - if ( options.debug ) { - this.critical( options ); - } - }, - critical: function( options ) { - var err = options.err || new Error( getMessage( options ) ); - this.thrower( err ); - }, - logger: consolewarn, - thrower: function( err ) { - throw err; - } - }; - - function getMessage( options ) { - var message = errors[ options.message ] || options.message || ''; - return interpolate( message, options.args ); - } - // simple interpolation. probably quicker (and better) out there, - // but log is not in golden path of execution, only exceptions - function interpolate( message, args ) { - return message.replace( /{([^{}]*)}/g, function( a, b ) { - return args[ b ]; - } ); - } - return log; - }( warn, errors ); - - /* Ractive/prototype/shared/hooks/Hook.js */ - var Ractive$shared_hooks_Hook = function( log ) { - - var deprecations = { - construct: { - deprecated: 'beforeInit', - replacement: 'onconstruct' - }, - render: { - deprecated: 'init', - message: 'The "init" method has been deprecated ' + 'and will likely be removed in a future release. ' + 'You can either use the "oninit" method which will fire ' + 'only once prior to, and regardless of, any eventual ractive ' + 'instance being rendered, or if you need to access the ' + 'rendered DOM, use "onrender" instead. ' + 'See http://docs.ractivejs.org/latest/migrating for more information.' - }, - complete: { - deprecated: 'complete', - replacement: 'oncomplete' - } - }; - - function Hook( event ) { - this.event = event; - this.method = 'on' + event; - this.deprecate = deprecations[ event ]; - } - Hook.prototype.fire = function( ractive, arg ) { - function call( method ) { - if ( ractive[ method ] ) { - arg ? ractive[ method ]( arg ) : ractive[ method ](); - return true; - } - } - call( this.method ); - if ( !ractive[ this.method ] && this.deprecate && call( this.deprecate.deprecated ) ) { - log.warnAlways( { - debug: ractive.debug, - message: this.deprecate.message || 'methodDeprecated', - args: this.deprecate - } ); - } - arg ? ractive.fire( this.event, arg ) : ractive.fire( this.event ); - }; - return Hook; - }( log ); - - /* utils/removeFromArray.js */ - var removeFromArray = function( array, member ) { - var index = array.indexOf( member ); - if ( index !== -1 ) { - array.splice( index, 1 ); - } - }; - - /* utils/Promise.js */ - var Promise = function() { - - var __export; - var _Promise, PENDING = {}, - FULFILLED = {}, - REJECTED = {}; - if ( typeof Promise === 'function' ) { - // use native Promise - _Promise = Promise; - } else { - _Promise = function( callback ) { - var fulfilledHandlers = [], - rejectedHandlers = [], - state = PENDING, - result, dispatchHandlers, makeResolver, fulfil, reject, promise; - makeResolver = function( newState ) { - return function( value ) { - if ( state !== PENDING ) { - return; - } - result = value; - state = newState; - dispatchHandlers = makeDispatcher( state === FULFILLED ? fulfilledHandlers : rejectedHandlers, result ); - // dispatch onFulfilled and onRejected handlers asynchronously - wait( dispatchHandlers ); - }; - }; - fulfil = makeResolver( FULFILLED ); - reject = makeResolver( REJECTED ); - try { - callback( fulfil, reject ); - } catch ( err ) { - reject( err ); - } - promise = { - // `then()` returns a Promise - 2.2.7 - then: function( onFulfilled, onRejected ) { - var promise2 = new _Promise( function( fulfil, reject ) { - var processResolutionHandler = function( handler, handlers, forward ) { - // 2.2.1.1 - if ( typeof handler === 'function' ) { - handlers.push( function( p1result ) { - var x; - try { - x = handler( p1result ); - resolve( promise2, x, fulfil, reject ); - } catch ( err ) { - reject( err ); - } - } ); - } else { - // Forward the result of promise1 to promise2, if resolution handlers - // are not given - handlers.push( forward ); - } - }; - // 2.2 - processResolutionHandler( onFulfilled, fulfilledHandlers, fulfil ); - processResolutionHandler( onRejected, rejectedHandlers, reject ); - if ( state !== PENDING ) { - // If the promise has resolved already, dispatch the appropriate handlers asynchronously - wait( dispatchHandlers ); - } - } ); - return promise2; - } - }; - promise[ 'catch' ] = function( onRejected ) { - return this.then( null, onRejected ); - }; - return promise; - }; - _Promise.all = function( promises ) { - return new _Promise( function( fulfil, reject ) { - var result = [], - pending, i, processPromise; - if ( !promises.length ) { - fulfil( result ); - return; - } - processPromise = function( i ) { - promises[ i ].then( function( value ) { - result[ i ] = value; - if ( !--pending ) { - fulfil( result ); - } - }, reject ); - }; - pending = i = promises.length; - while ( i-- ) { - processPromise( i ); - } - } ); - }; - _Promise.resolve = function( value ) { - return new _Promise( function( fulfil ) { - fulfil( value ); - } ); - }; - _Promise.reject = function( reason ) { - return new _Promise( function( fulfil, reject ) { - reject( reason ); - } ); - }; - } - __export = _Promise; - // TODO use MutationObservers or something to simulate setImmediate - function wait( callback ) { - setTimeout( callback, 0 ); - } - - function makeDispatcher( handlers, result ) { - return function() { - var handler; - while ( handler = handlers.shift() ) { - handler( result ); - } - }; - } - - function resolve( promise, x, fulfil, reject ) { - // Promise Resolution Procedure - var then; - // 2.3.1 - if ( x === promise ) { - throw new TypeError( 'A promise\'s fulfillment handler cannot return the same promise' ); - } - // 2.3.2 - if ( x instanceof _Promise ) { - x.then( fulfil, reject ); - } else if ( x && ( typeof x === 'object' || typeof x === 'function' ) ) { - try { - then = x.then; - } catch ( e ) { - reject( e ); - // 2.3.3.2 - return; - } - // 2.3.3.3 - if ( typeof then === 'function' ) { - var called, resolvePromise, rejectPromise; - resolvePromise = function( y ) { - if ( called ) { - return; - } - called = true; - resolve( promise, y, fulfil, reject ); - }; - rejectPromise = function( r ) { - if ( called ) { - return; - } - called = true; - reject( r ); - }; - try { - then.call( x, resolvePromise, rejectPromise ); - } catch ( e ) { - if ( !called ) { - // 2.3.3.3.4.1 - reject( e ); - // 2.3.3.3.4.2 - called = true; - return; - } - } - } else { - fulfil( x ); - } - } else { - fulfil( x ); - } - } - return __export; - }(); - - /* utils/normaliseRef.js */ - var normaliseRef = function() { - - var regex = /\[\s*(\*|[0-9]|[1-9][0-9]+)\s*\]/g; - return function normaliseRef( ref ) { - return ( ref || '' ).replace( regex, '.$1' ); - }; - }(); - - /* shared/getInnerContext.js */ - var getInnerContext = function( fragment ) { - do { - if ( fragment.context !== undefined ) { - return fragment.context; - } - } while ( fragment = fragment.parent ); - return ''; - }; - - /* utils/isEqual.js */ - var isEqual = function( a, b ) { - if ( a === null && b === null ) { - return true; - } - if ( typeof a === 'object' || typeof b === 'object' ) { - return false; - } - return a === b; - }; - - /* shared/createComponentBinding.js */ - var createComponentBinding = function( circular, isEqual ) { - - var runloop; - circular.push( function() { - return runloop = circular.runloop; - } ); - var Binding = function( ractive, keypath, otherInstance, otherKeypath ) { - var this$0 = this; - this.root = ractive; - this.keypath = keypath; - this.otherInstance = otherInstance; - this.otherKeypath = otherKeypath; - this.lock = function() { - return this$0.updating = true; - }; - this.unlock = function() { - return this$0.updating = false; - }; - this.bind(); - this.value = this.root.viewmodel.get( this.keypath ); - }; - Binding.prototype = { - isLocked: function() { - return this.updating || this.counterpart && this.counterpart.updating; - }, - shuffle: function( newIndices, value ) { - this.propagateChange( value, newIndices ); - }, - setValue: function( value ) { - this.propagateChange( value ); - }, - propagateChange: function( value, newIndices ) { - var other; - // Only *you* can prevent infinite loops - if ( this.isLocked() ) { - this.value = value; - return; - } - if ( !isEqual( value, this.value ) ) { - this.lock(); - // TODO maybe the case that `value === this.value` - should that result - // in an update rather than a set? - // if the other viewmodel is already locked up, need to do a deferred update - if ( !runloop.addViewmodel( other = this.otherInstance.viewmodel ) && this.counterpart.value !== value ) { - runloop.scheduleTask( function() { - return runloop.addViewmodel( other ); - } ); - } - if ( newIndices ) { - other.smartUpdate( this.otherKeypath, value, newIndices ); - } else { - if ( isSettable( other, this.otherKeypath ) ) { - other.set( this.otherKeypath, value ); - } - } - this.value = value; - // TODO will the counterpart update after this line, during - // the runloop end cycle? may be a problem... - runloop.scheduleTask( this.unlock ); - } - }, - refineValue: function( keypaths ) { - var this$0 = this; - var other; - if ( this.isLocked() ) { - return; - } - this.lock(); - runloop.addViewmodel( other = this.otherInstance.viewmodel ); - keypaths.map( function( keypath ) { - return this$0.otherKeypath + keypath.substr( this$0.keypath.length ); - } ).forEach( function( keypath ) { - return other.mark( keypath ); - } ); - runloop.scheduleTask( this.unlock ); - }, - bind: function() { - this.root.viewmodel.register( this.keypath, this ); - }, - rebind: function( newKeypath ) { - this.unbind(); - this.keypath = newKeypath; - this.counterpart.otherKeypath = newKeypath; - this.bind(); - }, - unbind: function() { - this.root.viewmodel.unregister( this.keypath, this ); - } - }; - - function isSettable( viewmodel, keypath ) { - var computed = viewmodel.computations[ keypath ]; - return !computed || computed.setter; - } - return function createComponentBinding( component, parentInstance, parentKeypath, childKeypath ) { - var hash, childInstance, bindings, parentToChildBinding, childToParentBinding; - hash = parentKeypath + '=' + childKeypath; - bindings = component.bindings; - if ( bindings[ hash ] ) { - // TODO does this ever happen? - return; - } - childInstance = component.instance; - parentToChildBinding = new Binding( parentInstance, parentKeypath, childInstance, childKeypath ); - bindings.push( parentToChildBinding ); - if ( childInstance.twoway ) { - childToParentBinding = new Binding( childInstance, childKeypath, parentInstance, parentKeypath ); - bindings.push( childToParentBinding ); - parentToChildBinding.counterpart = childToParentBinding; - childToParentBinding.counterpart = parentToChildBinding; - } - bindings[ hash ] = parentToChildBinding; - }; - }( circular, isEqual ); - - /* shared/resolveRef.js */ - var resolveRef = function( normaliseRef, getInnerContext, createComponentBinding ) { - - var __export; - var ancestorErrorMessage, getOptions; - ancestorErrorMessage = 'Could not resolve reference - too many "../" prefixes'; - getOptions = { - evaluateWrapped: true - }; - __export = function resolveRef( ractive, ref, fragment, isParentLookup ) { - var context, key, index, keypath, parentValue, hasContextChain, parentKeys, childKeys, parentKeypath, childKeypath; - ref = normaliseRef( ref ); - // If a reference begins '~/', it's a top-level reference - if ( ref.substr( 0, 2 ) === '~/' ) { - return ref.substring( 2 ); - } - // If a reference begins with '.', it's either a restricted reference or - // an ancestor reference... - if ( ref.charAt( 0 ) === '.' ) { - return resolveAncestorReference( getInnerContext( fragment ), ref ); - } - // ...otherwise we need to find the keypath - key = ref.split( '.' )[ 0 ]; - // get() in viewmodel creation means no fragment (yet) - fragment = fragment || {}; - do { - context = fragment.context; - if ( !context ) { - continue; - } - hasContextChain = true; - parentValue = ractive.viewmodel.get( context, getOptions ); - if ( parentValue && ( typeof parentValue === 'object' || typeof parentValue === 'function' ) && key in parentValue ) { - return context + '.' + ref; - } - } while ( fragment = fragment.parent ); - // Root/computed property? - if ( key in ractive.data || key in ractive.viewmodel.computations ) { - return ref; - } - // If this is an inline component, and it's not isolated, we - // can try going up the scope chain - if ( ractive._parent && !ractive.isolated ) { - hasContextChain = true; - fragment = ractive.component.parentFragment; - // Special case - index refs - if ( fragment.indexRefs && ( index = fragment.indexRefs[ ref ] ) !== undefined ) { - // Create an index ref binding, so that it can be rebound letter if necessary. - // It doesn't have an alias since it's an implicit binding, hence `...[ ref ] = ref` - ractive.component.indexRefBindings[ ref ] = ref; - ractive.viewmodel.set( ref, index, true ); - return; - } - keypath = resolveRef( ractive._parent, ref, fragment, true ); - if ( keypath ) { - // We need to create an inter-component binding - // If parent keypath is 'one.foo' and child is 'two.foo', we bind - // 'one' to 'two' as it's more efficient and avoids edge cases - parentKeys = keypath.split( '.' ); - childKeys = ref.split( '.' ); - while ( parentKeys.length > 1 && childKeys.length > 1 && parentKeys[ parentKeys.length - 1 ] === childKeys[ childKeys.length - 1 ] ) { - parentKeys.pop(); - childKeys.pop(); - } - parentKeypath = parentKeys.join( '.' ); - childKeypath = childKeys.join( '.' ); - ractive.viewmodel.set( childKeypath, ractive._parent.viewmodel.get( parentKeypath ), true ); - createComponentBinding( ractive.component, ractive._parent, parentKeypath, childKeypath ); - return ref; - } - } - // If there's no context chain, and the instance is either a) isolated or - // b) an orphan, then we know that the keypath is identical to the reference - if ( !isParentLookup && !hasContextChain ) { - // the data object needs to have a property by this name, - // to prevent future failed lookups - ractive.viewmodel.set( ref, undefined ); - return ref; - } - if ( ractive.viewmodel.get( ref ) !== undefined ) { - return ref; - } - }; - - function resolveAncestorReference( baseContext, ref ) { - var contextKeys; - // {{.}} means 'current context' - if ( ref === '.' ) - return baseContext; - contextKeys = baseContext ? baseContext.split( '.' ) : []; - // ancestor references (starting "../") go up the tree - if ( ref.substr( 0, 3 ) === '../' ) { - while ( ref.substr( 0, 3 ) === '../' ) { - if ( !contextKeys.length ) { - throw new Error( ancestorErrorMessage ); - } - contextKeys.pop(); - ref = ref.substring( 3 ); - } - contextKeys.push( ref ); - return contextKeys.join( '.' ); - } - // not an ancestor reference - must be a restricted reference (prepended with "." or "./") - if ( !baseContext ) { - return ref.replace( /^\.\/?/, '' ); - } - return baseContext + ref.replace( /^\.\//, '.' ); - } - return __export; - }( normaliseRef, getInnerContext, createComponentBinding ); - - /* global/TransitionManager.js */ - var TransitionManager = function( removeFromArray ) { - - var TransitionManager = function( callback, parent ) { - this.callback = callback; - this.parent = parent; - this.intros = []; - this.outros = []; - this.children = []; - this.totalChildren = this.outroChildren = 0; - this.detachQueue = []; - this.outrosComplete = false; - if ( parent ) { - parent.addChild( this ); - } - }; - TransitionManager.prototype = { - addChild: function( child ) { - this.children.push( child ); - this.totalChildren += 1; - this.outroChildren += 1; - }, - decrementOutros: function() { - this.outroChildren -= 1; - check( this ); - }, - decrementTotal: function() { - this.totalChildren -= 1; - check( this ); - }, - add: function( transition ) { - var list = transition.isIntro ? this.intros : this.outros; - list.push( transition ); - }, - remove: function( transition ) { - var list = transition.isIntro ? this.intros : this.outros; - removeFromArray( list, transition ); - check( this ); - }, - init: function() { - this.ready = true; - check( this ); - }, - detachNodes: function() { - this.detachQueue.forEach( detach ); - this.children.forEach( detachNodes ); - } - }; - - function detach( element ) { - element.detach(); - } - - function detachNodes( tm ) { - tm.detachNodes(); - } - - function check( tm ) { - if ( !tm.ready || tm.outros.length || tm.outroChildren ) - return; - // If all outros are complete, and we haven't already done this, - // we notify the parent if there is one, otherwise - // start detaching nodes - if ( !tm.outrosComplete ) { - if ( tm.parent ) { - tm.parent.decrementOutros( tm ); - } else { - tm.detachNodes(); - } - tm.outrosComplete = true; - } - // Once everything is done, we can notify parent transition - // manager and call the callback - if ( !tm.intros.length && !tm.totalChildren ) { - if ( typeof tm.callback === 'function' ) { - tm.callback(); - } - if ( tm.parent ) { - tm.parent.decrementTotal(); - } - } - } - return TransitionManager; - }( removeFromArray ); - - /* global/runloop.js */ - var runloop = function( circular, Hook, removeFromArray, Promise, resolveRef, TransitionManager ) { - - var __export; - var batch, runloop, unresolved = [], - changeHook = new Hook( 'change' ); - runloop = { - start: function( instance, returnPromise ) { - var promise, fulfilPromise; - if ( returnPromise ) { - promise = new Promise( function( f ) { - return fulfilPromise = f; - } ); - } - batch = { - previousBatch: batch, - transitionManager: new TransitionManager( fulfilPromise, batch && batch.transitionManager ), - views: [], - tasks: [], - viewmodels: [], - instance: instance - }; - if ( instance ) { - batch.viewmodels.push( instance.viewmodel ); - } - return promise; - }, - end: function() { - flushChanges(); - batch.transitionManager.init(); - if ( !batch.previousBatch && !!batch.instance ) - batch.instance.viewmodel.changes = []; - batch = batch.previousBatch; - }, - addViewmodel: function( viewmodel ) { - if ( batch ) { - if ( batch.viewmodels.indexOf( viewmodel ) === -1 ) { - batch.viewmodels.push( viewmodel ); - return true; - } else { - return false; - } - } else { - viewmodel.applyChanges(); - return false; - } - }, - registerTransition: function( transition ) { - transition._manager = batch.transitionManager; - batch.transitionManager.add( transition ); - }, - addView: function( view ) { - batch.views.push( view ); - }, - addUnresolved: function( thing ) { - unresolved.push( thing ); - }, - removeUnresolved: function( thing ) { - removeFromArray( unresolved, thing ); - }, - // synchronise node detachments with transition ends - detachWhenReady: function( thing ) { - batch.transitionManager.detachQueue.push( thing ); - }, - scheduleTask: function( task, postRender ) { - var _batch; - if ( !batch ) { - task(); - } else { - _batch = batch; - while ( postRender && _batch.previousBatch ) { - // this can't happen until the DOM has been fully updated - // otherwise in some situations (with components inside elements) - // transitions and decorators will initialise prematurely - _batch = _batch.previousBatch; - } - _batch.tasks.push( task ); - } - } - }; - circular.runloop = runloop; - __export = runloop; - - function flushChanges() { - var i, thing, changeHash; - for ( i = 0; i < batch.viewmodels.length; i += 1 ) { - thing = batch.viewmodels[ i ]; - changeHash = thing.applyChanges(); - if ( changeHash ) { - changeHook.fire( thing.ractive, changeHash ); - } - } - batch.viewmodels.length = 0; - attemptKeypathResolution(); - // Now that changes have been fully propagated, we can update the DOM - // and complete other tasks - for ( i = 0; i < batch.views.length; i += 1 ) { - batch.views[ i ].update(); - } - batch.views.length = 0; - for ( i = 0; i < batch.tasks.length; i += 1 ) { - batch.tasks[ i ](); - } - batch.tasks.length = 0; - // If updating the view caused some model blowback - e.g. a triple - // containing