conjur-asset-ui 1.3.2 → 1.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (128) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +3 -1
  3. data/.jshintrc +41 -0
  4. data/CHANGELOG.md +7 -0
  5. data/Gemfile +3 -1
  6. data/README.md +38 -4
  7. data/Rakefile +69 -1
  8. data/TODO.md +31 -0
  9. data/bower.json +98 -0
  10. data/conjur-asset-ui.gemspec +3 -3
  11. data/features/navigation_bar.feature +31 -0
  12. data/features/step_definitions/custom_step.rb +32 -0
  13. data/features/support/env.rb +38 -0
  14. data/features/support/hooks.rb +30 -0
  15. data/features/support/world.rb +17 -0
  16. data/gulpfile.js +139 -0
  17. data/lib/conjur/command/ui.rb +1 -1
  18. data/lib/conjur/webserver/server.rb +14 -8
  19. data/lib/conjur-asset-ui-version.rb +1 -1
  20. data/package.json +47 -0
  21. data/preprocessor.js +7 -0
  22. data/public/_client_libs.html +1 -16
  23. data/public/build/css/styles.css +87 -0
  24. data/public/build/css/vendor.css +5 -0
  25. data/public/build/fonts/glyphicons-halflings-regular.eot +0 -0
  26. data/public/{fonts → build/fonts}/glyphicons-halflings-regular.svg +47 -47
  27. data/public/{fonts → build/fonts}/glyphicons-halflings-regular.ttf +0 -0
  28. data/public/build/fonts/glyphicons-halflings-regular.woff +0 -0
  29. data/public/build/js/app.min.js +4 -0
  30. data/public/build/js/vendor.min.js +23 -0
  31. data/public/build/maps/app.min.js.map +1 -0
  32. data/public/build/maps/vendor.min.js.map +1 -0
  33. data/public/css/styles.less +246 -17
  34. data/public/index.html.erb +11 -10
  35. data/public/js/init.js +186 -97
  36. data/public/js/lib/sorted-set.no-require.js +3 -28
  37. data/public/js/models/groupRecord.js +14 -12
  38. data/public/js/models/hostRecord.js +13 -8
  39. data/public/js/models/layerRecord.js +14 -12
  40. data/public/js/models/namespace.js +2 -0
  41. data/public/js/models/policyList.js +3 -1
  42. data/public/js/models/policyRecord.js +8 -8
  43. data/public/js/models/record.js +59 -27
  44. data/public/js/models/resourceList.js +28 -10
  45. data/public/js/models/userList.js +7 -2
  46. data/public/js/models/userRecord.js +14 -9
  47. data/public/js/models/variableList.js +18 -7
  48. data/public/js/models/variableRecord.js +18 -14
  49. data/public/js/routers.js +74 -37
  50. data/public/js/views/annotations.js +39 -28
  51. data/public/js/views/audit.js +31 -25
  52. data/public/js/views/breadcrumbs.js +62 -0
  53. data/public/js/views/chart.js +617 -0
  54. data/public/js/views/dashboard.js +144 -65
  55. data/public/js/views/generic.js +16 -9
  56. data/public/js/views/group.js +103 -55
  57. data/public/js/views/groups.js +3 -7
  58. data/public/js/views/host.js +192 -56
  59. data/public/js/views/hosts.js +2 -6
  60. data/public/js/views/layer.js +136 -82
  61. data/public/js/views/layers.js +2 -6
  62. data/public/js/views/mixins/search.js +12 -5
  63. data/public/js/views/mixins/tabs.js +95 -55
  64. data/public/js/views/navSearch.js +16 -5
  65. data/public/js/views/owned.js +14 -8
  66. data/public/js/views/permissions.js +244 -178
  67. data/public/js/views/policies.js +2 -4
  68. data/public/js/views/policy.js +65 -38
  69. data/public/js/views/resource.js +54 -34
  70. data/public/js/views/role.js +59 -37
  71. data/public/js/views/searchResults.js +205 -138
  72. data/public/js/views/sections.js +226 -0
  73. data/public/js/views/time.js +38 -13
  74. data/public/js/views/user.js +288 -59
  75. data/public/js/views/users.js +2 -7
  76. data/public/js/views/variable.js +293 -53
  77. data/public/js/views/variables.js +4 -8
  78. metadata +34 -56
  79. data/.git-hooks/pre_commit/ensure_livescript_compiled.rb +0 -31
  80. data/.overcommit.yml +0 -5
  81. data/compile_ls +0 -6
  82. data/livescript/views/audit.ls +0 -136
  83. data/public/_client_code.html +0 -42
  84. data/public/css/bootstrap.css +0 -7
  85. data/public/fonts/glyphicons-halflings-regular.eot +0 -0
  86. data/public/fonts/glyphicons-halflings-regular.woff +0 -0
  87. data/public/js/lib/JSXTransformer.js +0 -10862
  88. data/public/js/lib/async.js +0 -958
  89. data/public/js/lib/backbone.js +0 -2
  90. data/public/js/lib/bootstrap.js +0 -6
  91. data/public/js/lib/date.extensions.js +0 -141
  92. data/public/js/lib/less.js +0 -16
  93. data/public/js/lib/moment.js +0 -7768
  94. data/public/js/lib/prelude-browser-min.js +0 -1
  95. data/public/js/lib/react-bootstrap.js +0 -5346
  96. data/public/js/lib/react-bootstrap.min.js +0 -4
  97. data/public/js/lib/underscore-min.js +0 -6
  98. data/public/js/lib/underscore.string.min.js +0 -1
  99. data/public/js/main.js +0 -57
  100. data/vendor/prelude-ls/.gitignore +0 -2
  101. data/vendor/prelude-ls/.travis.yml +0 -3
  102. data/vendor/prelude-ls/CHANGELOG.md +0 -81
  103. data/vendor/prelude-ls/LICENSE +0 -22
  104. data/vendor/prelude-ls/Makefile +0 -50
  105. data/vendor/prelude-ls/README.md +0 -15
  106. data/vendor/prelude-ls/browser/prelude-browser-min.js +0 -1
  107. data/vendor/prelude-ls/browser/prelude-browser.js +0 -1172
  108. data/vendor/prelude-ls/lib/Func.js +0 -40
  109. data/vendor/prelude-ls/lib/List.js +0 -602
  110. data/vendor/prelude-ls/lib/Num.js +0 -129
  111. data/vendor/prelude-ls/lib/Obj.js +0 -153
  112. data/vendor/prelude-ls/lib/Str.js +0 -68
  113. data/vendor/prelude-ls/lib/index.js +0 -164
  114. data/vendor/prelude-ls/package.json +0 -50
  115. data/vendor/prelude-ls/package.ls +0 -46
  116. data/vendor/prelude-ls/src/Func.ls +0 -17
  117. data/vendor/prelude-ls/src/List.ls +0 -299
  118. data/vendor/prelude-ls/src/Num.ls +0 -83
  119. data/vendor/prelude-ls/src/Obj.ls +0 -61
  120. data/vendor/prelude-ls/src/Str.ls +0 -32
  121. data/vendor/prelude-ls/src/index.ls +0 -56
  122. data/vendor/prelude-ls/test/Func.ls +0 -36
  123. data/vendor/prelude-ls/test/List.ls +0 -751
  124. data/vendor/prelude-ls/test/Num.ls +0 -258
  125. data/vendor/prelude-ls/test/Obj.ls +0 -145
  126. data/vendor/prelude-ls/test/Prelude.ls +0 -49
  127. data/vendor/prelude-ls/test/Str.ls +0 -208
  128. data/vendor/prelude-ls/test/browser.html +0 -5
@@ -1,4 +0,0 @@
1
- /*! react-bootstrap 2014-09-10 */
2
- !function(a,b){"function"==typeof define&&define.amd?define(["react"],b):a.ReactBootstrap=b(a.React)}(this,function(a){var b,c,d;return function(a){function e(a,b){var c,d,e,f,g,h,i,j,k,l,m=b&&b.split("/"),n=p.map,o=n&&n["*"]||{};if(a&&"."===a.charAt(0)&&b){for(m=m.slice(0,m.length-1),a=m.concat(a.split("/")),j=0;l=a[j];j++)if("."===l)a.splice(j,1),j-=1;else if(".."===l){if(1===j&&(".."===a[2]||".."===a[0]))return!0;j>0&&(a.splice(j-1,2),j-=2)}a=a.join("/")}if((m||o)&&n){for(c=a.split("/"),j=c.length;j>0;j-=1){if(d=c.slice(0,j).join("/"),m)for(k=m.length;k>0;k-=1)if(e=n[m.slice(0,k).join("/")],e&&(e=e[d])){f=e,g=j;break}if(f)break;!h&&o&&o[d]&&(h=o[d],i=j)}!f&&h&&(f=h,g=i),f&&(c.splice(0,g,f),a=c.join("/"))}return a}function f(b,c){return function(){return m.apply(a,r.call(arguments,0).concat([b,c]))}}function g(a){return function(b){return e(b,a)}}function h(a){return function(b){n[a]=b}}function i(b){if(o.hasOwnProperty(b)){var c=o[b];delete o[b],q[b]=!0,l.apply(a,c)}if(!n.hasOwnProperty(b))throw new Error("No "+b);return n[b]}function j(a,b){var c,d,f=a.indexOf("!");return-1!==f?(c=e(a.slice(0,f),b),a=a.slice(f+1),d=i(c),a=d&&d.normalize?d.normalize(a,g(b)):e(a,b)):a=e(a,b),{f:c?c+"!"+a:a,n:a,p:d}}function k(a){return function(){return p&&p.config&&p.config[a]||{}}}var l,m,n={},o={},p={},q={},r=[].slice;l=function(b,c,d,e){var g,l,m,p,r,s,t=[];if(e=e||b,"function"==typeof d){for(c=!c.length&&d.length?["require","exports","module"]:c,s=0;s<c.length;s++)if(r=j(c[s],e),m=r.f,"require"===m)t[s]=f(b);else if("exports"===m)t[s]=n[b]={},g=!0;else if("module"===m)l=t[s]={id:b,uri:"",exports:n[b],config:k(b)};else if(n.hasOwnProperty(m)||o.hasOwnProperty(m))t[s]=i(m);else if(r.p)r.p.load(r.n,f(e,!0),h(m),{}),t[s]=n[m];else if(!q[m])throw new Error(b+" missing "+m);p=d.apply(n[b],t),b&&(l&&l.exports!==a&&l.exports!==n[b]?n[b]=l.exports:p===a&&g||(n[b]=p))}else b&&(n[b]=d)},b=c=m=function(b,c,d,e){return"string"==typeof b?i(j(b,c).f):(b.splice||(p=b,c.splice?(b=c,c=d,d=null):b=a),c=c||function(){},e?l(a,b,c,d):setTimeout(function(){l(a,b,c,d)},15),m)},m.config=function(a){return p=a,m},d=function(a,b,c){b.splice||(c=b,b=[]),o[a]=[a,b,c]},d.amd={jQuery:!0}}(),d("almond",function(){}),d("utils/classSet",["require","exports","module"],function(a,b,c){function d(a){return"object"==typeof a?Object.keys(a).filter(function(b){return a[b]}).join(" "):Array.prototype.join.call(arguments," ")}c.exports=d}),d("utils/merge",["require","exports","module"],function(a,b,c){function d(a,b){if(null!=b)for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])}function e(a,b){var c={};return d(c,a),d(c,b),c}c.exports=e}),d("utils/cloneWithProps",["require","exports","module","react","./merge"],function(a,b,c){function d(a){a||(a="");var b,c=arguments.length;if(c>1)for(var d=1;c>d;d++)b=arguments[d],b&&(a+=" "+b);return a}function e(a){return function(b,c,d){b[c]=b.hasOwnProperty(c)?a(b[c],d):d}}function f(){}function g(a,b){for(var c in b)if(b.hasOwnProperty(c)){var d=m[c];d&&m.hasOwnProperty(c)?d(a,c,b[c]):a.hasOwnProperty(c)||(a[c]=b[c])}return a}function h(a,b){return g(k(a),b)}function i(a,b){var c=n.mergeProps(b,a.props);return!c.hasOwnProperty(o)&&a.props.hasOwnProperty(o)&&(c.children=a.props.children),0===j.version.indexOf("0.10.")?a.constructor.ConvenienceConstructor(c):a.constructor(c)}var j=a("react"),k=a("./merge"),l=e(function(a,b){return k(b,a)}),m={children:f,className:e(d),key:f,ref:f,style:l},n={mergeProps:h},o="children";c.exports=i}),d("constants",["require","exports","module"],function(a,b,c){c.exports={CLASSES:{alert:"alert",button:"btn","button-group":"btn-group","button-toolbar":"btn-toolbar",column:"col","input-group":"input-group",form:"form",glyphicon:"glyphicon",label:"label","list-group-item":"list-group-item",panel:"panel","panel-group":"panel-group","progress-bar":"progress-bar",nav:"nav",navbar:"navbar",modal:"modal",row:"row",well:"well"},STYLES:{"default":"default",primary:"primary",success:"success",info:"info",warning:"warning",danger:"danger",link:"link",inline:"inline",tabs:"tabs",pills:"pills"},SIZES:{large:"lg",medium:"md",small:"sm",xsmall:"xs"},GLYPHS:["asterisk","plus","euro","minus","cloud","envelope","pencil","glass","music","search","heart","star","star-empty","user","film","th-large","th","th-list","ok","remove","zoom-in","zoom-out","off","signal","cog","trash","home","file","time","road","download-alt","download","upload","inbox","play-circle","repeat","refresh","list-alt","lock","flag","headphones","volume-off","volume-down","volume-up","qrcode","barcode","tag","tags","book","bookmark","print","camera","font","bold","italic","text-height","text-width","align-left","align-center","align-right","align-justify","list","indent-left","indent-right","facetime-video","picture","map-marker","adjust","tint","edit","share","check","move","step-backward","fast-backward","backward","play","pause","stop","forward","fast-forward","step-forward","eject","chevron-left","chevron-right","plus-sign","minus-sign","remove-sign","ok-sign","question-sign","info-sign","screenshot","remove-circle","ok-circle","ban-circle","arrow-left","arrow-right","arrow-up","arrow-down","share-alt","resize-full","resize-small","exclamation-sign","gift","leaf","fire","eye-open","eye-close","warning-sign","plane","calendar","random","comment","magnet","chevron-up","chevron-down","retweet","shopping-cart","folder-close","folder-open","resize-vertical","resize-horizontal","hdd","bullhorn","bell","certificate","thumbs-up","thumbs-down","hand-right","hand-left","hand-up","hand-down","circle-arrow-right","circle-arrow-left","circle-arrow-up","circle-arrow-down","globe","wrench","tasks","filter","briefcase","fullscreen","dashboard","paperclip","heart-empty","link","phone","pushpin","usd","gbp","sort","sort-by-alphabet","sort-by-alphabet-alt","sort-by-order","sort-by-order-alt","sort-by-attributes","sort-by-attributes-alt","unchecked","expand","collapse-down","collapse-up","log-in","flash","log-out","new-window","record","save","open","saved","import","export","send","floppy-disk","floppy-saved","floppy-remove","floppy-save","floppy-open","credit-card","transfer","cutlery","header","compressed","earphone","phone-alt","tower","stats","sd-video","hd-video","subtitles","sound-stereo","sound-dolby","sound-5-1","sound-6-1","sound-7-1","copyright-mark","registration-mark","cloud-download","cloud-upload","tree-conifer","tree-deciduous"]}}),d("BootstrapMixin",["require","exports","module","react","./constants"],function(a,b,c){var d=a("react"),e=a("./constants"),f={propTypes:{bsClass:d.PropTypes.oneOf(Object.keys(e.CLASSES)),bsStyle:d.PropTypes.oneOf(Object.keys(e.STYLES)),bsSize:d.PropTypes.oneOf(Object.keys(e.SIZES))},getBsClassSet:function(){var a={},b=this.props.bsClass&&e.CLASSES[this.props.bsClass];if(b){a[b]=!0;var c=b+"-",d=this.props.bsSize&&e.SIZES[this.props.bsSize];d&&(a[c+d]=!0);var f=this.props.bsStyle&&e.STYLES[this.props.bsStyle];this.props.bsStyle&&(a[c+f]=!0)}return a}};c.exports=f}),d("utils/ValidComponentChildren",["require","exports","module","react"],function(a,b,c){function d(a,b,c){var d=0;return h.Children.map(a,function(a){if(h.isValidComponent(a)){var e=d;return d++,b.call(c,a,e)}return a})}function e(a,b,c){var d=0;return h.Children.forEach(a,function(a){h.isValidComponent(a)&&(b.call(c,a,d),d++)})}function f(a){var b=0;return h.Children.forEach(a,function(a){h.isValidComponent(a)&&b++}),b}function g(a){var b=!1;return h.Children.forEach(a,function(a){!b&&h.isValidComponent(a)&&(b=!0)}),b}var h=a("react");c.exports={map:d,forEach:e,numberOf:f,hasValidComponent:g}}),d("PanelGroup",["require","exports","module","react","./utils/classSet","./utils/cloneWithProps","./BootstrapMixin","./utils/ValidComponentChildren"],function(a,b,c){var d=a("react"),e=a("./utils/classSet"),f=a("./utils/cloneWithProps"),g=a("./BootstrapMixin"),h=a("./utils/ValidComponentChildren"),i=d.createClass({displayName:"PanelGroup",mixins:[g],propTypes:{collapsable:d.PropTypes.bool,activeKey:d.PropTypes.any,defaultActiveKey:d.PropTypes.any,onSelect:d.PropTypes.func},getDefaultProps:function(){return{bsClass:"panel-group"}},getInitialState:function(){var a=this.props.defaultActiveKey;return{activeKey:a}},render:function(){return this.transferPropsTo(d.DOM.div({className:e(this.getBsClassSet()),onSelect:null},h.map(this.props.children,this.renderPanel)))},renderPanel:function(a){var b=null!=this.props.activeKey?this.props.activeKey:this.state.activeKey,c={bsStyle:a.props.bsStyle||this.props.bsStyle,key:a.props.key,ref:a.props.ref};return this.props.accordion&&(c.collapsable=!0,c.expanded=a.props.key===b,c.onSelect=this.handleSelect),f(a,c)},shouldComponentUpdate:function(){return!this._isChanging},handleSelect:function(a){this.props.onSelect&&(this._isChanging=!0,this.props.onSelect(a),this._isChanging=!1),this.state.activeKey===a&&(a=null),this.setState({activeKey:a})}});c.exports=i}),d("Accordion",["require","exports","module","react","./PanelGroup"],function(a,b,c){var d=a("react"),e=a("./PanelGroup"),f=d.createClass({displayName:"Accordion",render:function(){return this.transferPropsTo(e({accordion:!0},this.props.children))}});c.exports=f}),d("utils/domUtils",["require","exports","module"],function(a,b,c){function d(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)}function e(a){if(window.jQuery)return window.jQuery(a).offset();var b=document.documentElement,c={top:0,left:0};return"undefined"!=typeof a.getBoundingClientRect&&(c=a.getBoundingClientRect()),{top:c.top+window.pageYOffset-b.clientTop,left:c.left+window.pageXOffset-b.clientLeft}}function f(a,b){if(window.jQuery)return window.jQuery(a).position();var c,f={top:0,left:0};return"fixed"===d(a).position?c=a.getBoundingClientRect():(b||(b=b(a)),c=e(a),"HTML"!==b.nodeName&&(f=e(b)),f.top+=parseInt(d(b).borderTopWidth,10),f.left+=parseInt(d(b).borderLeftWidth,10)),{top:c.top-f.top-parseInt(d(a).marginTop,10),left:c.left-f.left-parseInt(d(a).marginLeft,10)}}function g(a){for(var b=document.documentElement,c=a.offsetParent||b;c&&"HTML"!==c.nodeName&&"static"===d(c).position;)c=c.offsetParent;return c||b}c.exports={getComputedStyles:d,getOffset:e,getPosition:f,offsetParent:g}}),d("utils/EventListener",["require","exports","module"],function(a,b,c){var d={listen:function(a,b,c){return a.addEventListener?(a.addEventListener(b,c,!1),{remove:function(){a.removeEventListener(b,c,!1)}}):a.attachEvent?(a.attachEvent("on"+b,c),{remove:function(){a.detachEvent("on"+b,c)}}):void 0}};c.exports=d}),d("AffixMixin",["require","exports","module","react","./utils/domUtils","./utils/EventListener"],function(a,b,c){var d=a("react"),e=a("./utils/domUtils"),f=a("./utils/EventListener"),g={propTypes:{offset:d.PropTypes.number,offsetTop:d.PropTypes.number,offsetBottom:d.PropTypes.number},getInitialState:function(){return{affixClass:"affix-top"}},getPinnedOffset:function(a){return this.pinnedOffset?this.pinnedOffset:(a.className=a.className.replace(/affix-top|affix-bottom|affix/,""),a.className+=a.className.length?" affix":"affix",this.pinnedOffset=e.getOffset(a).top-window.pageYOffset,this.pinnedOffset)},checkPosition:function(){var a,b,c,d,f,g,h,i,j;this.isMounted()&&(a=this.getDOMNode(),b=document.documentElement.offsetHeight,c=window.pageYOffset,d=e.getOffset(a),"top"===this.affixed&&(d.top+=c),f=null!=this.props.offsetTop?this.props.offsetTop:this.props.offset,g=null!=this.props.offsetBottom?this.props.offsetBottom:this.props.offset,(null!=f||null!=g)&&(null==f&&(f=0),null==g&&(g=0),h=null!=this.unpin&&c+this.unpin<=d.top?!1:null!=g&&d.top+a.offsetHeight>=b-g?"bottom":null!=f&&f>=c?"top":!1,this.affixed!==h&&(null!=this.unpin&&(a.style.top=""),i="affix"+(h?"-"+h:""),this.affixed=h,this.unpin="bottom"===h?this.getPinnedOffset(a):null,"bottom"===h&&(a.className=a.className.replace(/affix-top|affix-bottom|affix/,"affix-bottom"),j=b-g-a.offsetHeight-e.getOffset(a).top),this.setState({affixClass:i,affixPositionTop:j}))))},checkPositionWithEventLoop:function(){setTimeout(this.checkPosition,0)},componentDidMount:function(){this._onWindowScrollListener=f.listen(window,"scroll",this.checkPosition),this._onDocumentClickListener=f.listen(document,"click",this.checkPositionWithEventLoop)},componentWillUnmount:function(){this._onWindowScrollListener&&this._onWindowScrollListener.remove(),this._onDocumentClickListener&&this._onDocumentClickListener.remove()},componentDidUpdate:function(a,b){b.affixClass===this.state.affixClass&&this.checkPositionWithEventLoop()}};c.exports=g}),d("Affix",["require","exports","module","react","./AffixMixin","./utils/domUtils"],function(a,b,c){var d=a("react"),e=a("./AffixMixin"),f=a("./utils/domUtils"),g=d.createClass({displayName:"Affix",statics:{domUtils:f},mixins:[e],render:function(){var a={top:this.state.affixPositionTop};return this.transferPropsTo(d.DOM.div({className:this.state.affixClass,style:a},this.props.children))}});c.exports=g}),d("Alert",["require","exports","module","react","./utils/classSet","./BootstrapMixin"],function(a,b,c){var d=a("react"),e=a("./utils/classSet"),f=a("./BootstrapMixin"),g=d.createClass({displayName:"Alert",mixins:[f],propTypes:{onDismiss:d.PropTypes.func,dismissAfter:d.PropTypes.number},getDefaultProps:function(){return{bsClass:"alert",bsStyle:"info"}},renderDismissButton:function(){return d.DOM.button({type:"button",className:"close",onClick:this.props.onDismiss,"aria-hidden":"true"}," × ")},render:function(){var a=this.getBsClassSet(),b=!!this.props.onDismiss;return a["alert-dismissable"]=b,this.transferPropsTo(d.DOM.div({className:e(a)},b?this.renderDismissButton():null,this.props.children))},componentDidMount:function(){this.props.dismissAfter&&this.props.onDismiss&&(this.dismissTimer=setTimeout(this.props.onDismiss,this.props.dismissAfter))},componentWillUnmount:function(){clearTimeout(this.dismissTimer)}});c.exports=g}),d("Badge",["require","exports","module","react","./utils/ValidComponentChildren","./utils/classSet"],function(a,b,c){var d=a("react"),e=a("./utils/ValidComponentChildren"),f=a("./utils/classSet"),g=d.createClass({displayName:"Badge",propTypes:{pullRight:d.PropTypes.bool},render:function(){var a={"pull-right":this.props.pullRight,badge:e.hasValidComponent(this.props.children)};return this.transferPropsTo(d.DOM.span({className:f(a)},this.props.children))}});c.exports=g}),d("utils/CustomPropTypes",["require","exports","module","react"],function(a,b,c){function d(a){function b(b,c,d,e){return e=e||h,null!=c[d]?a(c,d,e):b?new Error("Required prop `"+d+"` was not specified in `"+e+"`."):void 0}var c=b.bind(null,!1);return c.isRequired=b.bind(null,!0),c}function e(){function a(a,b,c){return g.isValidClass(a[b])?void 0:new Error("Invalid prop `"+b+"` supplied to `"+c+"`, expected a valid React class.")}return d(a)}function f(){function a(a,b,c){return"object"!=typeof a[b]||"function"!=typeof a[b].getDOMNode&&1!==a[b].nodeType?new Error("Invalid prop `"+b+"` supplied to `"+c+"`, expected a DOM element or an object that has a `getDOMNode` method"):void 0}return d(a)}var g=a("react"),h="<<anonymous>>",i={componentClass:e(),mountable:f()};c.exports=i}),d("Button",["require","exports","module","react","./utils/classSet","./BootstrapMixin","./utils/CustomPropTypes"],function(a,b,c){var d=a("react"),e=a("./utils/classSet"),f=a("./BootstrapMixin"),g=a("./utils/CustomPropTypes"),h=d.createClass({displayName:"Button",mixins:[f],propTypes:{active:d.PropTypes.bool,disabled:d.PropTypes.bool,block:d.PropTypes.bool,navItem:d.PropTypes.bool,navDropdown:d.PropTypes.bool,componentClass:g.componentClass},getDefaultProps:function(){return{bsClass:"button",bsStyle:"default",type:"button"}},render:function(){var a,b=this.props.navDropdown?{}:this.getBsClassSet();return b.active=this.props.active,b["btn-block"]=this.props.block,this.props.navItem?this.renderNavItem(b):(a=this.props.href||this.props.navDropdown?"renderAnchor":"renderButton",this[a](b))},renderAnchor:function(a){var b=this.props.componentClass||d.DOM.a,c=this.props.href||"#";return a.disabled=this.props.disabled,this.transferPropsTo(b({href:c,className:e(a),role:"button"},this.props.children))},renderButton:function(a){var b=this.props.componentClass||d.DOM.button;return this.transferPropsTo(b({className:e(a)},this.props.children))},renderNavItem:function(a){var b={active:this.props.active};return d.DOM.li({className:e(b)},this.renderAnchor(a))}});c.exports=h}),d("ButtonGroup",["require","exports","module","react","./utils/classSet","./BootstrapMixin","./Button"],function(a,b,c){var d=a("react"),e=a("./utils/classSet"),f=a("./BootstrapMixin"),g=(a("./Button"),d.createClass({displayName:"ButtonGroup",mixins:[f],propTypes:{vertical:d.PropTypes.bool,justified:d.PropTypes.bool},getDefaultProps:function(){return{bsClass:"button-group"}},render:function(){var a=this.getBsClassSet();return a["btn-group"]=!this.props.vertical,a["btn-group-vertical"]=this.props.vertical,a["btn-group-justified"]=this.props.justified,this.transferPropsTo(d.DOM.div({className:e(a)},this.props.children))}}));c.exports=g}),d("ButtonToolbar",["require","exports","module","react","./utils/classSet","./BootstrapMixin","./Button"],function(a,b,c){var d=a("react"),e=a("./utils/classSet"),f=a("./BootstrapMixin"),g=(a("./Button"),d.createClass({displayName:"ButtonToolbar",mixins:[f],getDefaultProps:function(){return{bsClass:"button-toolbar"}},render:function(){var a=this.getBsClassSet();return this.transferPropsTo(d.DOM.div({role:"toolbar",className:e(a)},this.props.children))}}));c.exports=g}),d("Carousel",["require","exports","module","react","./utils/classSet","./utils/cloneWithProps","./BootstrapMixin","./utils/ValidComponentChildren"],function(a,b,c){var d=a("react"),e=a("./utils/classSet"),f=a("./utils/cloneWithProps"),g=a("./BootstrapMixin"),h=a("./utils/ValidComponentChildren"),i=d.createClass({displayName:"Carousel",mixins:[g],propTypes:{slide:d.PropTypes.bool,indicators:d.PropTypes.bool,controls:d.PropTypes.bool,pauseOnHover:d.PropTypes.bool,wrap:d.PropTypes.bool,onSelect:d.PropTypes.func,onSlideEnd:d.PropTypes.func,activeIndex:d.PropTypes.number,defaultActiveIndex:d.PropTypes.number,direction:d.PropTypes.oneOf(["prev","next"])},getDefaultProps:function(){return{slide:!0,interval:5e3,pauseOnHover:!0,wrap:!0,indicators:!0,controls:!0}},getInitialState:function(){return{activeIndex:null==this.props.defaultActiveIndex?0:this.props.defaultActiveIndex,previousActiveIndex:null,direction:null}},getDirection:function(a,b){return a===b?null:a>b?"prev":"next"},componentWillReceiveProps:function(a){var b=this.getActiveIndex();null!=a.activeIndex&&a.activeIndex!==b&&(clearTimeout(this.timeout),this.setState({previousActiveIndex:b,direction:null!=a.direction?a.direction:this.getDirection(b,a.activeIndex)}))},componentDidMount:function(){this.waitForNext()},componentWillUnmount:function(){clearTimeout(this.timeout)},next:function(a){a&&a.preventDefault();var b=this.getActiveIndex()+1,c=h.numberOf(this.props.children);if(b>c-1){if(!this.props.wrap)return;b=0}this.handleSelect(b,"next")},prev:function(a){a&&a.preventDefault();var b=this.getActiveIndex()-1;if(0>b){if(!this.props.wrap)return;b=h.numberOf(this.props.children)-1}this.handleSelect(b,"prev")},pause:function(){this.isPaused=!0,clearTimeout(this.timeout)},play:function(){this.isPaused=!1,this.waitForNext()},waitForNext:function(){!this.isPaused&&this.props.slide&&this.props.interval&&null==this.props.activeIndex&&(this.timeout=setTimeout(this.next,this.props.interval))},handleMouseOver:function(){this.props.pauseOnHover&&this.pause()},handleMouseOut:function(){this.isPaused&&this.play()},render:function(){var a={carousel:!0,slide:this.props.slide};return this.transferPropsTo(d.DOM.div({className:e(a),onMouseOver:this.handleMouseOver,onMouseOut:this.handleMouseOut},this.props.indicators?this.renderIndicators():null,d.DOM.div({className:"carousel-inner",ref:"inner"},h.map(this.props.children,this.renderItem)),this.props.controls?this.renderControls():null))},renderPrev:function(){return d.DOM.a({className:"left carousel-control",href:"#prev",key:0,onClick:this.prev},d.DOM.span({className:"glyphicon glyphicon-chevron-left"}))},renderNext:function(){return d.DOM.a({className:"right carousel-control",href:"#next",key:1,onClick:this.next},d.DOM.span({className:"glyphicon glyphicon-chevron-right"}))},renderControls:function(){if(this.props.wrap){var a=this.getActiveIndex(),b=h.numberOf(this.props.children);return[0!==a?this.renderPrev():null,a!==b-1?this.renderNext():null]}return[this.renderPrev(),this.renderNext()]},renderIndicator:function(a,b){var c=b===this.getActiveIndex()?"active":null;return d.DOM.li({key:b,className:c,onClick:this.handleSelect.bind(this,b,null)})},renderIndicators:function(){var a=[];return h.forEach(this.props.children,function(b,c){a.push(this.renderIndicator(b,c)," ")},this),d.DOM.ol({className:"carousel-indicators"},a)},getActiveIndex:function(){return null!=this.props.activeIndex?this.props.activeIndex:this.state.activeIndex},handleItemAnimateOutEnd:function(){this.setState({previousActiveIndex:null,direction:null},function(){this.waitForNext(),this.props.onSlideEnd&&this.props.onSlideEnd()})},renderItem:function(a,b){var c=this.getActiveIndex(),d=b===c,e=null!=this.state.previousActiveIndex&&this.state.previousActiveIndex===b&&this.props.slide;return f(a,{active:d,ref:a.props.ref,key:null!=a.props.key?a.props.key:b,index:b,animateOut:e,animateIn:d&&null!=this.state.previousActiveIndex&&this.props.slide,direction:this.state.direction,onAnimateOutEnd:e?this.handleItemAnimateOutEnd:null})},handleSelect:function(a,b){clearTimeout(this.timeout);var c=this.getActiveIndex();if(b=b||this.getDirection(c,a),this.props.onSelect&&this.props.onSelect(a,b),null==this.props.activeIndex&&a!==c){if(null!=this.state.previousActiveIndex)return;this.setState({activeIndex:a,previousActiveIndex:c,direction:b})}}});c.exports=i}),d("utils/TransitionEvents",["require","exports","module"],function(a,b,c){function d(){var a=document.createElement("div"),b=a.style;"AnimationEvent"in window||delete h.animationend.animation,"TransitionEvent"in window||delete h.transitionend.transition;for(var c in h){var d=h[c];for(var e in d)if(e in b){i.push(d[e]);break}}}function e(a,b,c){a.addEventListener(b,c,!1)}function f(a,b,c){a.removeEventListener(b,c,!1)}var g=!("undefined"==typeof window||!window.document||!window.document.createElement),h={transitionend:{transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"mozTransitionEnd",OTransition:"oTransitionEnd",msTransition:"MSTransitionEnd"},animationend:{animation:"animationend",WebkitAnimation:"webkitAnimationEnd",MozAnimation:"mozAnimationEnd",OAnimation:"oAnimationEnd",msAnimation:"MSAnimationEnd"}},i=[];g&&d();var j={addEndEventListener:function(a,b){return 0===i.length?void window.setTimeout(b,0):void i.forEach(function(c){e(a,c,b)})},removeEndEventListener:function(a,b){0!==i.length&&i.forEach(function(c){f(a,c,b)})}};c.exports=j}),d("CarouselItem",["require","exports","module","react","./utils/classSet","./utils/TransitionEvents"],function(a,b,c){var d=a("react"),e=a("./utils/classSet"),f=a("./utils/TransitionEvents"),g=d.createClass({displayName:"CarouselItem",propTypes:{direction:d.PropTypes.oneOf(["prev","next"]),onAnimateOutEnd:d.PropTypes.func,active:d.PropTypes.bool,caption:d.PropTypes.renderable},getInitialState:function(){return{direction:null}},getDefaultProps:function(){return{animation:!0}},handleAnimateOutEnd:function(){this.props.onAnimateOutEnd&&this.isMounted()&&this.props.onAnimateOutEnd(this.props.index)},componentWillReceiveProps:function(a){this.props.active!==a.active&&this.setState({direction:null})},componentDidUpdate:function(a){!this.props.active&&a.active&&f.addEndEventListener(this.getDOMNode(),this.handleAnimateOutEnd),this.props.active!==a.active&&setTimeout(this.startAnimation,20)},startAnimation:function(){this.isMounted()&&this.setState({direction:"prev"===this.props.direction?"right":"left"})},render:function(){var a={item:!0,active:this.props.active&&!this.props.animateIn||this.props.animateOut,next:this.props.active&&this.props.animateIn&&"next"===this.props.direction,prev:this.props.active&&this.props.animateIn&&"prev"===this.props.direction};return this.state.direction&&(this.props.animateIn||this.props.animateOut)&&(a[this.state.direction]=!0),this.transferPropsTo(d.DOM.div({className:e(a)},this.props.children,this.props.caption?this.renderCaption():null))},renderCaption:function(){return d.DOM.div({className:"carousel-caption"},this.props.caption)}});c.exports=g}),d("Col",["require","exports","module","react","./utils/classSet","./utils/CustomPropTypes","./constants"],function(a,b,c){var d=a("react"),e=a("./utils/classSet"),f=a("./utils/CustomPropTypes"),g=a("./constants"),h=d.createClass({displayName:"Col",propTypes:{xs:d.PropTypes.number,sm:d.PropTypes.number,md:d.PropTypes.number,lg:d.PropTypes.number,xsOffset:d.PropTypes.number,smOffset:d.PropTypes.number,mdOffset:d.PropTypes.number,lgOffset:d.PropTypes.number,xsPush:d.PropTypes.number,smPush:d.PropTypes.number,mdPush:d.PropTypes.number,lgPush:d.PropTypes.number,xsPull:d.PropTypes.number,smPull:d.PropTypes.number,mdPull:d.PropTypes.number,lgPull:d.PropTypes.number,componentClass:f.componentClass.isRequired},getDefaultProps:function(){return{componentClass:d.DOM.div}},render:function(){var a=this.props.componentClass,b={};return Object.keys(g.SIZES).forEach(function(a){var c=g.SIZES[a],d=c,e=c+"-";this.props[d]&&(b["col-"+e+this.props[d]]=!0),d=c+"Offset",e=c+"-offset-",this.props[d]&&(b["col-"+e+this.props[d]]=!0),d=c+"Push",e=c+"-push-",this.props[d]&&(b["col-"+e+this.props[d]]=!0),d=c+"Pull",e=c+"-pull-",this.props[d]&&(b["col-"+e+this.props[d]]=!0)},this),this.transferPropsTo(a({className:e(b)},this.props.children))}});c.exports=h}),d("CollapsableMixin",["require","exports","module","react","./utils/TransitionEvents"],function(a,b,c){var d=a("react"),e=a("./utils/TransitionEvents"),f={propTypes:{collapsable:d.PropTypes.bool,defaultExpanded:d.PropTypes.bool,expanded:d.PropTypes.bool},getInitialState:function(){return{expanded:null!=this.props.defaultExpanded?this.props.defaultExpanded:null,collapsing:!1}},handleTransitionEnd:function(){this._collapseEnd=!0,this.setState({collapsing:!1})},componentWillReceiveProps:function(a){this.props.collapsable&&a.expanded!==this.props.expanded&&(this._collapseEnd=!1,this.setState({collapsing:!0}))},_addEndTransitionListener:function(){var a=this.getCollapsableDOMNode();a&&e.addEndEventListener(a,this.handleTransitionEnd)},_removeEndTransitionListener:function(){var a=this.getCollapsableDOMNode();a&&e.addEndEventListener(a,this.handleTransitionEnd)},componentDidMount:function(){this._afterRender()},componentWillUnmount:function(){this._removeEndTransitionListener()},componentWillUpdate:function(a){var b="function"==typeof this.getCollapsableDimension?this.getCollapsableDimension():"height",c=this.getCollapsableDOMNode();this._removeEndTransitionListener(),c&&a.expanded!==this.props.expanded&&this.props.expanded&&(c.style[b]=this.getCollapsableDimensionValue()+"px")},componentDidUpdate:function(a,b){this.state.collapsing!==b.collapsing&&this._afterRender()},_afterRender:function(){this.props.collapsable&&(this._addEndTransitionListener(),setTimeout(this._updateDimensionAfterRender,0))},_updateDimensionAfterRender:function(){var a="function"==typeof this.getCollapsableDimension?this.getCollapsableDimension():"height",b=this.getCollapsableDOMNode();b&&(b.style[a]=this.isExpanded()&&!this.state.collapsing?"auto":this.isExpanded()?this.getCollapsableDimensionValue()+"px":"0px")},isExpanded:function(){return null!=this.props.expanded?this.props.expanded:this.state.expanded},getCollapsableClassSet:function(a){var b={};return"string"==typeof a&&a.split(" ").forEach(function(a){a&&(b[a]=!0)}),b.collapsing=this.state.collapsing,b.collapse=!this.state.collapsing,b["in"]=this.isExpanded()&&!this.state.collapsing,b}};c.exports=f}),d("utils/createChainedFunction",["require","exports","module"],function(a,b,c){function d(a,b){var c="function"==typeof a,d="function"==typeof b;return c||d?c?d?function(){a.apply(this,arguments),b.apply(this,arguments)}:a:b:null}c.exports=d}),d("DropdownStateMixin",["require","exports","module","react","./utils/EventListener"],function(a,b,c){function d(a,b){for(;a;){if(a===b)return!0;a=a.parentNode}return!1}var e=(a("react"),a("./utils/EventListener")),f={getInitialState:function(){return{open:!1}},setDropdownState:function(a,b){a?this.bindRootCloseHandlers():this.unbindRootCloseHandlers(),this.setState({open:a},b)},handleDocumentKeyUp:function(a){27===a.keyCode&&this.setDropdownState(!1)},handleDocumentClick:function(a){d(a.target,this.getDOMNode())||this.setDropdownState(!1)},bindRootCloseHandlers:function(){this._onDocumentClickListener=e.listen(document,"click",this.handleDocumentClick),this._onDocumentKeyupListener=e.listen(document,"keyup",this.handleDocumentKeyUp)},unbindRootCloseHandlers:function(){this._onDocumentClickListener&&this._onDocumentClickListener.remove(),this._onDocumentKeyupListener&&this._onDocumentKeyupListener.remove()},componentWillUnmount:function(){this.unbindRootCloseHandlers()}};c.exports=f}),d("DropdownMenu",["require","exports","module","react","./utils/classSet","./utils/cloneWithProps","./utils/createChainedFunction","./utils/ValidComponentChildren"],function(a,b,c){var d=a("react"),e=a("./utils/classSet"),f=a("./utils/cloneWithProps"),g=a("./utils/createChainedFunction"),h=a("./utils/ValidComponentChildren"),i=d.createClass({displayName:"DropdownMenu",propTypes:{pullRight:d.PropTypes.bool,onSelect:d.PropTypes.func},render:function(){var a={"dropdown-menu":!0,"dropdown-menu-right":this.props.pullRight};return this.transferPropsTo(d.DOM.ul({className:e(a),role:"menu"},h.map(this.props.children,this.renderMenuItem)))},renderMenuItem:function(a){return f(a,{onSelect:g(a.props.onSelect,this.props.onSelect),key:a.props.key,ref:a.props.ref})}});c.exports=i}),d("DropdownButton",["require","exports","module","react","./utils/classSet","./utils/cloneWithProps","./utils/createChainedFunction","./BootstrapMixin","./DropdownStateMixin","./Button","./ButtonGroup","./DropdownMenu","./utils/ValidComponentChildren"],function(a,b,c){var d=a("react"),e=a("./utils/classSet"),f=a("./utils/cloneWithProps"),g=a("./utils/createChainedFunction"),h=a("./BootstrapMixin"),i=a("./DropdownStateMixin"),j=a("./Button"),k=a("./ButtonGroup"),l=a("./DropdownMenu"),m=a("./utils/ValidComponentChildren"),n=d.createClass({displayName:"DropdownButton",mixins:[h,i],propTypes:{pullRight:d.PropTypes.bool,dropup:d.PropTypes.bool,title:d.PropTypes.renderable,href:d.PropTypes.string,onClick:d.PropTypes.func,onSelect:d.PropTypes.func,navItem:d.PropTypes.bool},render:function(){var a="dropdown-toggle",b=this.props.navItem?"renderNavItem":"renderButtonGroup";return this[b]([this.transferPropsTo(j({ref:"dropdownButton",className:a,onClick:this.handleDropdownClick,key:0,navDropdown:this.props.navItem,navItem:null,title:null,pullRight:null,dropup:null},this.props.title," ",d.DOM.span({className:"caret"}))),l({ref:"menu","aria-labelledby":this.props.id,pullRight:this.props.pullRight,key:1},m.map(this.props.children,this.renderMenuItem))])},renderButtonGroup:function(a){var b={open:this.state.open,dropup:this.props.dropup};return k({bsSize:this.props.bsSize,className:e(b)},a)},renderNavItem:function(a){var b={dropdown:!0,open:this.state.open,dropup:this.props.dropup};return d.DOM.li({className:e(b)},a)},renderMenuItem:function(a){var b=this.props.onSelect||a.props.onSelect?this.handleOptionSelect:null;return f(a,{onSelect:g(a.props.onSelect,b),key:a.props.key,ref:a.props.ref})},handleDropdownClick:function(a){a.preventDefault(),this.setDropdownState(!this.state.open)},handleOptionSelect:function(a){this.props.onSelect&&this.props.onSelect(a),this.setDropdownState(!1)}});c.exports=n}),d("FadeMixin",["require","exports","module","react"],function(a,b,c){a("react");
3
- c.exports={_fadeIn:function(){var a;this.isMounted()&&(a=this.getDOMNode().querySelectorAll(".fade"),a.length&&Array.prototype.forEach.call(a,function(a){a.className+=" in"}))},_fadeOut:function(){var a=this._fadeOutEl.querySelectorAll(".fade.in");a.length&&Array.prototype.forEach.call(a,function(a){a.className=a.className.replace(/\bin\b/,"")}),setTimeout(this._handleFadeOutEnd,300)},_handleFadeOutEnd:function(){this._fadeOutEl&&this._fadeOutEl.parentNode&&this._fadeOutEl.parentNode.removeChild(this._fadeOutEl)},componentDidMount:function(){document.querySelectorAll&&setTimeout(this._fadeIn,20)},componentWillUnmount:function(){var a=this.getDOMNode().querySelectorAll(".fade");a.length&&(this._fadeOutEl=document.createElement("div"),document.body.appendChild(this._fadeOutEl),this._fadeOutEl.appendChild(this.getDOMNode().cloneNode(!0)),setTimeout(this._fadeOut,20))}}}),d("Glyphicon",["require","exports","module","react","./utils/classSet","./BootstrapMixin","./constants"],function(a,b,c){var d=a("react"),e=a("./utils/classSet"),f=a("./BootstrapMixin"),g=a("./constants"),h=d.createClass({displayName:"Glyphicon",mixins:[f],propTypes:{glyph:d.PropTypes.oneOf(g.GLYPHS).isRequired},getDefaultProps:function(){return{bsClass:"glyphicon"}},render:function(){var a=this.getBsClassSet();return a["glyphicon-"+this.props.glyph]=!0,this.transferPropsTo(d.DOM.span({className:e(a)},this.props.children))}});c.exports=h}),d("Grid",["require","exports","module","react","./utils/CustomPropTypes"],function(a,b,c){var d=a("react"),e=a("./utils/CustomPropTypes"),f=d.createClass({displayName:"Grid",propTypes:{fluid:d.PropTypes.bool,componentClass:e.componentClass.isRequired},getDefaultProps:function(){return{componentClass:d.DOM.div}},render:function(){var a=this.props.componentClass;return this.transferPropsTo(a({className:this.props.fluid?"container-fluid":"container"},this.props.children))}});c.exports=f}),d("Input",["require","exports","module","react","./utils/classSet","./Button"],function(a,b,c){var d=a("react"),e=a("./utils/classSet"),f=a("./Button"),g=d.createClass({displayName:"Input",propTypes:{type:d.PropTypes.string,label:d.PropTypes.renderable,help:d.PropTypes.renderable,addonBefore:d.PropTypes.renderable,addonAfter:d.PropTypes.renderable,bsStyle:function(a){return"submit"!==a.type?d.PropTypes.oneOf(["success","warning","error"]).apply(null,arguments):void 0},hasFeedback:d.PropTypes.bool,groupClassName:d.PropTypes.string,wrapperClassName:d.PropTypes.string,labelClassName:d.PropTypes.string},getInputDOMNode:function(){return this.refs.input.getDOMNode()},getValue:function(){if("static"===this.props.type)return this.props.value;if(this.props.type)return this.getInputDOMNode().value;throw Error("Cannot use getValue without specifying input type.")},getChecked:function(){return this.getInputDOMNode().checked},isCheckboxOrRadio:function(){return"radio"===this.props.type||"checkbox"===this.props.type},renderInput:function(){var a=null;if(!this.props.type)return this.props.children;switch(this.props.type){case"select":a=d.DOM.select({className:"form-control",ref:"input",key:"input"},this.props.children);break;case"textarea":a=d.DOM.textarea({className:"form-control",ref:"input",key:"input"});break;case"static":a=d.DOM.p({className:"form-control-static",ref:"input",key:"input"},this.props.value);break;case"submit":a=this.transferPropsTo(f({componentClass:d.DOM.input}));break;default:var b=this.isCheckboxOrRadio()?"":"form-control";a=d.DOM.input({className:b,ref:"input",key:"input"})}return this.transferPropsTo(a)},renderInputGroup:function(a){var b=this.props.addonBefore?d.DOM.span({className:"input-group-addon",key:"addonBefore"},this.props.addonBefore):null,c=this.props.addonAfter?d.DOM.span({className:"input-group-addon",key:"addonAfter"},this.props.addonAfter):null;return b||c?d.DOM.div({className:"input-group",key:"input-group"},b,a,c):a},renderIcon:function(){var a={glyphicon:!0,"form-control-feedback":!0,"glyphicon-ok":"success"===this.props.bsStyle,"glyphicon-warning-sign":"warning"===this.props.bsStyle,"glyphicon-remove":"error"===this.props.bsStyle};return this.props.hasFeedback?d.DOM.span({className:e(a),key:"icon"}):null},renderHelp:function(){return this.props.help?d.DOM.span({className:"help-block",key:"help"},this.props.help):null},renderCheckboxandRadioWrapper:function(a){var b={checkbox:"checkbox"===this.props.type,radio:"radio"===this.props.type};return d.DOM.div({className:e(b),key:"checkboxRadioWrapper"},a)},renderWrapper:function(a){return this.props.wrapperClassName?d.DOM.div({className:this.props.wrapperClassName,key:"wrapper"},a):a},renderLabel:function(a){var b={"control-label":!this.isCheckboxOrRadio()};return b[this.props.labelClassName]=this.props.labelClassName,this.props.label?d.DOM.label({htmlFor:this.props.id,className:e(b),key:"label"},a,this.props.label):a},renderFormGroup:function(a){var b={"form-group":!0,"has-feedback":this.props.hasFeedback,"has-success":"success"===this.props.bsStyle,"has-warning":"warning"===this.props.bsStyle,"has-error":"error"===this.props.bsStyle};return b[this.props.groupClassName]=this.props.groupClassName,d.DOM.div({className:e(b)},a)},render:function(){return this.renderFormGroup(this.isCheckboxOrRadio()?this.renderWrapper([this.renderCheckboxandRadioWrapper(this.renderLabel(this.renderInput())),this.renderHelp()]):[this.renderLabel(),this.renderWrapper([this.renderInputGroup(this.renderInput()),this.renderIcon(),this.renderHelp()])])}});c.exports=g}),d("Interpolate",["require","exports","module","react","./utils/merge","./utils/ValidComponentChildren"],function(a,b,c){var d=a("react"),e=a("./utils/merge"),f=a("./utils/ValidComponentChildren"),g=/\%\((.+?)\)s/,h=d.createClass({displayName:"Interpolate",propTypes:{format:d.PropTypes.string},getDefaultProps:function(){return{component:d.DOM.span}},render:function(){var a=f.hasValidComponent(this.props.children)?this.props.children:this.props.format,b=this.props.component,c=this.props.unsafe===!0,h=e(this.props);if(delete h.children,delete h.format,delete h.component,delete h.unsafe,c){var i=a.split(g).reduce(function(a,b,c){var e;if(c%2===0?e=b:(e=h[b],delete h[b]),d.isValidComponent(e))throw new Error("cannot interpolate a React component into unsafe text");return a+=e},"");return h.dangerouslySetInnerHTML={__html:i},b(h)}var j=a.split(g).reduce(function(a,b,c){var d;if(c%2===0){if(0===b.length)return a;d=b}else d=h[b],delete h[b];return a.push(d),a},[h]);return b.apply(null,j)}});c.exports=h}),d("Jumbotron",["require","exports","module","react"],function(a,b,c){var d=a("react"),e=d.createClass({displayName:"Jumbotron",render:function(){return this.transferPropsTo(d.DOM.div({className:"jumbotron"},this.props.children))}});c.exports=e}),d("Label",["require","exports","module","react","./utils/classSet","./BootstrapMixin"],function(a,b,c){var d=a("react"),e=a("./utils/classSet"),f=a("./BootstrapMixin"),g=d.createClass({displayName:"Label",mixins:[f],getDefaultProps:function(){return{bsClass:"label",bsStyle:"default"}},render:function(){var a=this.getBsClassSet();return this.transferPropsTo(d.DOM.span({className:e(a)},this.props.children))}});c.exports=g}),d("ListGroup",["require","exports","module","react","./utils/classSet","./utils/cloneWithProps","./utils/ValidComponentChildren","./utils/createChainedFunction"],function(a,b,c){var d=a("react"),e=(a("./utils/classSet"),a("./utils/cloneWithProps")),f=a("./utils/ValidComponentChildren"),g=a("./utils/createChainedFunction"),h=d.createClass({displayName:"ListGroup",propTypes:{onClick:d.PropTypes.func},render:function(){return d.DOM.div({className:"list-group"},f.map(this.props.children,this.renderListItem))},renderListItem:function(a){return e(a,{onClick:g(a.props.onClick,this.props.onClick),ref:a.props.ref,key:a.props.key})}});c.exports=h}),d("ListGroupItem",["require","exports","module","react","./BootstrapMixin","./utils/classSet","./utils/cloneWithProps","./utils/ValidComponentChildren"],function(a,b,c){var d=a("react"),e=a("./BootstrapMixin"),f=a("./utils/classSet"),g=a("./utils/cloneWithProps"),h=(a("./utils/ValidComponentChildren"),d.createClass({displayName:"ListGroupItem",mixins:[e],propTypes:{bsStyle:d.PropTypes.oneOf(["danger","info","success","warning"]),active:d.PropTypes.any,disabled:d.PropTypes.any,header:d.PropTypes.renderable,onClick:d.PropTypes.func},getDefaultProps:function(){return{bsClass:"list-group-item"}},render:function(){var a=this.getBsClassSet();return a.active=this.props.active,a.disabled=this.props.disabled,this.props.href||this.props.onClick?this.renderAnchor(a):this.renderSpan(a)},renderSpan:function(a){return this.transferPropsTo(d.DOM.span({className:f(a)},this.props.header?this.renderStructuredContent():this.props.children))},renderAnchor:function(a){return this.transferPropsTo(d.DOM.a({className:f(a),onClick:this.handleClick},this.props.header?this.renderStructuredContent():this.props.children))},renderStructuredContent:function(){var a;a=d.isValidComponent(this.props.header)?g(this.props.header,{className:"list-group-item-heading"}):d.DOM.h4({className:"list-group-item-heading"},this.props.header);var b=d.DOM.p({className:"list-group-item-text"},this.props.children);return{header:a,content:b}},handleClick:function(a){this.props.onClick&&(a.preventDefault(),this.props.onClick(this.props.key,this.props.href))}}));c.exports=h}),d("MenuItem",["require","exports","module","react","./utils/classSet"],function(a,b,c){var d=a("react"),e=a("./utils/classSet"),f=d.createClass({displayName:"MenuItem",propTypes:{header:d.PropTypes.bool,divider:d.PropTypes.bool,href:d.PropTypes.string,title:d.PropTypes.string,onSelect:d.PropTypes.func},getDefaultProps:function(){return{href:"#"}},handleClick:function(a){this.props.onSelect&&(a.preventDefault(),this.props.onSelect(this.props.key))},renderAnchor:function(){return d.DOM.a({onClick:this.handleClick,href:this.props.href,title:this.props.title,tabIndex:"-1"},this.props.children)},render:function(){var a={"dropdown-header":this.props.header,divider:this.props.divider},b=null;return this.props.header?b=this.props.children:this.props.divider||(b=this.renderAnchor()),this.transferPropsTo(d.DOM.li({role:"presentation",title:null,href:null,className:e(a)},b))}});c.exports=f}),d("Modal",["require","exports","module","react","./utils/classSet","./BootstrapMixin","./FadeMixin","./utils/EventListener"],function(a,b,c){var d=a("react"),e=a("./utils/classSet"),f=a("./BootstrapMixin"),g=a("./FadeMixin"),h=a("./utils/EventListener"),i=d.createClass({displayName:"Modal",mixins:[f,g],propTypes:{title:d.PropTypes.renderable,backdrop:d.PropTypes.oneOf(["static",!0,!1]),keyboard:d.PropTypes.bool,closeButton:d.PropTypes.bool,animation:d.PropTypes.bool,onRequestHide:d.PropTypes.func.isRequired},getDefaultProps:function(){return{bsClass:"modal",backdrop:!0,keyboard:!0,animation:!0,closeButton:!0}},render:function(){var a={display:"block"},b=this.getBsClassSet();delete b.modal,b["modal-dialog"]=!0;var c={modal:!0,fade:this.props.animation,"in":!this.props.animation||!document.querySelectorAll},f=this.transferPropsTo(d.DOM.div({title:null,tabIndex:"-1",role:"dialog",style:a,className:e(c),onClick:this.props.backdrop===!0?this.handleBackdropClick:null,ref:"modal"},d.DOM.div({className:e(b)},d.DOM.div({className:"modal-content"},this.props.title?this.renderHeader():null,this.props.children))));return this.props.backdrop?this.renderBackdrop(f):f},renderBackdrop:function(a){var b={"modal-backdrop":!0,fade:this.props.animation};b["in"]=!this.props.animation||!document.querySelectorAll;var c=this.props.backdrop===!0?this.handleBackdropClick:null;return d.DOM.div(null,d.DOM.div({className:e(b),ref:"backdrop",onClick:c}),a)},renderHeader:function(){var a;return this.props.closeButton&&(a=d.DOM.button({type:"button",className:"close","aria-hidden":"true",onClick:this.props.onRequestHide},"×")),d.DOM.div({className:"modal-header"},a,this.renderTitle())},renderTitle:function(){return d.isValidComponent(this.props.title)?this.props.title:d.DOM.h4({className:"modal-title"},this.props.title)},iosClickHack:function(){this.refs.modal.getDOMNode().onclick=function(){},this.refs.backdrop.getDOMNode().onclick=function(){}},componentDidMount:function(){this._onDocumentKeyupListener=h.listen(document,"keyup",this.handleDocumentKeyUp),this.props.backdrop&&this.iosClickHack()},componentDidUpdate:function(a){this.props.backdrop&&this.props.backdrop!==a.backdrop&&this.iosClickHack()},componentWillUnmount:function(){this._onDocumentKeyupListener.remove()},handleBackdropClick:function(a){a.target===a.currentTarget&&this.props.onRequestHide()},handleDocumentKeyUp:function(a){this.props.keyboard&&27===a.keyCode&&this.props.onRequestHide()}});c.exports=i}),d("Nav",["require","exports","module","react","./BootstrapMixin","./CollapsableMixin","./utils/classSet","./utils/domUtils","./utils/cloneWithProps","./utils/ValidComponentChildren","./utils/createChainedFunction"],function(a,b,c){var d=a("react"),e=a("./BootstrapMixin"),f=a("./CollapsableMixin"),g=a("./utils/classSet"),h=a("./utils/domUtils"),i=a("./utils/cloneWithProps"),j=a("./utils/ValidComponentChildren"),k=a("./utils/createChainedFunction"),l=d.createClass({displayName:"Nav",mixins:[e,f],propTypes:{bsStyle:d.PropTypes.oneOf(["tabs","pills"]),stacked:d.PropTypes.bool,justified:d.PropTypes.bool,onSelect:d.PropTypes.func,collapsable:d.PropTypes.bool,expanded:d.PropTypes.bool,navbar:d.PropTypes.bool},getDefaultProps:function(){return{bsClass:"nav"}},getCollapsableDOMNode:function(){return this.getDOMNode()},getCollapsableDimensionValue:function(){var a=this.refs.ul.getDOMNode(),b=a.offsetHeight,c=h.getComputedStyles(a);return b+parseInt(c.marginTop,10)+parseInt(c.marginBottom,10)},render:function(){var a=this.props.collapsable?this.getCollapsableClassSet():{};return a["navbar-collapse"]=this.props.collapsable,this.transferPropsTo(this.props.navbar&&!this.props.collapsable?this.renderUl():d.DOM.nav({className:g(a)},this.renderUl()))},renderUl:function(){var a=this.getBsClassSet();return a["nav-stacked"]=this.props.stacked,a["nav-justified"]=this.props.justified,a["navbar-nav"]=this.props.navbar,a["pull-right"]=this.props.pullRight,d.DOM.ul({className:g(a),ref:"ul"},j.map(this.props.children,this.renderNavItem))},getChildActiveProp:function(a){return a.props.active?!0:null!=this.props.activeKey&&a.props.key===this.props.activeKey?!0:null!=this.props.activeHref&&a.props.href===this.props.activeHref?!0:a.props.active},renderNavItem:function(a){return i(a,{active:this.getChildActiveProp(a),activeKey:this.props.activeKey,activeHref:this.props.activeHref,onSelect:k(a.props.onSelect,this.props.onSelect),ref:a.props.ref,key:a.props.key,navItem:!0})}});c.exports=l}),d("Navbar",["require","exports","module","react","./BootstrapMixin","./utils/CustomPropTypes","./utils/classSet","./utils/cloneWithProps","./utils/ValidComponentChildren","./utils/createChainedFunction","./Nav"],function(a,b,c){var d=a("react"),e=a("./BootstrapMixin"),f=a("./utils/CustomPropTypes"),g=a("./utils/classSet"),h=a("./utils/cloneWithProps"),i=a("./utils/ValidComponentChildren"),j=a("./utils/createChainedFunction"),k=(a("./Nav"),d.createClass({displayName:"Navbar",mixins:[e],propTypes:{fixedTop:d.PropTypes.bool,fixedBottom:d.PropTypes.bool,staticTop:d.PropTypes.bool,inverse:d.PropTypes.bool,fluid:d.PropTypes.bool,role:d.PropTypes.string,componentClass:f.componentClass.isRequired,brand:d.PropTypes.renderable,toggleButton:d.PropTypes.renderable,onToggle:d.PropTypes.func,navExpanded:d.PropTypes.bool,defaultNavExpanded:d.PropTypes.bool},getDefaultProps:function(){return{bsClass:"navbar",bsStyle:"default",role:"navigation",componentClass:d.DOM.nav}},getInitialState:function(){return{navExpanded:this.props.defaultNavExpanded}},shouldComponentUpdate:function(){return!this._isChanging},handleToggle:function(){this.props.onToggle&&(this._isChanging=!0,this.props.onToggle(),this._isChanging=!1),this.setState({navOpen:!this.state.navOpen})},isNavOpen:function(){return null!=this.props.navOpen?this.props.navOpen:this.state.navOpen},render:function(){var a=this.getBsClassSet(),b=this.props.componentClass;return a["navbar-fixed-top"]=this.props.fixedTop,a["navbar-fixed-bottom"]=this.props.fixedBottom,a["navbar-static-top"]=this.props.staticTop,a["navbar-inverse"]=this.props.inverse,this.transferPropsTo(b({className:g(a)},d.DOM.div({className:this.props.fluid?"container-fluid":"container"},this.props.brand||this.props.toggleButton||this.props.toggleNavKey?this.renderHeader():null,i.map(this.props.children,this.renderChild))))},renderChild:function(a){return h(a,{navbar:!0,collapsable:null!=this.props.toggleNavKey&&this.props.toggleNavKey===a.props.key,expanded:null!=this.props.toggleNavKey&&this.props.toggleNavKey===a.props.key&&this.isNavOpen(),key:a.props.key,ref:a.props.ref})},renderHeader:function(){var a;return this.props.brand&&(a=d.isValidComponent(this.props.brand)?h(this.props.brand,{className:"navbar-brand"}):d.DOM.span({className:"navbar-brand"},this.props.brand)),d.DOM.div({className:"navbar-header"},a,this.props.toggleButton||null!=this.props.toggleNavKey?this.renderToggleButton():null)},renderToggleButton:function(){var a;return d.isValidComponent(this.props.toggleButton)?h(this.props.toggleButton,{className:"navbar-toggle",onClick:j(this.handleToggle,this.props.toggleButton.props.onClick)}):(a=null!=this.props.toggleButton?this.props.toggleButton:[d.DOM.span({className:"sr-only",key:0},"Toggle navigation"),d.DOM.span({className:"icon-bar",key:1}),d.DOM.span({className:"icon-bar",key:2}),d.DOM.span({className:"icon-bar",key:3})],d.DOM.button({className:"navbar-toggle",type:"button",onClick:this.handleToggle},a))}}));c.exports=k}),d("NavItem",["require","exports","module","react","./utils/classSet","./BootstrapMixin"],function(a,b,c){var d=a("react"),e=a("./utils/classSet"),f=a("./BootstrapMixin"),g=d.createClass({displayName:"NavItem",mixins:[f],propTypes:{onSelect:d.PropTypes.func,active:d.PropTypes.bool,disabled:d.PropTypes.bool,href:d.PropTypes.string,title:d.PropTypes.string},getDefaultProps:function(){return{href:"#"}},render:function(){var a={active:this.props.active,disabled:this.props.disabled};return this.transferPropsTo(d.DOM.li({className:e(a)},d.DOM.a({href:this.props.href,title:this.props.title,onClick:this.handleClick,ref:"anchor"},this.props.children)))},handleClick:function(a){this.props.onSelect&&(a.preventDefault(),this.props.disabled||this.props.onSelect(this.props.key,this.props.href))}});c.exports=g}),d("OverlayMixin",["require","exports","module","react","./utils/CustomPropTypes"],function(a,b,c){var d=a("react"),e=a("./utils/CustomPropTypes");c.exports={propTypes:{container:e.mountable},getDefaultProps:function(){return{container:{getDOMNode:function(){return document.body}}}},componentWillUnmount:function(){this._unrenderOverlay(),this._overlayTarget&&(this.getContainerDOMNode().removeChild(this._overlayTarget),this._overlayTarget=null)},componentDidUpdate:function(){this._renderOverlay()},componentDidMount:function(){this._renderOverlay()},_mountOverlayTarget:function(){this._overlayTarget=document.createElement("div"),this.getContainerDOMNode().appendChild(this._overlayTarget)},_renderOverlay:function(){this._overlayTarget||this._mountOverlayTarget(),this._overlayInstance=d.renderComponent(this.renderOverlay(),this._overlayTarget)},_unrenderOverlay:function(){d.unmountComponentAtNode(this._overlayTarget),this._overlayInstance=null},getOverlayDOMNode:function(){if(!this.isMounted())throw new Error("getOverlayDOMNode(): A component must be mounted to have a DOM node.");return this._overlayInstance.getDOMNode()},getContainerDOMNode:function(){return this.props.container.getDOMNode?this.props.container.getDOMNode():this.props.container}}}),d("ModalTrigger",["require","exports","module","react","./OverlayMixin","./utils/cloneWithProps","./utils/createChainedFunction"],function(a,b,c){var d=a("react"),e=a("./OverlayMixin"),f=a("./utils/cloneWithProps"),g=a("./utils/createChainedFunction"),h=d.createClass({displayName:"ModalTrigger",mixins:[e],propTypes:{modal:d.PropTypes.renderable.isRequired},getInitialState:function(){return{isOverlayShown:!1}},show:function(){this.setState({isOverlayShown:!0})},hide:function(){this.setState({isOverlayShown:!1})},toggle:function(){this.setState({isOverlayShown:!this.state.isOverlayShown})},renderOverlay:function(){return this.state.isOverlayShown?f(this.props.modal,{onRequestHide:this.hide}):d.DOM.span(null)},render:function(){var a=d.Children.only(this.props.children);return f(a,{onClick:g(a.props.onClick,this.toggle)})}});c.exports=h}),d("OverlayTrigger",["require","exports","module","react","./OverlayMixin","./utils/domUtils","./utils/cloneWithProps","./utils/createChainedFunction","./utils/merge"],function(a,b,c){function d(a,b){return Array.isArray(b)?b.indexOf(a)>=0:a===b}var e=a("react"),f=a("./OverlayMixin"),g=a("./utils/domUtils"),h=a("./utils/cloneWithProps"),i=a("./utils/createChainedFunction"),j=a("./utils/merge"),k=e.createClass({displayName:"OverlayTrigger",mixins:[f],propTypes:{trigger:e.PropTypes.oneOfType([e.PropTypes.oneOf(["manual","click","hover","focus"]),e.PropTypes.arrayOf(e.PropTypes.oneOf(["click","hover","focus"]))]),placement:e.PropTypes.oneOf(["top","right","bottom","left"]),delay:e.PropTypes.number,delayShow:e.PropTypes.number,delayHide:e.PropTypes.number,defaultOverlayShown:e.PropTypes.bool,overlay:e.PropTypes.renderable.isRequired},getDefaultProps:function(){return{placement:"right",trigger:["hover","focus"]}},getInitialState:function(){return{isOverlayShown:null==this.props.defaultOverlayShown?!1:this.props.defaultOverlayShown,overlayLeft:null,overlayTop:null}},show:function(){this.setState({isOverlayShown:!0},function(){this.updateOverlayPosition()})},hide:function(){this.setState({isOverlayShown:!1})},toggle:function(){this.state.isOverlayShown?this.hide():this.show()},renderOverlay:function(){return this.state.isOverlayShown?h(this.props.overlay,{onRequestHide:this.hide,placement:this.props.placement,positionLeft:this.state.overlayLeft,positionTop:this.state.overlayTop}):e.DOM.span(null)},render:function(){if("manual"===this.props.trigger)return e.Children.only(this.props.children);var a={};return d("click",this.props.trigger)&&(a.onClick=i(this.toggle,this.props.onClick)),d("hover",this.props.trigger)&&(a.onMouseOver=i(this.handleDelayedShow,this.props.onMouseOver),a.onMouseOut=i(this.handleDelayedHide,this.props.onMouseOut)),d("focus",this.props.trigger)&&(a.onFocus=i(this.handleDelayedShow,this.props.onFocus),a.onBlur=i(this.handleDelayedHide,this.props.onBlur)),h(e.Children.only(this.props.children),a)},componentWillUnmount:function(){clearTimeout(this._hoverDelay)},handleDelayedShow:function(){if(null!=this._hoverDelay)return clearTimeout(this._hoverDelay),void(this._hoverDelay=null);var a=null!=this.props.delayShow?this.props.delayShow:this.props.delay;return a?void(this._hoverDelay=setTimeout(function(){this._hoverDelay=null,this.show()}.bind(this),a)):void this.show()},handleDelayedHide:function(){if(null!=this._hoverDelay)return clearTimeout(this._hoverDelay),void(this._hoverDelay=null);var a=null!=this.props.delayHide?this.props.delayHide:this.props.delay;return a?void(this._hoverDelay=setTimeout(function(){this._hoverDelay=null,this.hide()}.bind(this),a)):void this.hide()},updateOverlayPosition:function(){if(this.isMounted()){var a=this.calcOverlayPosition();this.setState({overlayLeft:a.left,overlayTop:a.top})}},calcOverlayPosition:function(){var a=this.getPosition(),b=this.getOverlayDOMNode(),c=b.offsetHeight,d=b.offsetWidth;switch(this.props.placement){case"right":return{top:a.top+a.height/2-c/2,left:a.left+a.width};case"left":return{top:a.top+a.height/2-c/2,left:a.left-d};case"top":return{top:a.top-c,left:a.left+a.width/2-d/2};case"bottom":return{top:a.top+a.height,left:a.left+a.width/2-d/2};default:throw new Error('calcOverlayPosition(): No such placement of "'+this.props.placement+'" found.')}},getPosition:function(){var a=this.getDOMNode(),b=this.getContainerDOMNode(),c="BODY"==b.tagName?g.getOffset(a):g.getPosition(a,b);return j(c,{height:a.offsetHeight,width:a.offsetWidth})}});c.exports=k}),d("PageHeader",["require","exports","module","react"],function(a,b,c){var d=a("react"),e=d.createClass({displayName:"PageHeader",render:function(){return this.transferPropsTo(d.DOM.div({className:"page-header"},d.DOM.h1(null,this.props.children)))}});c.exports=e}),d("Panel",["require","exports","module","react","./utils/classSet","./utils/cloneWithProps","./BootstrapMixin","./CollapsableMixin"],function(a,b,c){var d=a("react"),e=a("./utils/classSet"),f=a("./utils/cloneWithProps"),g=a("./BootstrapMixin"),h=a("./CollapsableMixin"),i=d.createClass({displayName:"Panel",mixins:[g,h],propTypes:{onSelect:d.PropTypes.func,header:d.PropTypes.renderable,footer:d.PropTypes.renderable},getDefaultProps:function(){return{bsClass:"panel",bsStyle:"default"}},handleSelect:function(a){this.props.onSelect&&(this._isChanging=!0,this.props.onSelect(this.props.key),this._isChanging=!1),a.preventDefault(),this.setState({expanded:!this.state.expanded})},shouldComponentUpdate:function(){return!this._isChanging},getCollapsableDimensionValue:function(){return this.refs.body.getDOMNode().offsetHeight},getCollapsableDOMNode:function(){return this.isMounted()&&this.refs&&this.refs.panel?this.refs.panel.getDOMNode():null},render:function(){var a=this.getBsClassSet();return a.panel=!0,this.transferPropsTo(d.DOM.div({className:e(a),id:this.props.collapsable?null:this.props.id,onSelect:null},this.renderHeading(),this.props.collapsable?this.renderCollapsableBody():this.renderBody(),this.renderFooter()))},renderCollapsableBody:function(){return d.DOM.div({className:e(this.getCollapsableClassSet("panel-collapse")),id:this.props.id,ref:"panel"},this.renderBody())},renderBody:function(){return d.DOM.div({className:"panel-body",ref:"body"},this.props.children)},renderHeading:function(){var a=this.props.header;return a?(a=!d.isValidComponent(a)||Array.isArray(a)?this.props.collapsable?this.renderCollapsableTitle(a):a:this.props.collapsable?f(a,{className:"panel-title",children:this.renderAnchor(a.props.children)}):f(a,{className:"panel-title"}),d.DOM.div({className:"panel-heading"},a)):null},renderAnchor:function(a){return d.DOM.a({href:"#"+(this.props.id||""),className:this.isExpanded()?null:"collapsed",onClick:this.handleSelect},a)},renderCollapsableTitle:function(a){return d.DOM.h4({className:"panel-title"},this.renderAnchor(a))},renderFooter:function(){return this.props.footer?d.DOM.div({className:"panel-footer"},this.props.footer):null}});c.exports=i}),d("PageItem",["require","exports","module","react","./utils/classSet"],function(a,b,c){var d=a("react"),e=a("./utils/classSet"),f=d.createClass({displayName:"PageItem",propTypes:{disabled:d.PropTypes.bool,previous:d.PropTypes.bool,next:d.PropTypes.bool,onSelect:d.PropTypes.func},getDefaultProps:function(){return{href:"#"}},render:function(){var a={disabled:this.props.disabled,previous:this.props.previous,next:this.props.next};return this.transferPropsTo(d.DOM.li({className:e(a)},d.DOM.a({href:this.props.href,title:this.props.title,onClick:this.handleSelect,ref:"anchor"},this.props.children)))},handleSelect:function(a){this.props.onSelect&&(a.preventDefault(),this.props.disabled||this.props.onSelect(this.props.key,this.props.href))}});c.exports=f}),d("Pager",["require","exports","module","react","./utils/cloneWithProps","./utils/ValidComponentChildren","./utils/createChainedFunction"],function(a,b,c){var d=a("react"),e=a("./utils/cloneWithProps"),f=a("./utils/ValidComponentChildren"),g=a("./utils/createChainedFunction"),h=d.createClass({displayName:"Pager",propTypes:{onSelect:d.PropTypes.func},render:function(){return this.transferPropsTo(d.DOM.ul({className:"pager"},f.map(this.props.children,this.renderPageItem)))},renderPageItem:function(a){return e(a,{onSelect:g(a.props.onSelect,this.props.onSelect),ref:a.props.ref,key:a.props.key})}});c.exports=h}),d("Popover",["require","exports","module","react","./utils/classSet","./BootstrapMixin"],function(a,b,c){var d=a("react"),e=a("./utils/classSet"),f=a("./BootstrapMixin"),g=d.createClass({displayName:"Popover",mixins:[f],propTypes:{placement:d.PropTypes.oneOf(["top","right","bottom","left"]),positionLeft:d.PropTypes.number,positionTop:d.PropTypes.number,arrowOffsetLeft:d.PropTypes.number,arrowOffsetTop:d.PropTypes.number,title:d.PropTypes.renderable},getDefaultProps:function(){return{placement:"right"}},render:function(){var a={};a.popover=!0,a[this.props.placement]=!0,a["in"]=null!=this.props.positionLeft||null!=this.props.positionTop;var b={};b.left=this.props.positionLeft,b.top=this.props.positionTop,b.display="block";var c={};return c.left=this.props.arrowOffsetLeft,c.top=this.props.arrowOffsetTop,this.transferPropsTo(d.DOM.div({className:e(a),style:b,title:null},d.DOM.div({className:"arrow",style:c}),this.props.title?this.renderTitle():null,d.DOM.div({className:"popover-content"},this.props.children)))},renderTitle:function(){return d.DOM.h3({className:"popover-title"},this.props.title)}});c.exports=g}),d("ProgressBar",["require","exports","module","react","./Interpolate","./BootstrapMixin","./utils/classSet","./utils/cloneWithProps","./utils/ValidComponentChildren"],function(a,b,c){var d=a("react"),e=a("./Interpolate"),f=a("./BootstrapMixin"),g=a("./utils/classSet"),h=a("./utils/cloneWithProps"),i=a("./utils/ValidComponentChildren"),j=d.createClass({displayName:"ProgressBar",propTypes:{min:d.PropTypes.number,now:d.PropTypes.number,max:d.PropTypes.number,label:d.PropTypes.renderable,srOnly:d.PropTypes.bool,striped:d.PropTypes.bool,active:d.PropTypes.bool},mixins:[f],getDefaultProps:function(){return{bsClass:"progress-bar",min:0,max:100}},getPercentage:function(a,b,c){return Math.ceil((a-b)/(c-b)*100)},render:function(){var a={progress:!0};return this.props.active?(a["progress-striped"]=!0,a.active=!0):this.props.striped&&(a["progress-striped"]=!0),this.transferPropsTo(i.hasValidComponent(this.props.children)?d.DOM.div({className:g(a)},i.map(this.props.children,this.renderChildBar)):this.props.isChild?this.renderProgressBar():d.DOM.div({className:g(a)},this.renderProgressBar()))},renderChildBar:function(a){return h(a,{isChild:!0,key:a.props.key,ref:a.props.ref})},renderProgressBar:function(){var a,b=this.getPercentage(this.props.now,this.props.min,this.props.max);return"string"==typeof this.props.label?a=this.renderLabel(b):this.props.label&&(a=this.props.label),this.props.srOnly&&(a=this.renderScreenReaderOnlyLabel(a)),d.DOM.div({className:g(this.getBsClassSet()),role:"progressbar",style:{width:b+"%"},"aria-valuenow":this.props.now,"aria-valuemin":this.props.min,"aria-valuemax":this.props.max},a)},renderLabel:function(a){var b=this.props.interpolateClass||e;return b({now:this.props.now,min:this.props.min,max:this.props.max,percent:a,bsStyle:this.props.bsStyle},this.props.label)},renderScreenReaderOnlyLabel:function(a){return d.DOM.span({className:"sr-only"},a)}});c.exports=j}),d("Row",["require","exports","module","react","./utils/CustomPropTypes"],function(a,b,c){var d=a("react"),e=a("./utils/CustomPropTypes"),f=d.createClass({displayName:"Row",propTypes:{componentClass:e.componentClass.isRequired},getDefaultProps:function(){return{componentClass:d.DOM.div}},render:function(){var a=this.props.componentClass;return this.transferPropsTo(a({className:"row"},this.props.children))}});c.exports=f}),d("SplitButton",["require","exports","module","react","./utils/classSet","./BootstrapMixin","./DropdownStateMixin","./Button","./ButtonGroup","./DropdownMenu"],function(a,b,c){var d=a("react"),e=a("./utils/classSet"),f=a("./BootstrapMixin"),g=a("./DropdownStateMixin"),h=a("./Button"),i=a("./ButtonGroup"),j=a("./DropdownMenu"),k=d.createClass({displayName:"SplitButton",mixins:[f,g],propTypes:{pullRight:d.PropTypes.bool,title:d.PropTypes.renderable,href:d.PropTypes.string,dropdownTitle:d.PropTypes.renderable,onClick:d.PropTypes.func,onSelect:d.PropTypes.func,disabled:d.PropTypes.bool},getDefaultProps:function(){return{dropdownTitle:"Toggle dropdown"}
4
- },render:function(){var a={open:this.state.open,dropup:this.props.dropup},b=this.transferPropsTo(h({ref:"button",onClick:this.handleButtonClick,title:null,id:null},this.props.title)),c=this.transferPropsTo(h({ref:"dropdownButton",className:"dropdown-toggle",onClick:this.handleDropdownClick,title:null,id:null},d.DOM.span({className:"sr-only"},this.props.dropdownTitle),d.DOM.span({className:"caret"})));return i({bsSize:this.props.bsSize,className:e(a),id:this.props.id},b,c,j({ref:"menu",onSelect:this.handleOptionSelect,"aria-labelledby":this.props.id,pullRight:this.props.pullRight},this.props.children))},handleButtonClick:function(a){this.state.open&&this.setDropdownState(!1),this.props.onClick&&this.props.onClick(a)},handleDropdownClick:function(a){a.preventDefault(),this.setDropdownState(!this.state.open)},handleOptionSelect:function(a){this.props.onSelect&&this.props.onSelect(a),this.setDropdownState(!1)}});c.exports=k}),d("SubNav",["require","exports","module","react","./utils/classSet","./utils/cloneWithProps","./utils/ValidComponentChildren","./utils/createChainedFunction","./BootstrapMixin"],function(a,b,c){var d=a("react"),e=a("./utils/classSet"),f=a("./utils/cloneWithProps"),g=a("./utils/ValidComponentChildren"),h=a("./utils/createChainedFunction"),i=a("./BootstrapMixin"),j=d.createClass({displayName:"SubNav",mixins:[i],propTypes:{onSelect:d.PropTypes.func,active:d.PropTypes.bool,disabled:d.PropTypes.bool,href:d.PropTypes.string,title:d.PropTypes.string,text:d.PropTypes.renderable},getDefaultProps:function(){return{bsClass:"nav"}},handleClick:function(a){this.props.onSelect&&(a.preventDefault(),this.props.disabled||this.props.onSelect(this.props.key,this.props.href))},isActive:function(){return this.isChildActive(this)},isChildActive:function(a){if(a.props.active)return!0;if(null!=this.props.activeKey&&this.props.activeKey===a.props.key)return!0;if(null!=this.props.activeHref&&this.props.activeHref===a.props.href)return!0;if(a.props.children){var b=!1;return g.forEach(a.props.children,function(a){this.isChildActive(a)&&(b=!0)},this),b}return!1},getChildActiveProp:function(a){return a.props.active?!0:null!=this.props.activeKey&&a.props.key===this.props.activeKey?!0:null!=this.props.activeHref&&a.props.href===this.props.activeHref?!0:a.props.active},render:function(){var a={active:this.isActive(),disabled:this.props.disabled};return this.transferPropsTo(d.DOM.li({className:e(a)},d.DOM.a({href:this.props.href,title:this.props.title,onClick:this.handleClick,ref:"anchor"},this.props.text),d.DOM.ul({className:"nav"},g.map(this.props.children,this.renderNavItem))))},renderNavItem:function(a){return f(a,{active:this.getChildActiveProp(a),onSelect:h(a.props.onSelect,this.props.onSelect),ref:a.props.ref,key:a.props.key})}});c.exports=j}),d("TabbedArea",["require","exports","module","react","./BootstrapMixin","./utils/cloneWithProps","./utils/ValidComponentChildren","./Nav","./NavItem"],function(a,b,c){function d(a){var b;return h.forEach(a,function(a){null==b&&(b=a.props.key)}),b}var e=a("react"),f=a("./BootstrapMixin"),g=a("./utils/cloneWithProps"),h=a("./utils/ValidComponentChildren"),i=a("./Nav"),j=a("./NavItem"),k=e.createClass({displayName:"TabbedArea",mixins:[f],propTypes:{bsStyle:e.PropTypes.oneOf(["tabs","pills"]),animation:e.PropTypes.bool,onSelect:e.PropTypes.func},getDefaultProps:function(){return{bsStyle:"tabs",animation:!0}},getInitialState:function(){var a=null!=this.props.defaultActiveKey?this.props.defaultActiveKey:d(this.props.children);return{activeKey:a,previousActiveKey:null}},componentWillReceiveProps:function(a){null!=a.activeKey&&a.activeKey!==this.props.activeKey&&this.setState({previousActiveKey:this.props.activeKey})},handlePaneAnimateOutEnd:function(){this.setState({previousActiveKey:null})},render:function(){function a(a){return null!=a.props.tab?this.renderTab(a):null}var b=null!=this.props.activeKey?this.props.activeKey:this.state.activeKey,c=this.transferPropsTo(i({activeKey:b,onSelect:this.handleSelect,ref:"tabs"},h.map(this.props.children,a,this)));return e.DOM.div(null,c,e.DOM.div({id:this.props.id,className:"tab-content",ref:"panes"},h.map(this.props.children,this.renderPane)))},getActiveKey:function(){return null!=this.props.activeKey?this.props.activeKey:this.state.activeKey},renderPane:function(a){var b=this.getActiveKey();return g(a,{active:a.props.key===b&&(null==this.state.previousActiveKey||!this.props.animation),ref:a.props.ref,key:a.props.key,animation:this.props.animation,onAnimateOutEnd:null!=this.state.previousActiveKey&&a.props.key===this.state.previousActiveKey?this.handlePaneAnimateOutEnd:null})},renderTab:function(a){var b=a.props.key;return j({ref:"tab"+b,key:b},a.props.tab)},shouldComponentUpdate:function(){return!this._isChanging},handleSelect:function(a){this.props.onSelect?(this._isChanging=!0,this.props.onSelect(a),this._isChanging=!1):a!==this.getActiveKey()&&this.setState({activeKey:a,previousActiveKey:this.getActiveKey()})}});c.exports=k}),d("Table",["require","exports","module","react","./utils/classSet"],function(a,b,c){var d=a("react"),e=a("./utils/classSet"),f=d.createClass({displayName:"Table",propTypes:{striped:d.PropTypes.bool,bordered:d.PropTypes.bool,condensed:d.PropTypes.bool,hover:d.PropTypes.bool,responsive:d.PropTypes.bool},render:function(){var a={table:!0,"table-striped":this.props.striped,"table-bordered":this.props.bordered,"table-condensed":this.props.condensed,"table-hover":this.props.hover},b=this.transferPropsTo(d.DOM.table({className:e(a)},this.props.children));return this.props.responsive?d.DOM.div({className:"table-responsive"},b):b}});c.exports=f}),d("TabPane",["require","exports","module","react","./utils/classSet","./utils/TransitionEvents"],function(a,b,c){var d=a("react"),e=a("./utils/classSet"),f=a("./utils/TransitionEvents"),g=d.createClass({displayName:"TabPane",getDefaultProps:function(){return{animation:!0}},getInitialState:function(){return{animateIn:!1,animateOut:!1}},componentWillReceiveProps:function(a){this.props.animation&&(this.state.animateIn||!a.active||this.props.active?this.state.animateOut||a.active||!this.props.active||this.setState({animateOut:!0}):this.setState({animateIn:!0}))},componentDidUpdate:function(){this.state.animateIn&&setTimeout(this.startAnimateIn,0),this.state.animateOut&&f.addEndEventListener(this.getDOMNode(),this.stopAnimateOut)},startAnimateIn:function(){this.isMounted()&&this.setState({animateIn:!1})},stopAnimateOut:function(){this.isMounted()&&(this.setState({animateOut:!1}),"function"==typeof this.props.onAnimateOutEnd&&this.props.onAnimateOutEnd())},render:function(){var a={"tab-pane":!0,fade:!0,active:this.props.active||this.state.animateOut,"in":this.props.active&&!this.state.animateIn};return this.transferPropsTo(d.DOM.div({className:e(a)},this.props.children))}});c.exports=g}),d("Tooltip",["require","exports","module","react","./utils/classSet","./BootstrapMixin"],function(a,b,c){var d=a("react"),e=a("./utils/classSet"),f=a("./BootstrapMixin"),g=d.createClass({displayName:"Tooltip",mixins:[f],propTypes:{placement:d.PropTypes.oneOf(["top","right","bottom","left"]),positionLeft:d.PropTypes.number,positionTop:d.PropTypes.number,arrowOffsetLeft:d.PropTypes.number,arrowOffsetTop:d.PropTypes.number},getDefaultProps:function(){return{placement:"right"}},render:function(){var a={};a.tooltip=!0,a[this.props.placement]=!0,a["in"]=null!=this.props.positionLeft||null!=this.props.positionTop;var b={};b.left=this.props.positionLeft,b.top=this.props.positionTop;var c={};return c.left=this.props.arrowOffsetLeft,c.top=this.props.arrowOffsetTop,this.transferPropsTo(d.DOM.div({className:e(a),style:b},d.DOM.div({className:"tooltip-arrow",style:c}),d.DOM.div({className:"tooltip-inner"},this.props.children)))}});c.exports=g}),d("Well",["require","exports","module","react","./utils/classSet","./BootstrapMixin"],function(a,b,c){var d=a("react"),e=a("./utils/classSet"),f=a("./BootstrapMixin"),g=d.createClass({displayName:"Well",mixins:[f],getDefaultProps:function(){return{bsClass:"well"}},render:function(){var a=this.getBsClassSet();return this.transferPropsTo(d.DOM.div({className:e(a)},this.props.children))}});c.exports=g}),d("react-bootstrap",["require","./Accordion","./Affix","./AffixMixin","./Alert","./BootstrapMixin","./Badge","./Button","./ButtonGroup","./ButtonToolbar","./Carousel","./CarouselItem","./Col","./CollapsableMixin","./DropdownButton","./DropdownMenu","./DropdownStateMixin","./FadeMixin","./Glyphicon","./Grid","./Input","./Interpolate","./Jumbotron","./Label","./ListGroup","./ListGroupItem","./MenuItem","./Modal","./Nav","./Navbar","./NavItem","./ModalTrigger","./OverlayTrigger","./OverlayMixin","./PageHeader","./Panel","./PanelGroup","./PageItem","./Pager","./Popover","./ProgressBar","./Row","./SplitButton","./SubNav","./TabbedArea","./Table","./TabPane","./Tooltip","./Well"],function(a){return{Accordion:a("./Accordion"),Affix:a("./Affix"),AffixMixin:a("./AffixMixin"),Alert:a("./Alert"),BootstrapMixin:a("./BootstrapMixin"),Badge:a("./Badge"),Button:a("./Button"),ButtonGroup:a("./ButtonGroup"),ButtonToolbar:a("./ButtonToolbar"),Carousel:a("./Carousel"),CarouselItem:a("./CarouselItem"),Col:a("./Col"),CollapsableMixin:a("./CollapsableMixin"),DropdownButton:a("./DropdownButton"),DropdownMenu:a("./DropdownMenu"),DropdownStateMixin:a("./DropdownStateMixin"),FadeMixin:a("./FadeMixin"),Glyphicon:a("./Glyphicon"),Grid:a("./Grid"),Input:a("./Input"),Interpolate:a("./Interpolate"),Jumbotron:a("./Jumbotron"),Label:a("./Label"),ListGroup:a("./ListGroup"),ListGroupItem:a("./ListGroupItem"),MenuItem:a("./MenuItem"),Modal:a("./Modal"),Nav:a("./Nav"),Navbar:a("./Navbar"),NavItem:a("./NavItem"),ModalTrigger:a("./ModalTrigger"),OverlayTrigger:a("./OverlayTrigger"),OverlayMixin:a("./OverlayMixin"),PageHeader:a("./PageHeader"),Panel:a("./Panel"),PanelGroup:a("./PanelGroup"),PageItem:a("./PageItem"),Pager:a("./Pager"),Popover:a("./Popover"),ProgressBar:a("./ProgressBar"),Row:a("./Row"),SplitButton:a("./SplitButton"),SubNav:a("./SubNav"),TabbedArea:a("./TabbedArea"),Table:a("./Table"),TabPane:a("./TabPane"),Tooltip:a("./Tooltip"),Well:a("./Well")}}),d("react",function(){return a}),c("react-bootstrap")});
@@ -1,6 +0,0 @@
1
- // Underscore.js 1.5.2
2
- // http://underscorejs.org
3
- // (c) 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
4
- // Underscore may be freely distributed under the MIT license.
5
- (function(){var n=this,t=n._,r={},e=Array.prototype,u=Object.prototype,i=Function.prototype,a=e.push,o=e.slice,c=e.concat,l=u.toString,f=u.hasOwnProperty,s=e.forEach,p=e.map,h=e.reduce,v=e.reduceRight,g=e.filter,d=e.every,m=e.some,y=e.indexOf,b=e.lastIndexOf,x=Array.isArray,w=Object.keys,_=i.bind,j=function(n){return n instanceof j?n:this instanceof j?(this._wrapped=n,void 0):new j(n)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=j),exports._=j):n._=j,j.VERSION="1.5.2";var A=j.each=j.forEach=function(n,t,e){if(null!=n)if(s&&n.forEach===s)n.forEach(t,e);else if(n.length===+n.length){for(var u=0,i=n.length;i>u;u++)if(t.call(e,n[u],u,n)===r)return}else for(var a=j.keys(n),u=0,i=a.length;i>u;u++)if(t.call(e,n[a[u]],a[u],n)===r)return};j.map=j.collect=function(n,t,r){var e=[];return null==n?e:p&&n.map===p?n.map(t,r):(A(n,function(n,u,i){e.push(t.call(r,n,u,i))}),e)};var E="Reduce of empty array with no initial value";j.reduce=j.foldl=j.inject=function(n,t,r,e){var u=arguments.length>2;if(null==n&&(n=[]),h&&n.reduce===h)return e&&(t=j.bind(t,e)),u?n.reduce(t,r):n.reduce(t);if(A(n,function(n,i,a){u?r=t.call(e,r,n,i,a):(r=n,u=!0)}),!u)throw new TypeError(E);return r},j.reduceRight=j.foldr=function(n,t,r,e){var u=arguments.length>2;if(null==n&&(n=[]),v&&n.reduceRight===v)return e&&(t=j.bind(t,e)),u?n.reduceRight(t,r):n.reduceRight(t);var i=n.length;if(i!==+i){var a=j.keys(n);i=a.length}if(A(n,function(o,c,l){c=a?a[--i]:--i,u?r=t.call(e,r,n[c],c,l):(r=n[c],u=!0)}),!u)throw new TypeError(E);return r},j.find=j.detect=function(n,t,r){var e;return O(n,function(n,u,i){return t.call(r,n,u,i)?(e=n,!0):void 0}),e},j.filter=j.select=function(n,t,r){var e=[];return null==n?e:g&&n.filter===g?n.filter(t,r):(A(n,function(n,u,i){t.call(r,n,u,i)&&e.push(n)}),e)},j.reject=function(n,t,r){return j.filter(n,function(n,e,u){return!t.call(r,n,e,u)},r)},j.every=j.all=function(n,t,e){t||(t=j.identity);var u=!0;return null==n?u:d&&n.every===d?n.every(t,e):(A(n,function(n,i,a){return(u=u&&t.call(e,n,i,a))?void 0:r}),!!u)};var O=j.some=j.any=function(n,t,e){t||(t=j.identity);var u=!1;return null==n?u:m&&n.some===m?n.some(t,e):(A(n,function(n,i,a){return u||(u=t.call(e,n,i,a))?r:void 0}),!!u)};j.contains=j.include=function(n,t){return null==n?!1:y&&n.indexOf===y?n.indexOf(t)!=-1:O(n,function(n){return n===t})},j.invoke=function(n,t){var r=o.call(arguments,2),e=j.isFunction(t);return j.map(n,function(n){return(e?t:n[t]).apply(n,r)})},j.pluck=function(n,t){return j.map(n,function(n){return n[t]})},j.where=function(n,t,r){return j.isEmpty(t)?r?void 0:[]:j[r?"find":"filter"](n,function(n){for(var r in t)if(t[r]!==n[r])return!1;return!0})},j.findWhere=function(n,t){return j.where(n,t,!0)},j.max=function(n,t,r){if(!t&&j.isArray(n)&&n[0]===+n[0]&&n.length<65535)return Math.max.apply(Math,n);if(!t&&j.isEmpty(n))return-1/0;var e={computed:-1/0,value:-1/0};return A(n,function(n,u,i){var a=t?t.call(r,n,u,i):n;a>e.computed&&(e={value:n,computed:a})}),e.value},j.min=function(n,t,r){if(!t&&j.isArray(n)&&n[0]===+n[0]&&n.length<65535)return Math.min.apply(Math,n);if(!t&&j.isEmpty(n))return 1/0;var e={computed:1/0,value:1/0};return A(n,function(n,u,i){var a=t?t.call(r,n,u,i):n;a<e.computed&&(e={value:n,computed:a})}),e.value},j.shuffle=function(n){var t,r=0,e=[];return A(n,function(n){t=j.random(r++),e[r-1]=e[t],e[t]=n}),e},j.sample=function(n,t,r){return arguments.length<2||r?n[j.random(n.length-1)]:j.shuffle(n).slice(0,Math.max(0,t))};var k=function(n){return j.isFunction(n)?n:function(t){return t[n]}};j.sortBy=function(n,t,r){var e=k(t);return j.pluck(j.map(n,function(n,t,u){return{value:n,index:t,criteria:e.call(r,n,t,u)}}).sort(function(n,t){var r=n.criteria,e=t.criteria;if(r!==e){if(r>e||r===void 0)return 1;if(e>r||e===void 0)return-1}return n.index-t.index}),"value")};var F=function(n){return function(t,r,e){var u={},i=null==r?j.identity:k(r);return A(t,function(r,a){var o=i.call(e,r,a,t);n(u,o,r)}),u}};j.groupBy=F(function(n,t,r){(j.has(n,t)?n[t]:n[t]=[]).push(r)}),j.indexBy=F(function(n,t,r){n[t]=r}),j.countBy=F(function(n,t){j.has(n,t)?n[t]++:n[t]=1}),j.sortedIndex=function(n,t,r,e){r=null==r?j.identity:k(r);for(var u=r.call(e,t),i=0,a=n.length;a>i;){var o=i+a>>>1;r.call(e,n[o])<u?i=o+1:a=o}return i},j.toArray=function(n){return n?j.isArray(n)?o.call(n):n.length===+n.length?j.map(n,j.identity):j.values(n):[]},j.size=function(n){return null==n?0:n.length===+n.length?n.length:j.keys(n).length},j.first=j.head=j.take=function(n,t,r){return null==n?void 0:null==t||r?n[0]:o.call(n,0,t)},j.initial=function(n,t,r){return o.call(n,0,n.length-(null==t||r?1:t))},j.last=function(n,t,r){return null==n?void 0:null==t||r?n[n.length-1]:o.call(n,Math.max(n.length-t,0))},j.rest=j.tail=j.drop=function(n,t,r){return o.call(n,null==t||r?1:t)},j.compact=function(n){return j.filter(n,j.identity)};var M=function(n,t,r){return t&&j.every(n,j.isArray)?c.apply(r,n):(A(n,function(n){j.isArray(n)||j.isArguments(n)?t?a.apply(r,n):M(n,t,r):r.push(n)}),r)};j.flatten=function(n,t){return M(n,t,[])},j.without=function(n){return j.difference(n,o.call(arguments,1))},j.uniq=j.unique=function(n,t,r,e){j.isFunction(t)&&(e=r,r=t,t=!1);var u=r?j.map(n,r,e):n,i=[],a=[];return A(u,function(r,e){(t?e&&a[a.length-1]===r:j.contains(a,r))||(a.push(r),i.push(n[e]))}),i},j.union=function(){return j.uniq(j.flatten(arguments,!0))},j.intersection=function(n){var t=o.call(arguments,1);return j.filter(j.uniq(n),function(n){return j.every(t,function(t){return j.indexOf(t,n)>=0})})},j.difference=function(n){var t=c.apply(e,o.call(arguments,1));return j.filter(n,function(n){return!j.contains(t,n)})},j.zip=function(){for(var n=j.max(j.pluck(arguments,"length").concat(0)),t=new Array(n),r=0;n>r;r++)t[r]=j.pluck(arguments,""+r);return t},j.object=function(n,t){if(null==n)return{};for(var r={},e=0,u=n.length;u>e;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},j.indexOf=function(n,t,r){if(null==n)return-1;var e=0,u=n.length;if(r){if("number"!=typeof r)return e=j.sortedIndex(n,t),n[e]===t?e:-1;e=0>r?Math.max(0,u+r):r}if(y&&n.indexOf===y)return n.indexOf(t,r);for(;u>e;e++)if(n[e]===t)return e;return-1},j.lastIndexOf=function(n,t,r){if(null==n)return-1;var e=null!=r;if(b&&n.lastIndexOf===b)return e?n.lastIndexOf(t,r):n.lastIndexOf(t);for(var u=e?r:n.length;u--;)if(n[u]===t)return u;return-1},j.range=function(n,t,r){arguments.length<=1&&(t=n||0,n=0),r=arguments[2]||1;for(var e=Math.max(Math.ceil((t-n)/r),0),u=0,i=new Array(e);e>u;)i[u++]=n,n+=r;return i};var R=function(){};j.bind=function(n,t){var r,e;if(_&&n.bind===_)return _.apply(n,o.call(arguments,1));if(!j.isFunction(n))throw new TypeError;return r=o.call(arguments,2),e=function(){if(!(this instanceof e))return n.apply(t,r.concat(o.call(arguments)));R.prototype=n.prototype;var u=new R;R.prototype=null;var i=n.apply(u,r.concat(o.call(arguments)));return Object(i)===i?i:u}},j.partial=function(n){var t=o.call(arguments,1);return function(){return n.apply(this,t.concat(o.call(arguments)))}},j.bindAll=function(n){var t=o.call(arguments,1);if(0===t.length)throw new Error("bindAll must be passed function names");return A(t,function(t){n[t]=j.bind(n[t],n)}),n},j.memoize=function(n,t){var r={};return t||(t=j.identity),function(){var e=t.apply(this,arguments);return j.has(r,e)?r[e]:r[e]=n.apply(this,arguments)}},j.delay=function(n,t){var r=o.call(arguments,2);return setTimeout(function(){return n.apply(null,r)},t)},j.defer=function(n){return j.delay.apply(j,[n,1].concat(o.call(arguments,1)))},j.throttle=function(n,t,r){var e,u,i,a=null,o=0;r||(r={});var c=function(){o=r.leading===!1?0:new Date,a=null,i=n.apply(e,u)};return function(){var l=new Date;o||r.leading!==!1||(o=l);var f=t-(l-o);return e=this,u=arguments,0>=f?(clearTimeout(a),a=null,o=l,i=n.apply(e,u)):a||r.trailing===!1||(a=setTimeout(c,f)),i}},j.debounce=function(n,t,r){var e,u,i,a,o;return function(){i=this,u=arguments,a=new Date;var c=function(){var l=new Date-a;t>l?e=setTimeout(c,t-l):(e=null,r||(o=n.apply(i,u)))},l=r&&!e;return e||(e=setTimeout(c,t)),l&&(o=n.apply(i,u)),o}},j.once=function(n){var t,r=!1;return function(){return r?t:(r=!0,t=n.apply(this,arguments),n=null,t)}},j.wrap=function(n,t){return function(){var r=[n];return a.apply(r,arguments),t.apply(this,r)}},j.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length-1;r>=0;r--)t=[n[r].apply(this,t)];return t[0]}},j.after=function(n,t){return function(){return--n<1?t.apply(this,arguments):void 0}},j.keys=w||function(n){if(n!==Object(n))throw new TypeError("Invalid object");var t=[];for(var r in n)j.has(n,r)&&t.push(r);return t},j.values=function(n){for(var t=j.keys(n),r=t.length,e=new Array(r),u=0;r>u;u++)e[u]=n[t[u]];return e},j.pairs=function(n){for(var t=j.keys(n),r=t.length,e=new Array(r),u=0;r>u;u++)e[u]=[t[u],n[t[u]]];return e},j.invert=function(n){for(var t={},r=j.keys(n),e=0,u=r.length;u>e;e++)t[n[r[e]]]=r[e];return t},j.functions=j.methods=function(n){var t=[];for(var r in n)j.isFunction(n[r])&&t.push(r);return t.sort()},j.extend=function(n){return A(o.call(arguments,1),function(t){if(t)for(var r in t)n[r]=t[r]}),n},j.pick=function(n){var t={},r=c.apply(e,o.call(arguments,1));return A(r,function(r){r in n&&(t[r]=n[r])}),t},j.omit=function(n){var t={},r=c.apply(e,o.call(arguments,1));for(var u in n)j.contains(r,u)||(t[u]=n[u]);return t},j.defaults=function(n){return A(o.call(arguments,1),function(t){if(t)for(var r in t)n[r]===void 0&&(n[r]=t[r])}),n},j.clone=function(n){return j.isObject(n)?j.isArray(n)?n.slice():j.extend({},n):n},j.tap=function(n,t){return t(n),n};var S=function(n,t,r,e){if(n===t)return 0!==n||1/n==1/t;if(null==n||null==t)return n===t;n instanceof j&&(n=n._wrapped),t instanceof j&&(t=t._wrapped);var u=l.call(n);if(u!=l.call(t))return!1;switch(u){case"[object String]":return n==String(t);case"[object Number]":return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case"[object Date]":case"[object Boolean]":return+n==+t;case"[object RegExp]":return n.source==t.source&&n.global==t.global&&n.multiline==t.multiline&&n.ignoreCase==t.ignoreCase}if("object"!=typeof n||"object"!=typeof t)return!1;for(var i=r.length;i--;)if(r[i]==n)return e[i]==t;var a=n.constructor,o=t.constructor;if(a!==o&&!(j.isFunction(a)&&a instanceof a&&j.isFunction(o)&&o instanceof o))return!1;r.push(n),e.push(t);var c=0,f=!0;if("[object Array]"==u){if(c=n.length,f=c==t.length)for(;c--&&(f=S(n[c],t[c],r,e)););}else{for(var s in n)if(j.has(n,s)&&(c++,!(f=j.has(t,s)&&S(n[s],t[s],r,e))))break;if(f){for(s in t)if(j.has(t,s)&&!c--)break;f=!c}}return r.pop(),e.pop(),f};j.isEqual=function(n,t){return S(n,t,[],[])},j.isEmpty=function(n){if(null==n)return!0;if(j.isArray(n)||j.isString(n))return 0===n.length;for(var t in n)if(j.has(n,t))return!1;return!0},j.isElement=function(n){return!(!n||1!==n.nodeType)},j.isArray=x||function(n){return"[object Array]"==l.call(n)},j.isObject=function(n){return n===Object(n)},A(["Arguments","Function","String","Number","Date","RegExp"],function(n){j["is"+n]=function(t){return l.call(t)=="[object "+n+"]"}}),j.isArguments(arguments)||(j.isArguments=function(n){return!(!n||!j.has(n,"callee"))}),"function"!=typeof/./&&(j.isFunction=function(n){return"function"==typeof n}),j.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))},j.isNaN=function(n){return j.isNumber(n)&&n!=+n},j.isBoolean=function(n){return n===!0||n===!1||"[object Boolean]"==l.call(n)},j.isNull=function(n){return null===n},j.isUndefined=function(n){return n===void 0},j.has=function(n,t){return f.call(n,t)},j.noConflict=function(){return n._=t,this},j.identity=function(n){return n},j.times=function(n,t,r){for(var e=Array(Math.max(0,n)),u=0;n>u;u++)e[u]=t.call(r,u);return e},j.random=function(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))};var I={escape:{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;"}};I.unescape=j.invert(I.escape);var T={escape:new RegExp("["+j.keys(I.escape).join("")+"]","g"),unescape:new RegExp("("+j.keys(I.unescape).join("|")+")","g")};j.each(["escape","unescape"],function(n){j[n]=function(t){return null==t?"":(""+t).replace(T[n],function(t){return I[n][t]})}}),j.result=function(n,t){if(null==n)return void 0;var r=n[t];return j.isFunction(r)?r.call(n):r},j.mixin=function(n){A(j.functions(n),function(t){var r=j[t]=n[t];j.prototype[t]=function(){var n=[this._wrapped];return a.apply(n,arguments),z.call(this,r.apply(j,n))}})};var N=0;j.uniqueId=function(n){var t=++N+"";return n?n+t:t},j.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var q=/(.)^/,B={"'":"'","\\":"\\","\r":"r","\n":"n"," ":"t","\u2028":"u2028","\u2029":"u2029"},D=/\\|'|\r|\n|\t|\u2028|\u2029/g;j.template=function(n,t,r){var e;r=j.defaults({},r,j.templateSettings);var u=new RegExp([(r.escape||q).source,(r.interpolate||q).source,(r.evaluate||q).source].join("|")+"|$","g"),i=0,a="__p+='";n.replace(u,function(t,r,e,u,o){return a+=n.slice(i,o).replace(D,function(n){return"\\"+B[n]}),r&&(a+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'"),e&&(a+="'+\n((__t=("+e+"))==null?'':__t)+\n'"),u&&(a+="';\n"+u+"\n__p+='"),i=o+t.length,t}),a+="';\n",r.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{e=new Function(r.variable||"obj","_",a)}catch(o){throw o.source=a,o}if(t)return e(t,j);var c=function(n){return e.call(this,n,j)};return c.source="function("+(r.variable||"obj")+"){\n"+a+"}",c},j.chain=function(n){return j(n).chain()};var z=function(n){return this._chain?j(n).chain():n};j.mixin(j),A(["pop","push","reverse","shift","sort","splice","unshift"],function(n){var t=e[n];j.prototype[n]=function(){var r=this._wrapped;return t.apply(r,arguments),"shift"!=n&&"splice"!=n||0!==r.length||delete r[0],z.call(this,r)}}),A(["concat","join","slice"],function(n){var t=e[n];j.prototype[n]=function(){return z.call(this,t.apply(this._wrapped,arguments))}}),j.extend(j.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}})}).call(this);
6
- //# sourceMappingURL=underscore-min.map
@@ -1 +0,0 @@
1
- !function(e,n){"use strict";function r(e,n){var r,t,u=e.toLowerCase();for(n=[].concat(n),r=0;n.length>r;r+=1)if(t=n[r]){if(t.test&&t.test(e))return!0;if(t.toLowerCase()===u)return!0}}var t=n.prototype.trim,u=n.prototype.trimRight,i=n.prototype.trimLeft,l=function(e){return 1*e||0},o=function(e,n){if(1>n)return"";for(var r="";n>0;)1&n&&(r+=e),n>>=1,e+=e;return r},a=[].slice,c=function(e){return null==e?"\\s":e.source?e.source:"["+g.escapeRegExp(e)+"]"},s={lt:"<",gt:">",quot:'"',amp:"&",apos:"'"},f={};for(var p in s)f[s[p]]=p;f["'"]="#39";var h=function(){function e(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}var r=o,t=function(){return t.cache.hasOwnProperty(arguments[0])||(t.cache[arguments[0]]=t.parse(arguments[0])),t.format.call(null,t.cache[arguments[0]],arguments)};return t.format=function(t,u){var i,l,o,a,c,s,f,p=1,g=t.length,d="",m=[];for(l=0;g>l;l++)if(d=e(t[l]),"string"===d)m.push(t[l]);else if("array"===d){if(a=t[l],a[2])for(i=u[p],o=0;a[2].length>o;o++){if(!i.hasOwnProperty(a[2][o]))throw new Error(h('[_.sprintf] property "%s" does not exist',a[2][o]));i=i[a[2][o]]}else i=a[1]?u[a[1]]:u[p++];if(/[^s]/.test(a[8])&&"number"!=e(i))throw new Error(h("[_.sprintf] expecting number but found %s",e(i)));switch(a[8]){case"b":i=i.toString(2);break;case"c":i=n.fromCharCode(i);break;case"d":i=parseInt(i,10);break;case"e":i=a[7]?i.toExponential(a[7]):i.toExponential();break;case"f":i=a[7]?parseFloat(i).toFixed(a[7]):parseFloat(i);break;case"o":i=i.toString(8);break;case"s":i=(i=n(i))&&a[7]?i.substring(0,a[7]):i;break;case"u":i=Math.abs(i);break;case"x":i=i.toString(16);break;case"X":i=i.toString(16).toUpperCase()}i=/[def]/.test(a[8])&&a[3]&&i>=0?"+"+i:i,s=a[4]?"0"==a[4]?"0":a[4].charAt(1):" ",f=a[6]-n(i).length,c=a[6]?r(s,f):"",m.push(a[5]?i+c:c+i)}return m.join("")},t.cache={},t.parse=function(e){for(var n=e,r=[],t=[],u=0;n;){if(null!==(r=/^[^\x25]+/.exec(n)))t.push(r[0]);else if(null!==(r=/^\x25{2}/.exec(n)))t.push("%");else{if(null===(r=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(n)))throw new Error("[_.sprintf] huh?");if(r[2]){u|=1;var i=[],l=r[2],o=[];if(null===(o=/^([a-z_][a-z_\d]*)/i.exec(l)))throw new Error("[_.sprintf] huh?");for(i.push(o[1]);""!==(l=l.substring(o[0].length));)if(null!==(o=/^\.([a-z_][a-z_\d]*)/i.exec(l)))i.push(o[1]);else{if(null===(o=/^\[(\d+)\]/.exec(l)))throw new Error("[_.sprintf] huh?");i.push(o[1])}r[2]=i}else u|=2;if(3===u)throw new Error("[_.sprintf] mixing positional and named placeholders is not (yet) supported");t.push(r)}n=n.substring(r[0].length)}return t},t}(),g={VERSION:"2.3.0",isBlank:function(e){return null==e&&(e=""),/^\s*$/.test(e)},stripTags:function(e){return null==e?"":n(e).replace(/<\/?[^>]+>/g,"")},capitalize:function(e){return e=null==e?"":n(e),e.charAt(0).toUpperCase()+e.slice(1)},chop:function(e,r){return null==e?[]:(e=n(e),r=~~r,r>0?e.match(new RegExp(".{1,"+r+"}","g")):[e])},clean:function(e){return g.strip(e).replace(/\s+/g," ")},count:function(e,r){if(null==e||null==r)return 0;e=n(e),r=n(r);for(var t=0,u=0,i=r.length;;){if(u=e.indexOf(r,u),-1===u)break;t++,u+=i}return t},chars:function(e){return null==e?[]:n(e).split("")},swapCase:function(e){return null==e?"":n(e).replace(/\S/g,function(e){return e===e.toUpperCase()?e.toLowerCase():e.toUpperCase()})},escapeHTML:function(e){return null==e?"":n(e).replace(/[&<>"']/g,function(e){return"&"+f[e]+";"})},unescapeHTML:function(e){return null==e?"":n(e).replace(/\&([^;]+);/g,function(e,r){var t;return r in s?s[r]:(t=r.match(/^#x([\da-fA-F]+)$/))?n.fromCharCode(parseInt(t[1],16)):(t=r.match(/^#(\d+)$/))?n.fromCharCode(~~t[1]):e})},escapeRegExp:function(e){return null==e?"":n(e).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")},splice:function(e,n,r,t){var u=g.chars(e);return u.splice(~~n,~~r,t),u.join("")},insert:function(e,n,r){return g.splice(e,n,0,r)},include:function(e,r){return""===r?!0:null==e?!1:-1!==n(e).indexOf(r)},join:function(){var e=a.call(arguments),n=e.shift();return null==n&&(n=""),e.join(n)},lines:function(e){return null==e?[]:n(e).split("\n")},reverse:function(e){return g.chars(e).reverse().join("")},startsWith:function(e,r){return""===r?!0:null==e||null==r?!1:(e=n(e),r=n(r),e.length>=r.length&&e.slice(0,r.length)===r)},endsWith:function(e,r){return""===r?!0:null==e||null==r?!1:(e=n(e),r=n(r),e.length>=r.length&&e.slice(e.length-r.length)===r)},succ:function(e){return null==e?"":(e=n(e),e.slice(0,-1)+n.fromCharCode(e.charCodeAt(e.length-1)+1))},titleize:function(e){return null==e?"":(e=n(e).toLowerCase(),e.replace(/(?:^|\s|-)\S/g,function(e){return e.toUpperCase()}))},camelize:function(e){return g.trim(e).replace(/[-_\s]+(.)?/g,function(e,n){return n?n.toUpperCase():""})},underscored:function(e){return g.trim(e).replace(/([a-z\d])([A-Z]+)/g,"$1_$2").replace(/[-\s]+/g,"_").toLowerCase()},dasherize:function(e){return g.trim(e).replace(/([A-Z])/g,"-$1").replace(/[-_\s]+/g,"-").toLowerCase()},classify:function(e){return g.titleize(n(e).replace(/[\W_]/g," ")).replace(/\s/g,"")},humanize:function(e){return g.capitalize(g.underscored(e).replace(/_id$/,"").replace(/_/g," "))},trim:function(e,r){return null==e?"":!r&&t?t.call(e):(r=c(r),n(e).replace(new RegExp("^"+r+"+|"+r+"+$","g"),""))},ltrim:function(e,r){return null==e?"":!r&&i?i.call(e):(r=c(r),n(e).replace(new RegExp("^"+r+"+"),""))},rtrim:function(e,r){return null==e?"":!r&&u?u.call(e):(r=c(r),n(e).replace(new RegExp(r+"+$"),""))},truncate:function(e,r,t){return null==e?"":(e=n(e),t=t||"...",r=~~r,e.length>r?e.slice(0,r)+t:e)},prune:function(e,r,t){if(null==e)return"";if(e=n(e),r=~~r,t=null!=t?n(t):"...",r>=e.length)return e;var u=function(e){return e.toUpperCase()!==e.toLowerCase()?"A":" "},i=e.slice(0,r+1).replace(/.(?=\W*\w*$)/g,u);return i=i.slice(i.length-2).match(/\w\w/)?i.replace(/\s*\S+$/,""):g.rtrim(i.slice(0,i.length-1)),(i+t).length>e.length?e:e.slice(0,i.length)+t},words:function(e,n){return g.isBlank(e)?[]:g.trim(e,n).split(n||/\s+/)},pad:function(e,r,t,u){e=null==e?"":n(e),r=~~r;var i=0;switch(t?t.length>1&&(t=t.charAt(0)):t=" ",u){case"right":return i=r-e.length,e+o(t,i);case"both":return i=r-e.length,o(t,Math.ceil(i/2))+e+o(t,Math.floor(i/2));default:return i=r-e.length,o(t,i)+e}},lpad:function(e,n,r){return g.pad(e,n,r)},rpad:function(e,n,r){return g.pad(e,n,r,"right")},lrpad:function(e,n,r){return g.pad(e,n,r,"both")},sprintf:h,vsprintf:function(e,n){return n.unshift(e),h.apply(null,n)},toNumber:function(e,n){return e?(e=g.trim(e),e.match(/^-?\d+(?:\.\d+)?$/)?l(l(e).toFixed(~~n)):0/0):0},numberFormat:function(e,n,r,t){if(isNaN(e)||null==e)return"";e=e.toFixed(~~n),t="string"==typeof t?t:",";var u=e.split("."),i=u[0],l=u[1]?(r||".")+u[1]:"";return i.replace(/(\d)(?=(?:\d{3})+$)/g,"$1"+t)+l},strRight:function(e,r){if(null==e)return"";e=n(e),r=null!=r?n(r):r;var t=r?e.indexOf(r):-1;return~t?e.slice(t+r.length,e.length):e},strRightBack:function(e,r){if(null==e)return"";e=n(e),r=null!=r?n(r):r;var t=r?e.lastIndexOf(r):-1;return~t?e.slice(t+r.length,e.length):e},strLeft:function(e,r){if(null==e)return"";e=n(e),r=null!=r?n(r):r;var t=r?e.indexOf(r):-1;return~t?e.slice(0,t):e},strLeftBack:function(e,n){if(null==e)return"";e+="",n=null!=n?""+n:n;var r=e.lastIndexOf(n);return~r?e.slice(0,r):e},toSentence:function(e,n,r,t){n=n||", ",r=r||" and ";var u=e.slice(),i=u.pop();return e.length>2&&t&&(r=g.rtrim(n)+r),u.length?u.join(n)+r+i:i},toSentenceSerial:function(){var e=a.call(arguments);return e[3]=!0,g.toSentence.apply(g,e)},slugify:function(e){if(null==e)return"";var r="ąàáäâãåæăćęèéëêìíïîłńòóöôõøśșțùúüûñçżź",t="aaaaaaaaaceeeeeiiiilnoooooosstuuuunczz",u=new RegExp(c(r),"g");return e=n(e).toLowerCase().replace(u,function(e){var n=r.indexOf(e);return t.charAt(n)||"-"}),g.dasherize(e.replace(/[^\w\s-]/g,""))},surround:function(e,n){return[n,e,n].join("")},quote:function(e,n){return g.surround(e,n||'"')},unquote:function(e,n){return n=n||'"',e[0]===n&&e[e.length-1]===n?e.slice(1,e.length-1):e},exports:function(){var e={};for(var n in this)this.hasOwnProperty(n)&&!n.match(/^(?:include|contains|reverse)$/)&&(e[n]=this[n]);return e},repeat:function(e,r,t){if(null==e)return"";if(r=~~r,null==t)return o(n(e),r);for(var u=[];r>0;u[--r]=e);return u.join(t)},naturalCmp:function(e,r){if(e==r)return 0;if(!e)return-1;if(!r)return 1;for(var t=/(\.\d+)|(\d+)|(\D+)/g,u=n(e).toLowerCase().match(t),i=n(r).toLowerCase().match(t),l=Math.min(u.length,i.length),o=0;l>o;o++){var a=u[o],c=i[o];if(a!==c){var s=parseInt(a,10);if(!isNaN(s)){var f=parseInt(c,10);if(!isNaN(f)&&s-f)return s-f}return c>a?-1:1}}return u.length===i.length?u.length-i.length:r>e?-1:1},levenshtein:function(e,r){if(null==e&&null==r)return 0;if(null==e)return n(r).length;if(null==r)return n(e).length;e=n(e),r=n(r);for(var t,u,i=[],l=0;r.length>=l;l++)for(var o=0;e.length>=o;o++)u=l&&o?e.charAt(o-1)===r.charAt(l-1)?t:Math.min(i[o],i[o-1],t)+1:l+o,t=i[o],i[o]=u;return i.pop()},toBoolean:function(e,n,t){return"number"==typeof e&&(e=""+e),"string"!=typeof e?!!e:(e=g.trim(e),r(e,n||["true","1"])?!0:r(e,t||["false","0"])?!1:void 0)}};g.strip=g.trim,g.lstrip=g.ltrim,g.rstrip=g.rtrim,g.center=g.lrpad,g.rjust=g.lpad,g.ljust=g.rpad,g.contains=g.include,g.q=g.quote,g.toBool=g.toBoolean,"undefined"!=typeof exports&&("undefined"!=typeof module&&module.exports&&(module.exports=g),exports._s=g),"function"==typeof define&&define.amd&&define("underscore.string",[],function(){return g}),e._=e._||{},e._.string=e._.str=g}(this,String);
data/public/js/main.js DELETED
@@ -1,57 +0,0 @@
1
- // var components = {};
2
- // var globalIds;
3
-
4
- function updateNamespace(ns) {
5
- conjur.app.namespace.currentNamespace = ns;
6
- // it won't work with reactjs 11.0 -- state should be set from within component
7
- // components[kind].setState({currentNamespace: ns, members: lists[kind].members(ns)});
8
- }
9
-
10
- $(document).ready(function() {
11
- conjur.initialize();
12
-
13
- _.mixin(_.str.exports());
14
-
15
- // Use delegation to avoid initial DOM selection and allow all matching elements to bubble
16
- $(document).delegate('a', 'click', function(evt) {
17
- // Get the anchor href and protcol
18
- var href = $(this).attr('href');
19
- var protocol = this.protocol + '//';
20
-
21
- // Ensure the protocol is not part of URL, meaning its relative.
22
- // Stop the event bubbling to ensure the link will not cause a page refresh.
23
- if (href.slice(0,protocol.length) !== protocol && href[0] !== '#') {
24
- evt.preventDefault();
25
-
26
- // Note by using Backbone.history.navigate, router events will not be
27
- // triggered. If this is a problem, change this to navigate on your
28
- // router.
29
- Backbone.history.navigate(href, {trigger:true});
30
- }
31
- });
32
-
33
- conjur.app.router = new conjur.Workspace();
34
-
35
- conjur.app.router.on('all', function(route, router) {
36
- console.log('router.all', route, conjur.app.flash);
37
-
38
- if (route != 'route') {
39
- return;
40
- }
41
-
42
- if (conjur.app.flash) {
43
- var old = conjur.app.flash;
44
- conjur.app.flash = null;
45
- var $flash = $('#flash');
46
- var $text = $('.text', $flash);
47
- $text.text(old);
48
- $flash.show();
49
- } else {
50
- $('#flash').hide();
51
- }
52
- });
53
-
54
- Backbone.history.start({pushState: true});
55
-
56
- React.renderComponent(conjur.views.NavSearchForm(null), document.getElementById('inlineSearchContainer'));
57
- });
@@ -1,2 +0,0 @@
1
- *.swp
2
- node_modules
@@ -1,3 +0,0 @@
1
- language: node_js
2
- node_js:
3
- - 0.8
@@ -1,81 +0,0 @@
1
- # 1.0.3
2
- - build browser versions
3
-
4
- # 1.0.2
5
- - bug fix for `flatten` - slight change with bug fix, flattens arrays only, not array-like objects
6
-
7
- # 1.0.1
8
- - bug fixes for `drop-while` and `take-while`
9
-
10
- # 1.0.0
11
- * massive update - separated functions into separate modules
12
- * functions do not accept multiple types anymore - use different versions in their respective modules in some cases (eg. `Obj.map`), or use `chars` or `values` in other cases to transform into a list
13
- * objects are no longer transformed into functions, simply use `(obj.)` in LiveScript to do that
14
- * browser version now using browserify - use `prelude = require('prelude-ls')`
15
- * added `compact`, `split`, `flatten`, `difference`, `intersection`, `union`, `count-by`, `group-by`, `chars`, `unchars`, `apply`
16
- * added `lists-to-obj` which takes a list of keys and list of values and zips them up into an object, and the converse `obj-to-lists`
17
- * added `pairs-to-obj` which takes a list of pairs (2 element lists) and creates an object, and the converse `obj-to-pairs`
18
- * removed `cons`, `append` - use the concat operator
19
- * removed `compose` - use the compose operator
20
- * removed `obj-to-func` - use partially applied access (eg. `(obj.)`)
21
- * removed `length` - use `(.length)`
22
- * `sort-by` renamed to `sort-with`
23
- * added new `sort-by`
24
- * removed `compare` - just use the new `sort-by`
25
- * `break-it` renamed `break-list`, (`Str.break-str` for the string version)
26
- * added `Str.repeat` which creates a new string by repeating the input n times
27
- * `unfold` as alias to `unfoldr` is no longer used
28
- * fixed up style and compiled with LiveScript 1.1.1
29
- * use Make instead of Slake
30
- * greatly improved tests
31
-
32
- # 0.6.0
33
- * fixed various bugs
34
- * added `fix`, a fixpoint (Y combinator) for anonymous recursive functions
35
- * added `unfoldr` (alias `unfold`)
36
- * calling `replicate` with a string now returns a list of strings
37
- * removed `partial`, just use native partial application in LiveScript using the `_` placeholder, or currying
38
- * added `sort`, `sortBy`, and `compare`
39
-
40
- # 0.5.0
41
- * removed `lookup` - use (.prop)
42
- * removed `call` - use (.func arg1, arg2)
43
- * removed `pluck` - use map (.prop), xs
44
- * fixed buys wtih `head` and `last`
45
- * added non-minifed browser version, as `prelude-browser.js`
46
- * renamed `prelude-min.js` to `prelude-browser-min.js`
47
- * renamed `zip` to `zipAll`
48
- * renamed `zipWith` to `zipAllWith`
49
- * added `zip`, a curried zip that takes only two arguments
50
- * added `zipWith`, a curried zipWith that takes only two arguments
51
-
52
- # 0.4.0
53
- * added `parition` function
54
- * added `curry` function
55
- * removed `elem` function (use `in`)
56
- * removed `notElem` function (use `not in`)
57
-
58
- # 0.3.0
59
- * added `listToObject`
60
- * added `unique`
61
- * added `objToFunc`
62
- * added support for using strings in map and the like
63
- * added support for using objects in map and the like
64
- * added ability to use objects instead of functions in certain cases
65
- * removed `error` (just use throw)
66
- * added `tau` constant
67
- * added `join`
68
- * added `values`
69
- * added `keys`
70
- * added `partial`
71
- * renamed `log` to `ln`
72
- * added alias to `head`: `first`
73
- * added `installPrelude` helper
74
-
75
- # 0.2.0
76
- * removed functions that simply warp operators as you can now use operators as functions in LiveScript
77
- * `min/max` are now curried and take only 2 arguments
78
- * added `call`
79
-
80
- # 0.1.0
81
- * initial public release
@@ -1,22 +0,0 @@
1
- Copyright (c) 2013 George Zahariev
2
-
3
- Permission is hereby granted, free of charge, to any person
4
- obtaining a copy of this software and associated documentation
5
- files (the "Software"), to deal in the Software without
6
- restriction, including without limitation the rights to use,
7
- copy, modify, merge, publish, distribute, sublicense, and/or sell
8
- copies of the Software, and to permit persons to whom the
9
- Software is furnished to do so, subject to the following
10
- conditions:
11
-
12
- The above copyright notice and this permission notice shall be
13
- included in all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17
- OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19
- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20
- WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
- OTHER DEALINGS IN THE SOFTWARE.
@@ -1,50 +0,0 @@
1
- default: all
2
-
3
- SRC = $(shell find src -name "*.ls" -type f | sort)
4
- LIB = $(SRC:src/%.ls=lib/%.js)
5
- LS = node_modules/LiveScript
6
- LSC = node_modules/.bin/lsc
7
- BROWSERIFY = node_modules/.bin/browserify
8
- UGLIFYJS = node_modules/.bin/uglifyjs
9
- MOCHA = node_modules/.bin/mocha
10
-
11
- lib:
12
- mkdir lib/
13
-
14
- lib/%.js: src/%.ls lib
15
- $(LSC) --compile --bare --print "$<" > "$@"
16
-
17
- browser:
18
- mkdir browser/
19
-
20
- prelude-browser.js: $(LIB) browser
21
- $(BROWSERIFY) -r ./lib/index.js:prelude-ls > browser/prelude-browser.js
22
-
23
- prelude-browser-min.js: browser/prelude-browser.js
24
- $(UGLIFYJS) browser/prelude-browser.js --mangle --comments "all" > browser/prelude-browser-min.js
25
-
26
- package.json: package.ls
27
- $(LSC) --compile --json package.ls
28
-
29
- .PHONY: build-browser test install loc clean
30
-
31
- all: build
32
-
33
- build: $(LIB) package.json
34
-
35
- build-browser: prelude-browser.js prelude-browser-min.js
36
-
37
- test: build
38
- $(MOCHA) --reporter dot --ui tdd --compilers ls:$(LS)
39
-
40
- dev-install:
41
- npm install .
42
-
43
- loc:
44
- wc --lines src/*
45
-
46
- clean:
47
- rm --force ./*.js
48
- rm --force --recursive lib
49
- rm --force --recursive browser
50
- rm --force package.json
@@ -1,15 +0,0 @@
1
- # prelude.ls [![Build Status](https://travis-ci.org/gkz/prelude-ls.png?branch=master)](https://travis-ci.org/gkz/prelude-ls)
2
-
3
- is a functionally oriented utility library. It is powerful and flexible. Almost all of its functions are curried. It is written in, and is the recommended base library for, <a href="http://livescript.net">LiveScript</a>.
4
-
5
- See **[the prelude.ls site](http://preludels.com)** for examples, a reference, and more.
6
-
7
- You can install via npm `npm install prelude-ls`
8
-
9
- ### Development
10
-
11
- `make test` to test
12
-
13
- `make build` to build `lib` from `src`
14
-
15
- `make build-browser` to build browser versions
@@ -1 +0,0 @@
1
- require=function(n,r,t){function e(t,i){if(!r[t]){if(!n[t]){var o=typeof require=="function"&&require;if(!i&&o)return o(t,!0);if(u)return u(t,!0);throw new Error("Cannot find module '"+t+"'")}var a=r[t]={exports:{}};n[t][0].call(a.exports,function(r){var u=n[t][1][r];return e(u?u:r)},a,a.exports)}return r[t].exports}var u=typeof require=="function"&&require;for(var i=0;i<t.length;i++)e(t[i]);return e}({"prelude-ls":[function(n,r,t){r.exports=n("bcmc1g")},{}],bcmc1g:[function(n,r,t){var e,u,i,o,a,c,f,l,s,h={}.toString;e=n("./Func.js");u=n("./List.js");i=n("./Obj.js");o=n("./Str.js");a=n("./Num.js");c=function(n){return n};f=p(function(n,r){return h.call(r).slice(8,-1)===n});l=p(function(n,r){var t,e=[];for(t=0;t<n;++t){e.push(r)}return e});o.empty=u.empty;o.slice=u.slice;o.take=u.take;o.drop=u.drop;o.splitAt=u.splitAt;o.takeWhile=u.takeWhile;o.dropWhile=u.dropWhile;o.span=u.span;o.breakStr=u.breakList;s={Func:e,List:u,Obj:i,Str:o,Num:a,id:c,isType:f,replicate:l};s.each=u.each;s.map=u.map;s.filter=u.filter;s.compact=u.compact;s.reject=u.reject;s.partition=u.partition;s.find=u.find;s.head=u.head;s.first=u.first;s.tail=u.tail;s.last=u.last;s.initial=u.initial;s.empty=u.empty;s.reverse=u.reverse;s.difference=u.difference;s.intersection=u.intersection;s.union=u.union;s.countBy=u.countBy;s.groupBy=u.groupBy;s.fold=u.fold;s.foldl=u.foldl;s.fold1=u.fold1;s.foldl1=u.foldl1;s.foldr=u.foldr;s.foldr1=u.foldr1;s.unfoldr=u.unfoldr;s.andList=u.andList;s.orList=u.orList;s.any=u.any;s.all=u.all;s.unique=u.unique;s.sort=u.sort;s.sortWith=u.sortWith;s.sortBy=u.sortBy;s.sum=u.sum;s.product=u.product;s.mean=u.mean;s.average=u.average;s.concat=u.concat;s.concatMap=u.concatMap;s.flatten=u.flatten;s.maximum=u.maximum;s.minimum=u.minimum;s.scan=u.scan;s.scanl=u.scanl;s.scan1=u.scan1;s.scanl1=u.scanl1;s.scanr=u.scanr;s.scanr1=u.scanr1;s.slice=u.slice;s.take=u.take;s.drop=u.drop;s.splitAt=u.splitAt;s.takeWhile=u.takeWhile;s.dropWhile=u.dropWhile;s.span=u.span;s.breakList=u.breakList;s.zip=u.zip;s.zipWith=u.zipWith;s.zipAll=u.zipAll;s.zipAllWith=u.zipAllWith;s.apply=e.apply;s.curry=e.curry;s.flip=e.flip;s.fix=e.fix;s.split=o.split;s.join=o.join;s.lines=o.lines;s.unlines=o.unlines;s.words=o.words;s.unwords=o.unwords;s.chars=o.chars;s.unchars=o.unchars;s.values=i.values;s.keys=i.keys;s.pairsToObj=i.pairsToObj;s.objToPairs=i.objToPairs;s.listsToObj=i.listsToObj;s.objToLists=i.objToLists;s.max=a.max;s.min=a.min;s.negate=a.negate;s.abs=a.abs;s.signum=a.signum;s.quot=a.quot;s.rem=a.rem;s.div=a.div;s.mod=a.mod;s.recip=a.recip;s.pi=a.pi;s.tau=a.tau;s.exp=a.exp;s.sqrt=a.sqrt;s.ln=a.ln;s.pow=a.pow;s.sin=a.sin;s.tan=a.tan;s.cos=a.cos;s.acos=a.acos;s.asin=a.asin;s.atan=a.atan;s.atan2=a.atan2;s.truncate=a.truncate;s.round=a.round;s.ceiling=a.ceiling;s.floor=a.floor;s.isItNaN=a.isItNaN;s.even=a.even;s.odd=a.odd;s.gcd=a.gcd;s.lcm=a.lcm;s.VERSION="1.0.3";r.exports=s;function p(n,r){var t,e=function(u){return n.length>1?function(){var i=u?u.concat():[];t=r?t||this:this;return i.push.apply(i,arguments)<n.length&&arguments.length?e.call(t,i):n.apply(t,i)}:n};return e()}},{"./Func.js":1,"./Obj.js":2,"./Num.js":3,"./List.js":4,"./Str.js":5}],1:[function(n,r,t){var e,u,i,o;e=function(n){return a(n)};u=a(function(n,r,t){return n(t,r)});i=function(n){return function(r,t){return function(){return n(r(r)).apply(null,arguments)}}(function(r,t){return function(){return n(r(r)).apply(null,arguments)}})};o=a(function(n,r){return n.apply(null,r)});r.exports={curry:e,flip:u,fix:i,apply:o};function a(n,r){var t,e=function(u){return n.length>1?function(){var i=u?u.concat():[];t=r?t||this:this;return i.push.apply(i,arguments)<n.length&&arguments.length?e.call(t,i):n.apply(t,i)}:n};return e()}},{}],2:[function(n,r,t){var e,u,i,o,a,c,f,l,s,h,p,g,v,m;e=function(n){var r,t,e=[];for(r in n){t=n[r];e.push(t)}return e};u=function(n){var r,t=[];for(r in n){t.push(r)}return t};i=function(n){var r,t,e,u={};for(r=0,t=n.length;r<t;++r){e=n[r];u[e[0]]=e[1]}return u};o=function(n){var r,t,e=[];for(r in n){t=n[r];e.push([r,t])}return e};a=d(function(n,r){var t,e,u,i,o={};for(t=0,e=n.length;t<e;++t){u=t;i=n[t];o[i]=r[u]}return o});c=function(n){var r,t,e,u;r=[];t=[];for(e in n){u=n[e];r.push(e);t.push(u)}return[r,t]};f=function(n){var r;for(r in n){return false}return true};l=d(function(n,r){var t,e;for(t in r){e=r[t];n(e)}return r});s=d(function(n,r){var t,e,u={};for(t in r){e=r[t];u[t]=n(e)}return u});h=d(function(n){var r,t,e={};for(r in n){t=n[r];if(t){e[r]=t}}return e});p=d(function(n,r){var t,e,u={};for(t in r){e=r[t];if(n(e)){u[t]=e}}return u});g=d(function(n,r){var t,e,u={};for(t in r){e=r[t];if(!n(e)){u[t]=e}}return u});v=d(function(n,r){var t,e,u,i;t={};e={};for(u in r){i=r[u];(n(i)?t:e)[u]=i}return[t,e]});m=d(function(n,r){var t,e;for(t in r){e=r[t];if(n(e)){return e}}});r.exports={values:e,keys:u,pairsToObj:i,objToPairs:o,listsToObj:a,objToLists:c,empty:f,each:l,map:s,filter:p,compact:h,reject:g,partition:v,find:m};function d(n,r){var t,e=function(u){return n.length>1?function(){var i=u?u.concat():[];t=r?t||this:this;return i.push.apply(i,arguments)<n.length&&arguments.length?e.call(t,i):n.apply(t,i)}:n};return e()}},{}],3:[function(n,r,t){var e,u,i,o,a,c,f,l,s,h,p,g,v,m,d,y,j,b,x,M,k,W,w,L,q,T,z,A,N,O,B,S;e=I(function(n,r){return n>r?n:r});u=I(function(n,r){return n<r?n:r});i=function(n){return-n};o=Math.abs;a=function(n){if(n<0){return-1}else if(n>0){return 1}else{return 0}};c=I(function(n,r){return~~(n/r)});f=I(function(n,r){return n%r});l=I(function(n,r){return Math.floor(n/r)});s=I(function(n,r){var t;return(n%(t=r)+t)%t});h=function(n){return 1/n};p=Math.PI;g=p*2;v=Math.exp;m=Math.sqrt;d=Math.log;y=I(function(n,r){return Math.pow(n,r)});j=Math.sin;b=Math.tan;x=Math.cos;M=Math.asin;k=Math.acos;W=Math.atan;w=I(function(n,r){return Math.atan2(n,r)});L=function(n){return~~n};q=Math.round;T=Math.ceil;z=Math.floor;A=function(n){return n!==n};N=function(n){return n%2===0};O=function(n){return n%2!==0};B=I(function(n,r){var t;n=Math.abs(n);r=Math.abs(r);while(r!==0){t=n%r;n=r;r=t}return n});S=I(function(n,r){return Math.abs(Math.floor(n/B(n,r)*r))});r.exports={max:e,min:u,negate:i,abs:o,signum:a,quot:c,rem:f,div:l,mod:s,recip:h,pi:p,tau:g,exp:v,sqrt:m,ln:d,pow:y,sin:j,tan:b,cos:x,acos:k,asin:M,atan:W,atan2:w,truncate:L,round:q,ceiling:T,floor:z,isItNaN:A,even:N,odd:O,gcd:B,lcm:S};function I(n,r){var t,e=function(u){return n.length>1?function(){var i=u?u.concat():[];t=r?t||this:this;return i.push.apply(i,arguments)<n.length&&arguments.length?e.call(t,i):n.apply(t,i)}:n};return e()}},{}],4:[function(n,r,t){var e,u,i,o,a,c,f,l,s,h,p,g,v,m,d,y,j,b,x,M,k,W,w,L,q,T,z,A,N,O,B,S,I,P,F,E,C,R,V,D,G,H,J,K,Q,U,X,Y,Z,$,_,nr,rr,tr,er,ur,ir,or,ar,cr,fr,lr={}.toString,sr=[].slice;e=hr(function(n,r){var t,e,u;for(t=0,e=r.length;t<e;++t){u=r[t];n(u)}return r});u=hr(function(n,r){var t,e,u,i=[];for(t=0,e=r.length;t<e;++t){u=r[t];i.push(n(u))}return i});i=hr(function(n){var r,t,e,u=[];for(r=0,t=n.length;r<t;++r){e=n[r];if(e){u.push(e)}}return u});o=hr(function(n,r){var t,e,u,i=[];for(t=0,e=r.length;t<e;++t){u=r[t];if(n(u)){i.push(u)}}return i});a=hr(function(n,r){var t,e,u,i=[];for(t=0,e=r.length;t<e;++t){u=r[t];if(!n(u)){i.push(u)}}return i});c=hr(function(n,r){var t,e,u,i,o;t=[];e=[];for(u=0,i=r.length;u<i;++u){o=r[u];(n(o)?t:e).push(o)}return[t,e]});f=hr(function(n,r){var t,e,u;for(t=0,e=r.length;t<e;++t){u=r[t];if(n(u)){return u}}});l=s=function(n){if(!n.length){return}return n[0]};h=function(n){if(!n.length){return}return n.slice(1)};p=function(n){if(!n.length){return}return n[n.length-1]};g=function(n){var r;r=n.length;if(!r){return}return n.slice(0,r-1)};v=function(n){return!n.length};m=function(n){return n.concat().reverse()};d=function(n){var r,t,e,u;r=[];for(t=0,e=n.length;t<e;++t){u=n[t];if(!pr(u,r)){r.push(u)}}return r};y=j=hr(function(n,r,t){var e,u,i;for(e=0,u=t.length;e<u;++e){i=t[e];r=n(r,i)}return r});b=x=hr(function(n,r){return y(n,r[0],r.slice(1))});M=hr(function(n,r,t){return y(n,r,t.concat().reverse())});k=hr(function(n,r){var t;t=r.concat().reverse();return y(n,t[0],t.slice(1))});W=hr(function(n,r){var t,e,u;t=[];e=r;while((u=n(e))!=null){t.push(u[0]);e=u[1]}return t});w=function(n){return[].concat.apply([],n)};L=hr(function(n,r){var t;return[].concat.apply([],function(){var e,u,i,o=[];for(e=0,i=(u=r).length;e<i;++e){t=u[e];o.push(n(t))}return o}())});q=hr(function(n){var r;return[].concat.apply([],function(){var t,e,u,i=[];for(t=0,u=(e=n).length;t<u;++t){r=e[t];if(lr.call(r).slice(8,-1)==="Array"){i.push(q(r))}else{i.push(r)}}return i}())});T=function(n){var r,t,e,u,i,o,a,c;r=sr.call(arguments,1);t=[];n:for(e=0,u=n.length;e<u;++e){i=n[e];for(o=0,a=r.length;o<a;++o){c=r[o];if(pr(i,c)){continue n}}t.push(i)}return t};z=function(n){var r,t,e,u,i,o,a,c;r=sr.call(arguments,1);t=[];n:for(e=0,u=n.length;e<u;++e){i=n[e];for(o=0,a=r.length;o<a;++o){c=r[o];if(!pr(i,c)){continue n}}t.push(i)}return t};A=function(){var n,r,t,e,u,i,o,a;n=sr.call(arguments);r=[];for(t=0,e=n.length;t<e;++t){u=n[t];for(i=0,o=u.length;i<o;++i){a=u[i];if(!pr(a,r)){r.push(a)}}}return r};N=hr(function(n,r){var t,e,u,i,o;t={};for(e=0,u=r.length;e<u;++e){i=r[e];o=n(i);if(o in t){t[o]+=1}else{t[o]=1}}return t});O=hr(function(n,r){var t,e,u,i,o;t={};for(e=0,u=r.length;e<u;++e){i=r[e];o=n(i);if(o in t){t[o].push(i)}else{t[o]=[i]}}return t});B=function(n){var r,t,e;for(r=0,t=n.length;r<t;++r){e=n[r];if(!e){return false}}return true};S=function(n){var r,t,e;for(r=0,t=n.length;r<t;++r){e=n[r];if(e){return true}}return false};I=hr(function(n,r){var t,e,u;for(t=0,e=r.length;t<e;++t){u=r[t];if(n(u)){return true}}return false});P=hr(function(n,r){var t,e,u;for(t=0,e=r.length;t<e;++t){u=r[t];if(!n(u)){return false}}return true});F=function(n){return n.concat().sort(function(n,r){if(n>r){return 1}else if(n<r){return-1}else{return 0}})};E=hr(function(n,r){if(!r.length){return[]}return r.concat().sort(n)});C=hr(function(n,r){if(!r.length){return[]}return r.concat().sort(function(r,t){if(n(r)>n(t)){return 1}else if(n(r)<n(t)){return-1}else{return 0}})});R=function(n){var r,t,e,u;r=0;for(t=0,e=n.length;t<e;++t){u=n[t];r+=u}return r};V=function(n){var r,t,e,u;r=1;for(t=0,e=n.length;t<e;++t){u=n[t];r*=u}return r};D=G=function(n){var r,t,e,u;r=0;t=n.length;for(e=0;e<t;++e){u=e;r+=n[u]}return r/t};H=function(n){var r,t,e,u,i;r=n[0];for(t=0,u=(e=n.slice(1)).length;t<u;++t){i=e[t];if(i>r){r=i}}return r};J=function(n){var r,t,e,u,i;r=n[0];for(t=0,u=(e=n.slice(1)).length;t<u;++t){i=e[t];if(i<r){r=i}}return r};K=Q=hr(function(n,r,t){var e,u;e=r;return[r].concat(function(){var r,i,o,a=[];for(r=0,o=(i=t).length;r<o;++r){u=i[r];a.push(e=n(e,u))}return a}())});U=X=hr(function(n,r){if(!r.length){return}return K(n,r[0],r.slice(1))});Y=hr(function(n,r,t){t=t.concat().reverse();return K(n,r,t).reverse()});Z=hr(function(n,r){if(!r.length){return}r=r.concat().reverse();return K(n,r[0],r.slice(1)).reverse()});$=hr(function(n,r,t){return t.slice(n,r)});_=hr(function(n,r){if(n<=0){return r.slice(0,0)}else if(!r.length){return r}else{return r.slice(0,n)}});nr=hr(function(n,r){if(n<=0||!r.length){return r}else{return r.slice(n)}});rr=hr(function(n,r){return[_(n,r),nr(n,r)]});tr=hr(function(n,r){var t,e;t=r.length;if(!t){return r}e=0;while(e<t&&n(r[e])){e+=1}return r.slice(0,e)});er=hr(function(n,r){var t,e;t=r.length;if(!t){return r}e=0;while(e<t&&n(r[e])){e+=1}return r.slice(e)});ur=hr(function(n,r){return[tr(n,r),er(n,r)]});ir=hr(function(n,r){return ur(gr([vr,n]),r)});or=hr(function(n,r){var t,e,u,i,o,a;t=[];e=r.length;for(u=0,i=n.length;u<i;++u){o=u;a=n[u];if(o===e){break}t.push([a,r[o]])}return t});ar=hr(function(n,r,t){var e,u,i,o,a,c;e=[];u=t.length;for(i=0,o=r.length;i<o;++i){a=i;c=r[i];if(a===u){break}e.push(n(c,t[a]))}return e});cr=function(){var n,r,t,e,u,i,o,a,c,f=[];n=sr.call(arguments);r=9e9;for(t=0,e=n.length;t<e;++t){u=n[t];r<=(i=u.length)||(r=i)}for(t=0;t<r;++t){o=t;a=[];for(c=0,e=n.length;c<e;++c){u=n[c];a.push(u[o])}f.push(a)}return f};fr=function(n){var r,t,e,u,i,o,a,c=[];r=sr.call(arguments,1);t=9e9;for(e=0,u=r.length;e<u;++e){i=r[e];t<=(o=i.length)||(t=o)}for(e=0;e<t;++e){a=e;c.push(n.apply(null,f()))}return c;function f(){var n,t,e,u=[];for(n=0,e=(t=r).length;n<e;++n){i=t[n];u.push(i[a])}return u}};r.exports={each:e,map:u,filter:o,compact:i,reject:a,partition:c,find:f,head:l,first:s,tail:h,last:p,initial:g,empty:v,reverse:m,difference:T,intersection:z,union:A,countBy:N,groupBy:O,fold:y,fold1:b,foldl:j,foldl1:x,foldr:M,foldr1:k,unfoldr:W,andList:B,orList:S,any:I,all:P,unique:d,sort:F,sortWith:E,sortBy:C,sum:R,product:V,mean:D,average:G,concat:w,concatMap:L,flatten:q,maximum:H,minimum:J,scan:K,scan1:U,scanl:Q,scanl1:X,scanr:Y,scanr1:Z,slice:$,take:_,drop:nr,splitAt:rr,takeWhile:tr,dropWhile:er,span:ur,breakList:ir,zip:or,zipWith:ar,zipAll:cr,zipAllWith:fr};function hr(n,r){var t,e=function(u){return n.length>1?function(){var i=u?u.concat():[];t=r?t||this:this;return i.push.apply(i,arguments)<n.length&&arguments.length?e.call(t,i):n.apply(t,i)}:n};return e()}function pr(n,r){var t=-1,e=r.length>>>0;while(++t<e)if(n===r[t]&&t in r)return true;return false}function gr(n){return function(){var r,t=arguments;for(r=n.length;r>0;--r){t=[n[r-1].apply(this,t)]}return t[0]}}function vr(n){return!n}},{}],5:[function(n,r,t){var e,u,i,o,a,c,f,l,s,h;e=p(function(n,r){return r.split(n)});u=p(function(n,r){return r.join(n)});i=function(n){if(!n.length){return[]}return n.split("\n")};o=function(n){return n.join("\n")};a=function(n){if(!n.length){return[]}return n.split(/[ ]+/)};c=function(n){return n.join(" ")};f=function(n){return n.split("")};l=function(n){return n.join("")};s=function(n){return n.split("").reverse().join("")};h=p(function(n,r){var t,e,u;e=[];for(u=0;u<n;++u){e.push(r)}t=e;return t.join("")});r.exports={split:e,join:u,lines:i,unlines:o,words:a,unwords:c,chars:f,unchars:l,reverse:s,repeat:h};function p(n,r){var t,e=function(u){return n.length>1?function(){var i=u?u.concat():[];t=r?t||this:this;return i.push.apply(i,arguments)<n.length&&arguments.length?e.call(t,i):n.apply(t,i)}:n};return e()}},{}]},{},[]);
@@ -1,1172 +0,0 @@
1
- require=(function(e,t,n){function i(n,s){if(!t[n]){if(!e[n]){var o=typeof require=="function"&&require;if(!s&&o)return o(n,!0);if(r)return r(n,!0);throw new Error("Cannot find module '"+n+"'")}var u=t[n]={exports:{}};e[n][0].call(u.exports,function(t){var r=e[n][1][t];return i(r?r:t)},u,u.exports)}return t[n].exports}var r=typeof require=="function"&&require;for(var s=0;s<n.length;s++)i(n[s]);return i})({"prelude-ls":[function(require,module,exports){
2
- module.exports=require('bcmc1g');
3
- },{}],"bcmc1g":[function(require,module,exports){
4
- var Func, List, Obj, Str, Num, id, isType, replicate, prelude, toString$ = {}.toString;
5
- Func = require('./Func.js');
6
- List = require('./List.js');
7
- Obj = require('./Obj.js');
8
- Str = require('./Str.js');
9
- Num = require('./Num.js');
10
- id = function(x){
11
- return x;
12
- };
13
- isType = curry$(function(type, x){
14
- return toString$.call(x).slice(8, -1) === type;
15
- });
16
- replicate = curry$(function(n, x){
17
- var i$, results$ = [];
18
- for (i$ = 0; i$ < n; ++i$) {
19
- results$.push(x);
20
- }
21
- return results$;
22
- });
23
- Str.empty = List.empty;
24
- Str.slice = List.slice;
25
- Str.take = List.take;
26
- Str.drop = List.drop;
27
- Str.splitAt = List.splitAt;
28
- Str.takeWhile = List.takeWhile;
29
- Str.dropWhile = List.dropWhile;
30
- Str.span = List.span;
31
- Str.breakStr = List.breakList;
32
- prelude = {
33
- Func: Func,
34
- List: List,
35
- Obj: Obj,
36
- Str: Str,
37
- Num: Num,
38
- id: id,
39
- isType: isType,
40
- replicate: replicate
41
- };
42
- prelude.each = List.each;
43
- prelude.map = List.map;
44
- prelude.filter = List.filter;
45
- prelude.compact = List.compact;
46
- prelude.reject = List.reject;
47
- prelude.partition = List.partition;
48
- prelude.find = List.find;
49
- prelude.head = List.head;
50
- prelude.first = List.first;
51
- prelude.tail = List.tail;
52
- prelude.last = List.last;
53
- prelude.initial = List.initial;
54
- prelude.empty = List.empty;
55
- prelude.reverse = List.reverse;
56
- prelude.difference = List.difference;
57
- prelude.intersection = List.intersection;
58
- prelude.union = List.union;
59
- prelude.countBy = List.countBy;
60
- prelude.groupBy = List.groupBy;
61
- prelude.fold = List.fold;
62
- prelude.foldl = List.foldl;
63
- prelude.fold1 = List.fold1;
64
- prelude.foldl1 = List.foldl1;
65
- prelude.foldr = List.foldr;
66
- prelude.foldr1 = List.foldr1;
67
- prelude.unfoldr = List.unfoldr;
68
- prelude.andList = List.andList;
69
- prelude.orList = List.orList;
70
- prelude.any = List.any;
71
- prelude.all = List.all;
72
- prelude.unique = List.unique;
73
- prelude.sort = List.sort;
74
- prelude.sortWith = List.sortWith;
75
- prelude.sortBy = List.sortBy;
76
- prelude.sum = List.sum;
77
- prelude.product = List.product;
78
- prelude.mean = List.mean;
79
- prelude.average = List.average;
80
- prelude.concat = List.concat;
81
- prelude.concatMap = List.concatMap;
82
- prelude.flatten = List.flatten;
83
- prelude.maximum = List.maximum;
84
- prelude.minimum = List.minimum;
85
- prelude.scan = List.scan;
86
- prelude.scanl = List.scanl;
87
- prelude.scan1 = List.scan1;
88
- prelude.scanl1 = List.scanl1;
89
- prelude.scanr = List.scanr;
90
- prelude.scanr1 = List.scanr1;
91
- prelude.slice = List.slice;
92
- prelude.take = List.take;
93
- prelude.drop = List.drop;
94
- prelude.splitAt = List.splitAt;
95
- prelude.takeWhile = List.takeWhile;
96
- prelude.dropWhile = List.dropWhile;
97
- prelude.span = List.span;
98
- prelude.breakList = List.breakList;
99
- prelude.zip = List.zip;
100
- prelude.zipWith = List.zipWith;
101
- prelude.zipAll = List.zipAll;
102
- prelude.zipAllWith = List.zipAllWith;
103
- prelude.apply = Func.apply;
104
- prelude.curry = Func.curry;
105
- prelude.flip = Func.flip;
106
- prelude.fix = Func.fix;
107
- prelude.split = Str.split;
108
- prelude.join = Str.join;
109
- prelude.lines = Str.lines;
110
- prelude.unlines = Str.unlines;
111
- prelude.words = Str.words;
112
- prelude.unwords = Str.unwords;
113
- prelude.chars = Str.chars;
114
- prelude.unchars = Str.unchars;
115
- prelude.values = Obj.values;
116
- prelude.keys = Obj.keys;
117
- prelude.pairsToObj = Obj.pairsToObj;
118
- prelude.objToPairs = Obj.objToPairs;
119
- prelude.listsToObj = Obj.listsToObj;
120
- prelude.objToLists = Obj.objToLists;
121
- prelude.max = Num.max;
122
- prelude.min = Num.min;
123
- prelude.negate = Num.negate;
124
- prelude.abs = Num.abs;
125
- prelude.signum = Num.signum;
126
- prelude.quot = Num.quot;
127
- prelude.rem = Num.rem;
128
- prelude.div = Num.div;
129
- prelude.mod = Num.mod;
130
- prelude.recip = Num.recip;
131
- prelude.pi = Num.pi;
132
- prelude.tau = Num.tau;
133
- prelude.exp = Num.exp;
134
- prelude.sqrt = Num.sqrt;
135
- prelude.ln = Num.ln;
136
- prelude.pow = Num.pow;
137
- prelude.sin = Num.sin;
138
- prelude.tan = Num.tan;
139
- prelude.cos = Num.cos;
140
- prelude.acos = Num.acos;
141
- prelude.asin = Num.asin;
142
- prelude.atan = Num.atan;
143
- prelude.atan2 = Num.atan2;
144
- prelude.truncate = Num.truncate;
145
- prelude.round = Num.round;
146
- prelude.ceiling = Num.ceiling;
147
- prelude.floor = Num.floor;
148
- prelude.isItNaN = Num.isItNaN;
149
- prelude.even = Num.even;
150
- prelude.odd = Num.odd;
151
- prelude.gcd = Num.gcd;
152
- prelude.lcm = Num.lcm;
153
- prelude.VERSION = '1.0.3';
154
- module.exports = prelude;
155
- function curry$(f, bound){
156
- var context,
157
- _curry = function(args) {
158
- return f.length > 1 ? function(){
159
- var params = args ? args.concat() : [];
160
- context = bound ? context || this : this;
161
- return params.push.apply(params, arguments) <
162
- f.length && arguments.length ?
163
- _curry.call(context, params) : f.apply(context, params);
164
- } : f;
165
- };
166
- return _curry();
167
- }
168
-
169
- },{"./Func.js":1,"./Obj.js":2,"./Num.js":3,"./List.js":4,"./Str.js":5}],1:[function(require,module,exports){
170
- var curry, flip, fix, apply;
171
- curry = function(f){
172
- return curry$(f);
173
- };
174
- flip = curry$(function(f, x, y){
175
- return f(y, x);
176
- });
177
- fix = function(f){
178
- return function(g, x){
179
- return function(){
180
- return f(g(g)).apply(null, arguments);
181
- };
182
- }(function(g, x){
183
- return function(){
184
- return f(g(g)).apply(null, arguments);
185
- };
186
- });
187
- };
188
- apply = curry$(function(f, list){
189
- return f.apply(null, list);
190
- });
191
- module.exports = {
192
- curry: curry,
193
- flip: flip,
194
- fix: fix,
195
- apply: apply
196
- };
197
- function curry$(f, bound){
198
- var context,
199
- _curry = function(args) {
200
- return f.length > 1 ? function(){
201
- var params = args ? args.concat() : [];
202
- context = bound ? context || this : this;
203
- return params.push.apply(params, arguments) <
204
- f.length && arguments.length ?
205
- _curry.call(context, params) : f.apply(context, params);
206
- } : f;
207
- };
208
- return _curry();
209
- }
210
-
211
- },{}],2:[function(require,module,exports){
212
- var values, keys, pairsToObj, objToPairs, listsToObj, objToLists, empty, each, map, compact, filter, reject, partition, find;
213
- values = function(object){
214
- var i$, x, results$ = [];
215
- for (i$ in object) {
216
- x = object[i$];
217
- results$.push(x);
218
- }
219
- return results$;
220
- };
221
- keys = function(object){
222
- var x, results$ = [];
223
- for (x in object) {
224
- results$.push(x);
225
- }
226
- return results$;
227
- };
228
- pairsToObj = function(object){
229
- var i$, len$, x, results$ = {};
230
- for (i$ = 0, len$ = object.length; i$ < len$; ++i$) {
231
- x = object[i$];
232
- results$[x[0]] = x[1];
233
- }
234
- return results$;
235
- };
236
- objToPairs = function(object){
237
- var key, value, results$ = [];
238
- for (key in object) {
239
- value = object[key];
240
- results$.push([key, value]);
241
- }
242
- return results$;
243
- };
244
- listsToObj = curry$(function(keys, values){
245
- var i$, len$, i, key, results$ = {};
246
- for (i$ = 0, len$ = keys.length; i$ < len$; ++i$) {
247
- i = i$;
248
- key = keys[i$];
249
- results$[key] = values[i];
250
- }
251
- return results$;
252
- });
253
- objToLists = function(objectect){
254
- var keys, values, key, value;
255
- keys = [];
256
- values = [];
257
- for (key in objectect) {
258
- value = objectect[key];
259
- keys.push(key);
260
- values.push(value);
261
- }
262
- return [keys, values];
263
- };
264
- empty = function(object){
265
- var x;
266
- for (x in object) {
267
- return false;
268
- }
269
- return true;
270
- };
271
- each = curry$(function(f, object){
272
- var i$, x;
273
- for (i$ in object) {
274
- x = object[i$];
275
- f(x);
276
- }
277
- return object;
278
- });
279
- map = curry$(function(f, object){
280
- var k, x, results$ = {};
281
- for (k in object) {
282
- x = object[k];
283
- results$[k] = f(x);
284
- }
285
- return results$;
286
- });
287
- compact = curry$(function(object){
288
- var k, x, results$ = {};
289
- for (k in object) {
290
- x = object[k];
291
- if (x) {
292
- results$[k] = x;
293
- }
294
- }
295
- return results$;
296
- });
297
- filter = curry$(function(f, object){
298
- var k, x, results$ = {};
299
- for (k in object) {
300
- x = object[k];
301
- if (f(x)) {
302
- results$[k] = x;
303
- }
304
- }
305
- return results$;
306
- });
307
- reject = curry$(function(f, object){
308
- var k, x, results$ = {};
309
- for (k in object) {
310
- x = object[k];
311
- if (!f(x)) {
312
- results$[k] = x;
313
- }
314
- }
315
- return results$;
316
- });
317
- partition = curry$(function(f, object){
318
- var passed, failed, k, x;
319
- passed = {};
320
- failed = {};
321
- for (k in object) {
322
- x = object[k];
323
- (f(x) ? passed : failed)[k] = x;
324
- }
325
- return [passed, failed];
326
- });
327
- find = curry$(function(f, object){
328
- var i$, x;
329
- for (i$ in object) {
330
- x = object[i$];
331
- if (f(x)) {
332
- return x;
333
- }
334
- }
335
- });
336
- module.exports = {
337
- values: values,
338
- keys: keys,
339
- pairsToObj: pairsToObj,
340
- objToPairs: objToPairs,
341
- listsToObj: listsToObj,
342
- objToLists: objToLists,
343
- empty: empty,
344
- each: each,
345
- map: map,
346
- filter: filter,
347
- compact: compact,
348
- reject: reject,
349
- partition: partition,
350
- find: find
351
- };
352
- function curry$(f, bound){
353
- var context,
354
- _curry = function(args) {
355
- return f.length > 1 ? function(){
356
- var params = args ? args.concat() : [];
357
- context = bound ? context || this : this;
358
- return params.push.apply(params, arguments) <
359
- f.length && arguments.length ?
360
- _curry.call(context, params) : f.apply(context, params);
361
- } : f;
362
- };
363
- return _curry();
364
- }
365
-
366
- },{}],3:[function(require,module,exports){
367
- var max, min, negate, abs, signum, quot, rem, div, mod, recip, pi, tau, exp, sqrt, ln, pow, sin, tan, cos, asin, acos, atan, atan2, truncate, round, ceiling, floor, isItNaN, even, odd, gcd, lcm;
368
- max = curry$(function(x$, y$){
369
- return x$ > y$ ? x$ : y$;
370
- });
371
- min = curry$(function(x$, y$){
372
- return x$ < y$ ? x$ : y$;
373
- });
374
- negate = function(x){
375
- return -x;
376
- };
377
- abs = Math.abs;
378
- signum = function(x){
379
- if (x < 0) {
380
- return -1;
381
- } else if (x > 0) {
382
- return 1;
383
- } else {
384
- return 0;
385
- }
386
- };
387
- quot = curry$(function(x, y){
388
- return ~~(x / y);
389
- });
390
- rem = curry$(function(x$, y$){
391
- return x$ % y$;
392
- });
393
- div = curry$(function(x, y){
394
- return Math.floor(x / y);
395
- });
396
- mod = curry$(function(x$, y$){
397
- var ref$;
398
- return ((x$) % (ref$ = y$) + ref$) % ref$;
399
- });
400
- recip = (function(it){
401
- return 1 / it;
402
- });
403
- pi = Math.PI;
404
- tau = pi * 2;
405
- exp = Math.exp;
406
- sqrt = Math.sqrt;
407
- ln = Math.log;
408
- pow = curry$(function(x$, y$){
409
- return Math.pow(x$, y$);
410
- });
411
- sin = Math.sin;
412
- tan = Math.tan;
413
- cos = Math.cos;
414
- asin = Math.asin;
415
- acos = Math.acos;
416
- atan = Math.atan;
417
- atan2 = curry$(function(x, y){
418
- return Math.atan2(x, y);
419
- });
420
- truncate = function(x){
421
- return ~~x;
422
- };
423
- round = Math.round;
424
- ceiling = Math.ceil;
425
- floor = Math.floor;
426
- isItNaN = function(x){
427
- return x !== x;
428
- };
429
- even = function(x){
430
- return x % 2 === 0;
431
- };
432
- odd = function(x){
433
- return x % 2 !== 0;
434
- };
435
- gcd = curry$(function(x, y){
436
- var z;
437
- x = Math.abs(x);
438
- y = Math.abs(y);
439
- while (y !== 0) {
440
- z = x % y;
441
- x = y;
442
- y = z;
443
- }
444
- return x;
445
- });
446
- lcm = curry$(function(x, y){
447
- return Math.abs(Math.floor(x / gcd(x, y) * y));
448
- });
449
- module.exports = {
450
- max: max,
451
- min: min,
452
- negate: negate,
453
- abs: abs,
454
- signum: signum,
455
- quot: quot,
456
- rem: rem,
457
- div: div,
458
- mod: mod,
459
- recip: recip,
460
- pi: pi,
461
- tau: tau,
462
- exp: exp,
463
- sqrt: sqrt,
464
- ln: ln,
465
- pow: pow,
466
- sin: sin,
467
- tan: tan,
468
- cos: cos,
469
- acos: acos,
470
- asin: asin,
471
- atan: atan,
472
- atan2: atan2,
473
- truncate: truncate,
474
- round: round,
475
- ceiling: ceiling,
476
- floor: floor,
477
- isItNaN: isItNaN,
478
- even: even,
479
- odd: odd,
480
- gcd: gcd,
481
- lcm: lcm
482
- };
483
- function curry$(f, bound){
484
- var context,
485
- _curry = function(args) {
486
- return f.length > 1 ? function(){
487
- var params = args ? args.concat() : [];
488
- context = bound ? context || this : this;
489
- return params.push.apply(params, arguments) <
490
- f.length && arguments.length ?
491
- _curry.call(context, params) : f.apply(context, params);
492
- } : f;
493
- };
494
- return _curry();
495
- }
496
-
497
- },{}],4:[function(require,module,exports){
498
- var each, map, compact, filter, reject, partition, find, head, first, tail, last, initial, empty, reverse, unique, fold, foldl, fold1, foldl1, foldr, foldr1, unfoldr, concat, concatMap, flatten, difference, intersection, union, countBy, groupBy, andList, orList, any, all, sort, sortWith, sortBy, sum, product, mean, average, maximum, minimum, scan, scanl, scan1, scanl1, scanr, scanr1, slice, take, drop, splitAt, takeWhile, dropWhile, span, breakList, zip, zipWith, zipAll, zipAllWith, toString$ = {}.toString, slice$ = [].slice;
499
- each = curry$(function(f, xs){
500
- var i$, len$, x;
501
- for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
502
- x = xs[i$];
503
- f(x);
504
- }
505
- return xs;
506
- });
507
- map = curry$(function(f, xs){
508
- var i$, len$, x, results$ = [];
509
- for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
510
- x = xs[i$];
511
- results$.push(f(x));
512
- }
513
- return results$;
514
- });
515
- compact = curry$(function(xs){
516
- var i$, len$, x, results$ = [];
517
- for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
518
- x = xs[i$];
519
- if (x) {
520
- results$.push(x);
521
- }
522
- }
523
- return results$;
524
- });
525
- filter = curry$(function(f, xs){
526
- var i$, len$, x, results$ = [];
527
- for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
528
- x = xs[i$];
529
- if (f(x)) {
530
- results$.push(x);
531
- }
532
- }
533
- return results$;
534
- });
535
- reject = curry$(function(f, xs){
536
- var i$, len$, x, results$ = [];
537
- for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
538
- x = xs[i$];
539
- if (!f(x)) {
540
- results$.push(x);
541
- }
542
- }
543
- return results$;
544
- });
545
- partition = curry$(function(f, xs){
546
- var passed, failed, i$, len$, x;
547
- passed = [];
548
- failed = [];
549
- for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
550
- x = xs[i$];
551
- (f(x) ? passed : failed).push(x);
552
- }
553
- return [passed, failed];
554
- });
555
- find = curry$(function(f, xs){
556
- var i$, len$, x;
557
- for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
558
- x = xs[i$];
559
- if (f(x)) {
560
- return x;
561
- }
562
- }
563
- });
564
- head = first = function(xs){
565
- if (!xs.length) {
566
- return;
567
- }
568
- return xs[0];
569
- };
570
- tail = function(xs){
571
- if (!xs.length) {
572
- return;
573
- }
574
- return xs.slice(1);
575
- };
576
- last = function(xs){
577
- if (!xs.length) {
578
- return;
579
- }
580
- return xs[xs.length - 1];
581
- };
582
- initial = function(xs){
583
- var len;
584
- len = xs.length;
585
- if (!len) {
586
- return;
587
- }
588
- return xs.slice(0, len - 1);
589
- };
590
- empty = function(xs){
591
- return !xs.length;
592
- };
593
- reverse = function(xs){
594
- return xs.concat().reverse();
595
- };
596
- unique = function(xs){
597
- var result, i$, len$, x;
598
- result = [];
599
- for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
600
- x = xs[i$];
601
- if (!in$(x, result)) {
602
- result.push(x);
603
- }
604
- }
605
- return result;
606
- };
607
- fold = foldl = curry$(function(f, memo, xs){
608
- var i$, len$, x;
609
- for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
610
- x = xs[i$];
611
- memo = f(memo, x);
612
- }
613
- return memo;
614
- });
615
- fold1 = foldl1 = curry$(function(f, xs){
616
- return fold(f, xs[0], xs.slice(1));
617
- });
618
- foldr = curry$(function(f, memo, xs){
619
- return fold(f, memo, xs.concat().reverse());
620
- });
621
- foldr1 = curry$(function(f, xs){
622
- var ys;
623
- ys = xs.concat().reverse();
624
- return fold(f, ys[0], ys.slice(1));
625
- });
626
- unfoldr = curry$(function(f, b){
627
- var result, x, that;
628
- result = [];
629
- x = b;
630
- while ((that = f(x)) != null) {
631
- result.push(that[0]);
632
- x = that[1];
633
- }
634
- return result;
635
- });
636
- concat = function(xss){
637
- return [].concat.apply([], xss);
638
- };
639
- concatMap = curry$(function(f, xs){
640
- var x;
641
- return [].concat.apply([], (function(){
642
- var i$, ref$, len$, results$ = [];
643
- for (i$ = 0, len$ = (ref$ = xs).length; i$ < len$; ++i$) {
644
- x = ref$[i$];
645
- results$.push(f(x));
646
- }
647
- return results$;
648
- }()));
649
- });
650
- flatten = curry$(function(xs){
651
- var x;
652
- return [].concat.apply([], (function(){
653
- var i$, ref$, len$, results$ = [];
654
- for (i$ = 0, len$ = (ref$ = xs).length; i$ < len$; ++i$) {
655
- x = ref$[i$];
656
- if (toString$.call(x).slice(8, -1) === 'Array') {
657
- results$.push(flatten(x));
658
- } else {
659
- results$.push(x);
660
- }
661
- }
662
- return results$;
663
- }()));
664
- });
665
- difference = function(xs){
666
- var yss, results, i$, len$, x, j$, len1$, ys;
667
- yss = slice$.call(arguments, 1);
668
- results = [];
669
- outer: for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
670
- x = xs[i$];
671
- for (j$ = 0, len1$ = yss.length; j$ < len1$; ++j$) {
672
- ys = yss[j$];
673
- if (in$(x, ys)) {
674
- continue outer;
675
- }
676
- }
677
- results.push(x);
678
- }
679
- return results;
680
- };
681
- intersection = function(xs){
682
- var yss, results, i$, len$, x, j$, len1$, ys;
683
- yss = slice$.call(arguments, 1);
684
- results = [];
685
- outer: for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
686
- x = xs[i$];
687
- for (j$ = 0, len1$ = yss.length; j$ < len1$; ++j$) {
688
- ys = yss[j$];
689
- if (!in$(x, ys)) {
690
- continue outer;
691
- }
692
- }
693
- results.push(x);
694
- }
695
- return results;
696
- };
697
- union = function(){
698
- var xss, results, i$, len$, xs, j$, len1$, x;
699
- xss = slice$.call(arguments);
700
- results = [];
701
- for (i$ = 0, len$ = xss.length; i$ < len$; ++i$) {
702
- xs = xss[i$];
703
- for (j$ = 0, len1$ = xs.length; j$ < len1$; ++j$) {
704
- x = xs[j$];
705
- if (!in$(x, results)) {
706
- results.push(x);
707
- }
708
- }
709
- }
710
- return results;
711
- };
712
- countBy = curry$(function(f, xs){
713
- var results, i$, len$, x, key;
714
- results = {};
715
- for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
716
- x = xs[i$];
717
- key = f(x);
718
- if (key in results) {
719
- results[key] += 1;
720
- } else {
721
- results[key] = 1;
722
- }
723
- }
724
- return results;
725
- });
726
- groupBy = curry$(function(f, xs){
727
- var results, i$, len$, x, key;
728
- results = {};
729
- for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
730
- x = xs[i$];
731
- key = f(x);
732
- if (key in results) {
733
- results[key].push(x);
734
- } else {
735
- results[key] = [x];
736
- }
737
- }
738
- return results;
739
- });
740
- andList = function(xs){
741
- var i$, len$, x;
742
- for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
743
- x = xs[i$];
744
- if (!x) {
745
- return false;
746
- }
747
- }
748
- return true;
749
- };
750
- orList = function(xs){
751
- var i$, len$, x;
752
- for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
753
- x = xs[i$];
754
- if (x) {
755
- return true;
756
- }
757
- }
758
- return false;
759
- };
760
- any = curry$(function(f, xs){
761
- var i$, len$, x;
762
- for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
763
- x = xs[i$];
764
- if (f(x)) {
765
- return true;
766
- }
767
- }
768
- return false;
769
- });
770
- all = curry$(function(f, xs){
771
- var i$, len$, x;
772
- for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
773
- x = xs[i$];
774
- if (!f(x)) {
775
- return false;
776
- }
777
- }
778
- return true;
779
- });
780
- sort = function(xs){
781
- return xs.concat().sort(function(x, y){
782
- if (x > y) {
783
- return 1;
784
- } else if (x < y) {
785
- return -1;
786
- } else {
787
- return 0;
788
- }
789
- });
790
- };
791
- sortWith = curry$(function(f, xs){
792
- if (!xs.length) {
793
- return [];
794
- }
795
- return xs.concat().sort(f);
796
- });
797
- sortBy = curry$(function(f, xs){
798
- if (!xs.length) {
799
- return [];
800
- }
801
- return xs.concat().sort(function(x, y){
802
- if (f(x) > f(y)) {
803
- return 1;
804
- } else if (f(x) < f(y)) {
805
- return -1;
806
- } else {
807
- return 0;
808
- }
809
- });
810
- });
811
- sum = function(xs){
812
- var result, i$, len$, x;
813
- result = 0;
814
- for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
815
- x = xs[i$];
816
- result += x;
817
- }
818
- return result;
819
- };
820
- product = function(xs){
821
- var result, i$, len$, x;
822
- result = 1;
823
- for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
824
- x = xs[i$];
825
- result *= x;
826
- }
827
- return result;
828
- };
829
- mean = average = function(xs){
830
- var sum, len, i$, i;
831
- sum = 0;
832
- len = xs.length;
833
- for (i$ = 0; i$ < len; ++i$) {
834
- i = i$;
835
- sum += xs[i];
836
- }
837
- return sum / len;
838
- };
839
- maximum = function(xs){
840
- var max, i$, ref$, len$, x;
841
- max = xs[0];
842
- for (i$ = 0, len$ = (ref$ = xs.slice(1)).length; i$ < len$; ++i$) {
843
- x = ref$[i$];
844
- if (x > max) {
845
- max = x;
846
- }
847
- }
848
- return max;
849
- };
850
- minimum = function(xs){
851
- var min, i$, ref$, len$, x;
852
- min = xs[0];
853
- for (i$ = 0, len$ = (ref$ = xs.slice(1)).length; i$ < len$; ++i$) {
854
- x = ref$[i$];
855
- if (x < min) {
856
- min = x;
857
- }
858
- }
859
- return min;
860
- };
861
- scan = scanl = curry$(function(f, memo, xs){
862
- var last, x;
863
- last = memo;
864
- return [memo].concat((function(){
865
- var i$, ref$, len$, results$ = [];
866
- for (i$ = 0, len$ = (ref$ = xs).length; i$ < len$; ++i$) {
867
- x = ref$[i$];
868
- results$.push(last = f(last, x));
869
- }
870
- return results$;
871
- }()));
872
- });
873
- scan1 = scanl1 = curry$(function(f, xs){
874
- if (!xs.length) {
875
- return;
876
- }
877
- return scan(f, xs[0], xs.slice(1));
878
- });
879
- scanr = curry$(function(f, memo, xs){
880
- xs = xs.concat().reverse();
881
- return scan(f, memo, xs).reverse();
882
- });
883
- scanr1 = curry$(function(f, xs){
884
- if (!xs.length) {
885
- return;
886
- }
887
- xs = xs.concat().reverse();
888
- return scan(f, xs[0], xs.slice(1)).reverse();
889
- });
890
- slice = curry$(function(x, y, xs){
891
- return xs.slice(x, y);
892
- });
893
- take = curry$(function(n, xs){
894
- if (n <= 0) {
895
- return xs.slice(0, 0);
896
- } else if (!xs.length) {
897
- return xs;
898
- } else {
899
- return xs.slice(0, n);
900
- }
901
- });
902
- drop = curry$(function(n, xs){
903
- if (n <= 0 || !xs.length) {
904
- return xs;
905
- } else {
906
- return xs.slice(n);
907
- }
908
- });
909
- splitAt = curry$(function(n, xs){
910
- return [take(n, xs), drop(n, xs)];
911
- });
912
- takeWhile = curry$(function(p, xs){
913
- var len, i;
914
- len = xs.length;
915
- if (!len) {
916
- return xs;
917
- }
918
- i = 0;
919
- while (i < len && p(xs[i])) {
920
- i += 1;
921
- }
922
- return xs.slice(0, i);
923
- });
924
- dropWhile = curry$(function(p, xs){
925
- var len, i;
926
- len = xs.length;
927
- if (!len) {
928
- return xs;
929
- }
930
- i = 0;
931
- while (i < len && p(xs[i])) {
932
- i += 1;
933
- }
934
- return xs.slice(i);
935
- });
936
- span = curry$(function(p, xs){
937
- return [takeWhile(p, xs), dropWhile(p, xs)];
938
- });
939
- breakList = curry$(function(p, xs){
940
- return span(compose$([not$, p]), xs);
941
- });
942
- zip = curry$(function(xs, ys){
943
- var result, len, i$, len$, i, x;
944
- result = [];
945
- len = ys.length;
946
- for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
947
- i = i$;
948
- x = xs[i$];
949
- if (i === len) {
950
- break;
951
- }
952
- result.push([x, ys[i]]);
953
- }
954
- return result;
955
- });
956
- zipWith = curry$(function(f, xs, ys){
957
- var result, len, i$, len$, i, x;
958
- result = [];
959
- len = ys.length;
960
- for (i$ = 0, len$ = xs.length; i$ < len$; ++i$) {
961
- i = i$;
962
- x = xs[i$];
963
- if (i === len) {
964
- break;
965
- }
966
- result.push(f(x, ys[i]));
967
- }
968
- return result;
969
- });
970
- zipAll = function(){
971
- var xss, minLength, i$, len$, xs, ref$, i, lresult$, j$, results$ = [];
972
- xss = slice$.call(arguments);
973
- minLength = 9e9;
974
- for (i$ = 0, len$ = xss.length; i$ < len$; ++i$) {
975
- xs = xss[i$];
976
- minLength <= (ref$ = xs.length) || (minLength = ref$);
977
- }
978
- for (i$ = 0; i$ < minLength; ++i$) {
979
- i = i$;
980
- lresult$ = [];
981
- for (j$ = 0, len$ = xss.length; j$ < len$; ++j$) {
982
- xs = xss[j$];
983
- lresult$.push(xs[i]);
984
- }
985
- results$.push(lresult$);
986
- }
987
- return results$;
988
- };
989
- zipAllWith = function(f){
990
- var xss, minLength, i$, len$, xs, ref$, i, results$ = [];
991
- xss = slice$.call(arguments, 1);
992
- minLength = 9e9;
993
- for (i$ = 0, len$ = xss.length; i$ < len$; ++i$) {
994
- xs = xss[i$];
995
- minLength <= (ref$ = xs.length) || (minLength = ref$);
996
- }
997
- for (i$ = 0; i$ < minLength; ++i$) {
998
- i = i$;
999
- results$.push(f.apply(null, (fn$())));
1000
- }
1001
- return results$;
1002
- function fn$(){
1003
- var i$, ref$, len$, results$ = [];
1004
- for (i$ = 0, len$ = (ref$ = xss).length; i$ < len$; ++i$) {
1005
- xs = ref$[i$];
1006
- results$.push(xs[i]);
1007
- }
1008
- return results$;
1009
- }
1010
- };
1011
- module.exports = {
1012
- each: each,
1013
- map: map,
1014
- filter: filter,
1015
- compact: compact,
1016
- reject: reject,
1017
- partition: partition,
1018
- find: find,
1019
- head: head,
1020
- first: first,
1021
- tail: tail,
1022
- last: last,
1023
- initial: initial,
1024
- empty: empty,
1025
- reverse: reverse,
1026
- difference: difference,
1027
- intersection: intersection,
1028
- union: union,
1029
- countBy: countBy,
1030
- groupBy: groupBy,
1031
- fold: fold,
1032
- fold1: fold1,
1033
- foldl: foldl,
1034
- foldl1: foldl1,
1035
- foldr: foldr,
1036
- foldr1: foldr1,
1037
- unfoldr: unfoldr,
1038
- andList: andList,
1039
- orList: orList,
1040
- any: any,
1041
- all: all,
1042
- unique: unique,
1043
- sort: sort,
1044
- sortWith: sortWith,
1045
- sortBy: sortBy,
1046
- sum: sum,
1047
- product: product,
1048
- mean: mean,
1049
- average: average,
1050
- concat: concat,
1051
- concatMap: concatMap,
1052
- flatten: flatten,
1053
- maximum: maximum,
1054
- minimum: minimum,
1055
- scan: scan,
1056
- scan1: scan1,
1057
- scanl: scanl,
1058
- scanl1: scanl1,
1059
- scanr: scanr,
1060
- scanr1: scanr1,
1061
- slice: slice,
1062
- take: take,
1063
- drop: drop,
1064
- splitAt: splitAt,
1065
- takeWhile: takeWhile,
1066
- dropWhile: dropWhile,
1067
- span: span,
1068
- breakList: breakList,
1069
- zip: zip,
1070
- zipWith: zipWith,
1071
- zipAll: zipAll,
1072
- zipAllWith: zipAllWith
1073
- };
1074
- function curry$(f, bound){
1075
- var context,
1076
- _curry = function(args) {
1077
- return f.length > 1 ? function(){
1078
- var params = args ? args.concat() : [];
1079
- context = bound ? context || this : this;
1080
- return params.push.apply(params, arguments) <
1081
- f.length && arguments.length ?
1082
- _curry.call(context, params) : f.apply(context, params);
1083
- } : f;
1084
- };
1085
- return _curry();
1086
- }
1087
- function in$(x, arr){
1088
- var i = -1, l = arr.length >>> 0;
1089
- while (++i < l) if (x === arr[i] && i in arr) return true;
1090
- return false;
1091
- }
1092
- function compose$(fs){
1093
- return function(){
1094
- var i, args = arguments;
1095
- for (i = fs.length; i > 0; --i) { args = [fs[i-1].apply(this, args)]; }
1096
- return args[0];
1097
- };
1098
- }
1099
- function not$(x){ return !x; }
1100
-
1101
- },{}],5:[function(require,module,exports){
1102
- var split, join, lines, unlines, words, unwords, chars, unchars, reverse, repeat;
1103
- split = curry$(function(sep, str){
1104
- return str.split(sep);
1105
- });
1106
- join = curry$(function(sep, xs){
1107
- return xs.join(sep);
1108
- });
1109
- lines = function(str){
1110
- if (!str.length) {
1111
- return [];
1112
- }
1113
- return str.split('\n');
1114
- };
1115
- unlines = function(it){
1116
- return it.join('\n');
1117
- };
1118
- words = function(str){
1119
- if (!str.length) {
1120
- return [];
1121
- }
1122
- return str.split(/[ ]+/);
1123
- };
1124
- unwords = function(it){
1125
- return it.join(' ');
1126
- };
1127
- chars = function(it){
1128
- return it.split('');
1129
- };
1130
- unchars = function(it){
1131
- return it.join('');
1132
- };
1133
- reverse = function(str){
1134
- return str.split('').reverse().join('');
1135
- };
1136
- repeat = curry$(function(n, str){
1137
- var out, res$, i$;
1138
- res$ = [];
1139
- for (i$ = 0; i$ < n; ++i$) {
1140
- res$.push(str);
1141
- }
1142
- out = res$;
1143
- return out.join('');
1144
- });
1145
- module.exports = {
1146
- split: split,
1147
- join: join,
1148
- lines: lines,
1149
- unlines: unlines,
1150
- words: words,
1151
- unwords: unwords,
1152
- chars: chars,
1153
- unchars: unchars,
1154
- reverse: reverse,
1155
- repeat: repeat
1156
- };
1157
- function curry$(f, bound){
1158
- var context,
1159
- _curry = function(args) {
1160
- return f.length > 1 ? function(){
1161
- var params = args ? args.concat() : [];
1162
- context = bound ? context || this : this;
1163
- return params.push.apply(params, arguments) <
1164
- f.length && arguments.length ?
1165
- _curry.call(context, params) : f.apply(context, params);
1166
- } : f;
1167
- };
1168
- return _curry();
1169
- }
1170
-
1171
- },{}]},{},[])
1172
- ;