jekyll_pages_api_search 0.3.2 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CONTRIBUTING.md +75 -2
- data/README.md +118 -79
- data/assets/js/search-bundle.js +16 -12
- data/assets/js/search-bundle.js.gz +0 -0
- data/assets/js/search.js +90 -64
- data/assets/png/search.png +0 -0
- data/assets/svg/search.svg +6 -0
- data/lib/jekyll_pages_api_search.rb +9 -9
- data/lib/jekyll_pages_api_search/assets.rb +32 -2
- data/lib/jekyll_pages_api_search/compressor.rb +2 -2
- data/lib/jekyll_pages_api_search/config.rb +20 -0
- data/lib/jekyll_pages_api_search/generator.rb +17 -0
- data/lib/jekyll_pages_api_search/layouts/search-results.html +11 -0
- data/lib/jekyll_pages_api_search/lunr.min.js +2 -2
- data/lib/jekyll_pages_api_search/sass/jekyll_pages_api_search.scss +16 -33
- data/lib/jekyll_pages_api_search/search.html +9 -17
- data/lib/jekyll_pages_api_search/search.js +34 -17
- data/lib/jekyll_pages_api_search/search.rb +17 -13
- data/lib/jekyll_pages_api_search/search_hook.rb +5 -5
- data/lib/jekyll_pages_api_search/search_page.rb +30 -0
- data/lib/jekyll_pages_api_search/search_page_layouts.rb +42 -0
- data/lib/jekyll_pages_api_search/standalone.rb +3 -3
- data/lib/jekyll_pages_api_search/tags.rb +15 -1
- data/lib/jekyll_pages_api_search/version.rb +1 -1
- metadata +9 -17
- data/lib/jekyll_pages_api_search/js_copier.rb +0 -33
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 81cecc0754567d314afd3086f4ea24be98faf6d0
|
4
|
+
data.tar.gz: 947c785fad9e4238d1d502e9f2ef9966800d5cb2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 144b8f66a8550475ad9187c116a19df9dc72ca0c97a62fc25147ef03d971e421eb44391624251ac9e1a853cc9e04136587ffe8ab475b0781113e6207d2e042fd
|
7
|
+
data.tar.gz: a137c0de49749f57f415e66b44589c75716d4aa2209200dfb5a1a273cd5c6991fab60e713fbc660cb2918e261a89446eb19b047e4ea88ec5a21b442098347ada
|
data/CONTRIBUTING.md
CHANGED
@@ -1,8 +1,17 @@
|
|
1
1
|
## Welcome!
|
2
2
|
|
3
|
-
We're so glad you're thinking about contributing to an 18F open source project!
|
3
|
+
We're so glad you're thinking about contributing to an 18F open source project!
|
4
|
+
If you're unsure or afraid of anything, just ask or submit the issue or pull
|
5
|
+
request anyways. The worst that can happen is that you'll be politely asked to
|
6
|
+
change something. We appreciate any sort of contribution, and don't want a wall
|
7
|
+
of rules to get in the way of that.
|
4
8
|
|
5
|
-
Before contributing, we encourage you to read our CONTRIBUTING policy (you are
|
9
|
+
Before contributing, we encourage you to read our CONTRIBUTING policy (you are
|
10
|
+
here), our LICENSE, and our README, all of which should be in this repository.
|
11
|
+
If you have any questions, or want to read more about our underlying policies,
|
12
|
+
you can consult the 18F Open Source Policy GitHub repository at
|
13
|
+
https://github.com/18f/open-source-policy, or just shoot us an email/official
|
14
|
+
government letterhead note to [18f@gsa.gov](mailto:18f@gsa.gov).
|
6
15
|
|
7
16
|
## Public domain
|
8
17
|
|
@@ -13,3 +22,67 @@ the [CC0 1.0 Universal public domain dedication](https://creativecommons.org/pub
|
|
13
22
|
All contributions to this project will be released under the CC0
|
14
23
|
dedication. By submitting a pull request, you are agreeing to comply
|
15
24
|
with this waiver of copyright interest.
|
25
|
+
|
26
|
+
## Starting work on an issue
|
27
|
+
|
28
|
+
Issues that are marked with the `ready` label are ripe for the picking! Simply
|
29
|
+
assign yourself to the issue to and change its label to `in progress` to
|
30
|
+
indicate that you are working on it.
|
31
|
+
|
32
|
+
If the issue involves writing code or producing some other change that will
|
33
|
+
result in a pull request, begin by creating yourself a branch with a short
|
34
|
+
descriptive name of the work that includes the issue number at the end, e.g.,
|
35
|
+
`document-pr-process-#36`.
|
36
|
+
|
37
|
+
**Note:** If you are not a part of the 18F Team, please fork the repository
|
38
|
+
first and then create a branch for yourself with the same convention.
|
39
|
+
|
40
|
+
Once your local branch is created, simply push it remotely and this will
|
41
|
+
assign the issue to you and move it to be `in progress` automatically.
|
42
|
+
|
43
|
+
## Submitting a pull request and completing work
|
44
|
+
|
45
|
+
When you are satisfied with your work and ready to submit it to be completed,
|
46
|
+
please submit a pull request for review. If you haven't already, please
|
47
|
+
follow the instructions above and create a branch for yourself first. Prior
|
48
|
+
to submitting the pull request, please make note of the following:
|
49
|
+
|
50
|
+
1. Code changes should be accompanied by tests.
|
51
|
+
2. Please run the tests (`$ npm test`) and the linter
|
52
|
+
(`$ npm run-script lint`) to make sure there are no regressions.
|
53
|
+
|
54
|
+
Once everything is ready to go, [submit your pull request](https://help.github.com/articles/using-pull-requests/)!
|
55
|
+
When creating a pull request please be sure to reference the issue number it
|
56
|
+
is associated with, preferably in the title.
|
57
|
+
|
58
|
+
If you are working in a branch off of the `18F/jekyll_pages_api_search` repo
|
59
|
+
directly, you can reference the issue like this:
|
60
|
+
`Closes #45: Short sentence describing the pull request`
|
61
|
+
|
62
|
+
If you are working in a forked copy of the repo, please reference the issue
|
63
|
+
like this:
|
64
|
+
`Closes 18F/jekyll_pages_api_search#45: Short sentence describing the pull
|
65
|
+
request`
|
66
|
+
|
67
|
+
In both cases, please include a descriptive summary of the change in the body
|
68
|
+
of the pull request as that will help greatly in reviewing the change and
|
69
|
+
understanding what should be taking place inside of it.
|
70
|
+
|
71
|
+
By referencing the issue in the pull request as noted above, this will
|
72
|
+
automatically update the issue with a `needs review` label and notify the
|
73
|
+
collaborators on the project that something is ready for a review. One of us
|
74
|
+
will take a look as soon as we can and initiate the review process, provide
|
75
|
+
feedback as necessary, and ultimately merge the change.
|
76
|
+
|
77
|
+
Once the code is merged, the branch will be deleted and the `in review`
|
78
|
+
label will be removed. The issue will be automatically updated again to be
|
79
|
+
marked as Done and Closed.
|
80
|
+
|
81
|
+
## Performing a review of a pull request
|
82
|
+
|
83
|
+
If you are performing a review of a pull request please add the `in review`
|
84
|
+
label to the pull request and be sure keep the `needs review` label
|
85
|
+
associated with it. This will help keep our Waffle board up-to-date and
|
86
|
+
reflect that the pull request is being actively reviewed. Also, please
|
87
|
+
assign yourself so others know who the primary reviewer is.
|
88
|
+
|
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
## jekyll_pages_api_search Plugin
|
2
2
|
|
3
|
+
[](https://travis-ci.org/18F/jekyll_pages_api_search)
|
4
|
+
|
3
5
|
This Ruby gem adds a [lunr.js](http://lunrjs.com) search index to a
|
4
6
|
[Jekyll](http://jekyllrb.com/)-based web site.
|
5
7
|
|
@@ -8,48 +10,83 @@ or `jekyll serve`. The supporting JavaScript code is optimized, compressed,
|
|
8
10
|
and loads asynchronously. These features ensure that the preparation of the
|
9
11
|
search index does not introduce rendering latency in the browser.
|
10
12
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
13
|
+
<figure>
|
14
|
+
<img src='https://cloud.githubusercontent.com/assets/301547/13036790/489b5e50-d33f-11e5-9ba5-943bc6094650.gif' alt='Search demo' /><br/>
|
15
|
+
<figcaption>Example of querying the search index and selecting from the search
|
16
|
+
results page. The `/` key moves focus to the search query box, and the first
|
17
|
+
result receives the tab index, making mouse-based navigation unnecessary.
|
18
|
+
</figcaption>
|
19
|
+
</figure>
|
20
|
+
|
21
|
+
## How it works
|
22
|
+
|
23
|
+
On the server building the site, the plugin takes the corpus produced by the
|
24
|
+
[`jekyll_pages_api` gem](https://github.com/18F/jekyll_pages_api/) and feeds
|
25
|
+
it to a [Node.js](https://nodejs.org/) script that compiles it into a lunr.js
|
26
|
+
index, serialized as JSON. The plugin adds this output file to the Jekyll site
|
27
|
+
output. It generates a compressed copy as well, enabling web servers to take
|
28
|
+
advantage of sending the compressed output directly, e.g. using the [Nginx
|
29
|
+
`gzip_static on` directive](http://nginx.org/en/docs/http/ngx_http_gzip_static_module.html).
|
30
|
+
|
31
|
+
The gem also generates a (configurable, customizable) search results page that
|
32
|
+
will serve the search results.
|
33
|
+
|
34
|
+
On the client, the search interface box submits a query form that fetches the
|
35
|
+
search results page. The code on the search results page then fetches the
|
36
|
+
search index from the server (which will be cached by the browser until the
|
37
|
+
next site build). After loading the index, the page issues the query and
|
38
|
+
inserts the results into its search results interface element.
|
39
|
+
|
40
|
+
All of the client-side components are bundled together with
|
41
|
+
`assets/js/search.js` into `assets/js/search-bundle.js` using
|
42
|
+
[Browserify](http://browserify.org/).
|
43
|
+
|
44
|
+
## Installation
|
45
|
+
|
46
|
+
1. Install [Node.js](https://nodejs.org/) on your system. This plugin requires
|
47
|
+
version 4.2 or greater or version 5 or greater. You may wish to first install a
|
48
|
+
version manager such as [nvm](https://github.com/creationix/nvm) to manage and install different Node.js versions.
|
49
|
+
|
50
|
+
|
51
|
+
1. Add this line to your Jekyll project's `Gemfile`:
|
52
|
+
```ruby
|
53
|
+
group :jekyll_plugins do
|
54
|
+
gem 'jekyll_pages_api_search'
|
55
|
+
end
|
56
|
+
```
|
57
|
+
|
58
|
+
1. Add the following to the project's `_config.yml` file:
|
59
|
+
|
60
|
+
```yaml
|
61
|
+
# Configuration for jekyll_pages_api_search plugin gem.
|
62
|
+
jekyll_pages_api_search:
|
63
|
+
# Uncomment this to speed up site generation while developing.
|
64
|
+
#skip_index: true
|
65
|
+
|
66
|
+
# Each member of `index_fields` should correspond to a field generated by
|
67
|
+
# the jekyll_pages_api. It can hold an optional `boost` member as a signal
|
68
|
+
# to Lunr.js to weight the field more highly (default is 1).
|
69
|
+
index_fields:
|
70
|
+
title:
|
71
|
+
boost: 10
|
72
|
+
tags:
|
73
|
+
boost: 10
|
74
|
+
url:
|
75
|
+
boost: 5
|
76
|
+
body:
|
77
|
+
```
|
78
|
+
|
79
|
+
1. Run `jekyll build` or `jekyll serve` to produce `search-index.json` and
|
80
|
+
`search-index.json.gz` files in the `_site` directory (or other output
|
81
|
+
directory, as configured).
|
82
|
+
|
83
|
+
1. If you're running [Nginx](http://nginx.org), you may want to use the
|
84
|
+
[`gzip_static on`
|
85
|
+
directive](http://nginx.org/en/docs/http/ngx_http_gzip_static_module.html)
|
86
|
+
to take advantage of the gzipped versions of the search index and supporting
|
87
|
+
JavaScript.
|
88
|
+
|
89
|
+
## Usage
|
53
90
|
|
54
91
|
To add the index to your pages, insert the following tags in your `_layouts`
|
55
92
|
and `_includes` files as you see fit:
|
@@ -66,57 +103,66 @@ assets](http://jekyllrb.com/docs/assets/) to use the default interface style.
|
|
66
103
|
Add `skip_index: true` to the front matter of any documents you would like to
|
67
104
|
exclude from the index (e.g. indexes that contain summaries of other documents).
|
68
105
|
|
69
|
-
|
106
|
+
## Configuration
|
107
|
+
|
108
|
+
In addition to the fields listed above in the [installation
|
109
|
+
instructions](#installation), the following properties of the
|
110
|
+
`jekyll_pages_api_search` configuration object are also available:
|
111
|
+
|
112
|
+
- **results_page_title**: Sets the title of the generated search results page.
|
113
|
+
- **layout**: The name of the layout file for the search results page, minus
|
114
|
+
the `.html` suffix. By default this is `search-results`, and is provided by
|
115
|
+
the plugin. If you add a `search-results.html` to your site's `layout_dir`
|
116
|
+
(typically `_layouts`), the plugin will use that layout instead.
|
117
|
+
- **endpoint**: The name of the endpoint generated for the search results
|
118
|
+
page. Defaults to `search`.
|
119
|
+
|
120
|
+
## Customization
|
70
121
|
|
71
122
|
If you prefer to craft your own versions of these tags and styles, you can
|
72
123
|
capture the output of these tags and the Sass `@import` statement, then create
|
73
124
|
new tags or included files based on this output, careful not to change
|
74
125
|
anything that causes the interaction between these components to fail.
|
75
126
|
|
76
|
-
Alternately, you can inspect the code of this
|
127
|
+
Alternately, you can inspect the code of this gem (all paths relative to
|
77
128
|
`lib/jekyll_pages_api_search/`):
|
78
129
|
|
79
130
|
- `{% jekyll_pages_api_search_interface %}`: includes `search.html`
|
80
131
|
- `{% jekyll_pages_api_search_load %}`: generated by the `LoadSearchTag` class
|
81
132
|
from `tags.rb`
|
133
|
+
- `{% jekyll_pages_api_search_results %}`: generated by the `SearchResultsTag`
|
134
|
+
class from `tags.rb`
|
82
135
|
- `@import "jekyll_pages_api_search";`: includes
|
83
136
|
`sass/jekyll_pages_api_search.scss`
|
84
137
|
|
85
|
-
|
138
|
+
## Running standalone
|
86
139
|
|
87
140
|
If you wish to generate a `search-index.json` file (and optionaly a
|
88
141
|
`pages.json` file) when using a site generation tool other than Jekyll, you
|
89
142
|
can run the `jekyll_pages_api_search` executable as a post-generation step.
|
90
143
|
Run `jekyll_pages_api -h` for instructions.
|
91
144
|
|
92
|
-
|
145
|
+
## Developing
|
93
146
|
|
94
|
-
|
95
|
-
|
96
|
-
|
147
|
+
Install Node.js per the [installation instructions (step #1)](#installation).
|
148
|
+
The `Rakefile` will prompt you to install Node.js and any packages
|
149
|
+
that are missing from your system when running `bundle exec rake build`.
|
97
150
|
|
98
|
-
|
99
|
-
|
100
|
-
you already use some of these components, you may wish to fetch the
|
101
|
-
`assets/js/search.js` file directly from this repository and use
|
102
|
-
`package.json` and `bower.json` as a guide to update or create your own
|
103
|
-
Browserify configuration.
|
151
|
+
After cloning this repository, do the following to ensure your installation is
|
152
|
+
in a good state:
|
104
153
|
|
105
|
-
|
154
|
+
```sh
|
155
|
+
$ cd jekyll_pages_api_search
|
156
|
+
$ npm install
|
157
|
+
$ bundle install
|
158
|
+
$ bundle exec rake test
|
159
|
+
```
|
106
160
|
|
107
|
-
|
108
|
-
packages. The `Rakefile` will prompt you to install Node.js and any packages
|
109
|
-
that are missing from your system when running `bundle exec rake build`.
|
161
|
+
Run `bundle exec rake -T` to get a list of build commands and descriptions.
|
110
162
|
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
JavaScript components listed in `bower.json`.
|
115
|
-
* Run `bundle exec rake test` to run the tests.
|
116
|
-
* Run `bundle exec rake build` to ensure the entire gem can build.
|
117
|
-
* Commit an update to bump the version number of
|
118
|
-
`lib/jekyll_pages_api_search/version.rb` before running `bundle exec rake
|
119
|
-
release`.
|
163
|
+
Commit an update to bump the version number of
|
164
|
+
`lib/jekyll_pages_api_search/version.rb` before running `bundle exec rake
|
165
|
+
release`.
|
120
166
|
|
121
167
|
While developing this gem, add this to the Gemfile of any project using the
|
122
168
|
gem to try out your changes (presuming the project's working directory is a
|
@@ -128,19 +174,12 @@ group :jekyll_plugins do
|
|
128
174
|
end
|
129
175
|
```
|
130
176
|
|
131
|
-
|
132
|
-
|
133
|
-
1. Fork the repo (or just clone it if you're an 18F team member)
|
134
|
-
2. Create your feature branch (`git checkout -b my-new-feature`)
|
135
|
-
3. Commit your changes (`git commit -am 'Add some feature'`)
|
136
|
-
4. Push to the branch (`git push origin my-new-feature`)
|
137
|
-
5. Create a new Pull Request
|
177
|
+
## Contributing
|
138
178
|
|
139
|
-
|
140
|
-
|
141
|
-
needs, but didn't.
|
179
|
+
If you'd like to contribute to this repository, please follow our
|
180
|
+
[CONTRIBUTING guidelines](./CONTRIBUTING.md).
|
142
181
|
|
143
|
-
|
182
|
+
## Public domain
|
144
183
|
|
145
184
|
This project is in the worldwide [public domain](LICENSE.md). As stated in
|
146
185
|
[CONTRIBUTING](CONTRIBUTING.md):
|
data/assets/js/search-bundle.js
CHANGED
@@ -1,19 +1,23 @@
|
|
1
1
|
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
|
2
|
-
|
2
|
+
(function (global){
|
3
|
+
!function(e){function o(e){throw RangeError(T[e])}function n(e,o){for(var n=e.length,r=[];n--;)r[n]=o(e[n]);return r}function r(e,o){var r=e.split("@"),t="";r.length>1&&(t=r[0]+"@",e=r[1]),e=e.replace(S,".");var u=e.split("."),i=n(u,o).join(".");return t+i}function t(e){for(var o,n,r=[],t=0,u=e.length;u>t;)o=e.charCodeAt(t++),o>=55296&&56319>=o&&u>t?(n=e.charCodeAt(t++),56320==(64512&n)?r.push(((1023&o)<<10)+(1023&n)+65536):(r.push(o),t--)):r.push(o);return r}function u(e){return n(e,function(e){var o="";return e>65535&&(e-=65536,o+=P(e>>>10&1023|55296),e=56320|1023&e),o+=P(e)}).join("")}function i(e){return 10>e-48?e-22:26>e-65?e-65:26>e-97?e-97:b}function f(e,o){return e+22+75*(26>e)-((0!=o)<<5)}function c(e,o,n){var r=0;for(e=n?M(e/j):e>>1,e+=M(e/o);e>L*C>>1;r+=b)e=M(e/L);return M(r+(L+1)*e/(e+m))}function l(e){var n,r,t,f,l,s,d,a,p,h,v=[],g=e.length,w=0,m=I,j=A;for(r=e.lastIndexOf(E),0>r&&(r=0),t=0;r>t;++t)e.charCodeAt(t)>=128&&o("not-basic"),v.push(e.charCodeAt(t));for(f=r>0?r+1:0;g>f;){for(l=w,s=1,d=b;f>=g&&o("invalid-input"),a=i(e.charCodeAt(f++)),(a>=b||a>M((x-w)/s))&&o("overflow"),w+=a*s,p=j>=d?y:d>=j+C?C:d-j,!(p>a);d+=b)h=b-p,s>M(x/h)&&o("overflow"),s*=h;n=v.length+1,j=c(w-l,n,0==l),M(w/n)>x-m&&o("overflow"),m+=M(w/n),w%=n,v.splice(w++,0,m)}return u(v)}function s(e){var n,r,u,i,l,s,d,a,p,h,v,g,w,m,j,F=[];for(e=t(e),g=e.length,n=I,r=0,l=A,s=0;g>s;++s)v=e[s],128>v&&F.push(P(v));for(u=i=F.length,i&&F.push(E);g>u;){for(d=x,s=0;g>s;++s)v=e[s],v>=n&&d>v&&(d=v);for(w=u+1,d-n>M((x-r)/w)&&o("overflow"),r+=(d-n)*w,n=d,s=0;g>s;++s)if(v=e[s],n>v&&++r>x&&o("overflow"),v==n){for(a=r,p=b;h=l>=p?y:p>=l+C?C:p-l,!(h>a);p+=b)j=a-h,m=b-h,F.push(P(f(h+j%m,0))),a=M(j/m);F.push(P(f(a,0))),l=c(r,w,u==i),r=0,++u}++r,++n}return F.join("")}function d(e){return r(e,function(e){return F.test(e)?l(e.slice(4).toLowerCase()):e})}function a(e){return r(e,function(e){return O.test(e)?"xn--"+s(e):e})}var p="object"==typeof exports&&exports&&!exports.nodeType&&exports,h="object"==typeof module&&module&&!module.nodeType&&module,v="object"==typeof global&&global;(v.global===v||v.window===v||v.self===v)&&(e=v);var g,w,x=2147483647,b=36,y=1,C=26,m=38,j=700,A=72,I=128,E="-",F=/^xn--/,O=/[^\x20-\x7E]/,S=/[\x2E\u3002\uFF0E\uFF61]/g,T={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},L=b-y,M=Math.floor,P=String.fromCharCode;if(g={version:"1.3.2",ucs2:{decode:t,encode:u},decode:l,encode:s,toASCII:a,toUnicode:d},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return g});else if(p&&h)if(module.exports==p)h.exports=g;else for(w in g)g.hasOwnProperty(w)&&(p[w]=g[w]);else e.punycode=g}(this);
|
3
4
|
|
5
|
+
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
4
6
|
},{}],2:[function(require,module,exports){
|
5
|
-
!function(t,e,n){"use strict";function r(t,e){return e=e||Error,function(){var n,r,i=arguments[0],o="["+(t?t+":":"")+i+"] ",a=arguments[1],s=arguments;for(n=o+a.replace(/\{\d+\}/g,function(t){var e=+t.slice(1,-1);return e+2<s.length?ht(s[e+2]):t}),n=n+"\nhttp://errors.angularjs.org/1.3.20/"+(t?t+"/":"")+i,r=2;r<arguments.length;r++)n=n+(2==r?"?":"&")+"p"+(r-2)+"="+encodeURIComponent(ht(arguments[r]));return new e(n)}}function i(t){if(null==t||A(t))return!1;var e="length"in Object(t)&&t.length;return t.nodeType===wr&&e?!0:w(t)||$r(t)||0===e||"number"==typeof e&&e>0&&e-1 in t}function o(t,e,n){var r,a;if(t)if(S(t))for(r in t)"prototype"==r||"length"==r||"name"==r||t.hasOwnProperty&&!t.hasOwnProperty(r)||e.call(n,t[r],r,t);else if($r(t)||i(t)){var s="object"!=typeof t;for(r=0,a=t.length;a>r;r++)(s||r in t)&&e.call(n,t[r],r,t)}else if(t.forEach&&t.forEach!==o)t.forEach(e,n,t);else for(r in t)t.hasOwnProperty(r)&&e.call(n,t[r],r,t);return t}function a(t){return Object.keys(t).sort()}function s(t,e,n){for(var r=a(t),i=0;i<r.length;i++)e.call(n,t[r[i]],r[i]);return r}function u(t){return function(e,n){t(n,e)}}function c(){return++fr}function l(t,e){e?t.$$hashKey=e:delete t.$$hashKey}function f(t){for(var e=t.$$hashKey,n=1,r=arguments.length;r>n;n++){var i=arguments[n];if(i)for(var o=Object.keys(i),a=0,s=o.length;s>a;a++){var u=o[a];t[u]=i[u]}}return l(t,e),t}function h(t){return parseInt(t,10)}function $(t,e){return f(Object.create(t),e)}function p(){}function d(t){return t}function v(t){return function(){return t}}function m(t){return"undefined"==typeof t}function g(t){return"undefined"!=typeof t}function y(t){return null!==t&&"object"==typeof t}function w(t){return"string"==typeof t}function b(t){return"number"==typeof t}function x(t){return"[object Date]"===ur.call(t)}function S(t){return"function"==typeof t}function C(t){return"[object RegExp]"===ur.call(t)}function A(t){return t&&t.window===t}function E(t){return t&&t.$evalAsync&&t.$watch}function k(t){return"[object File]"===ur.call(t)}function O(t){return"[object FormData]"===ur.call(t)}function T(t){return"[object Blob]"===ur.call(t)}function M(t){return"boolean"==typeof t}function N(t){return t&&S(t.then)}function V(t){return!(!t||!(t.nodeName||t.prop&&t.attr&&t.find))}function D(t){var e,n={},r=t.split(",");for(e=0;e<r.length;e++)n[r[e]]=!0;return n}function j(t){return Zn(t.nodeName||t[0]&&t[0].nodeName)}function R(t,e){var n=t.indexOf(e);return n>=0&&t.splice(n,1),e}function P(t,e,n,r){if(A(t)||E(t))throw cr("cpws","Can't copy! Making copies of Window or Scope instances is not supported.");if(e){if(t===e)throw cr("cpi","Can't copy! Source and destination are identical.");if(n=n||[],r=r||[],y(t)){var i=n.indexOf(t);if(-1!==i)return r[i];n.push(t),r.push(e)}var a;if($r(t)){e.length=0;for(var s=0;s<t.length;s++)a=P(t[s],null,n,r),y(t[s])&&(n.push(t[s]),r.push(a)),e.push(a)}else{var u=e.$$hashKey;$r(e)?e.length=0:o(e,function(t,n){delete e[n]});for(var c in t)t.hasOwnProperty(c)&&(a=P(t[c],null,n,r),y(t[c])&&(n.push(t[c]),r.push(a)),e[c]=a);l(e,u)}}else if(e=t,t)if($r(t))e=P(t,[],n,r);else if(x(t))e=new Date(t.getTime());else if(C(t))e=new RegExp(t.source,t.toString().match(/[^\/]*$/)[0]),e.lastIndex=t.lastIndex;else if(y(t)){var f=Object.create(Object.getPrototypeOf(t));e=P(t,f,n,r)}return e}function _(t,e){if($r(t)){e=e||[];for(var n=0,r=t.length;r>n;n++)e[n]=t[n]}else if(y(t)){e=e||{};for(var i in t)("$"!==i.charAt(0)||"$"!==i.charAt(1))&&(e[i]=t[i])}return e||t}function I(t,e){if(t===e)return!0;if(null===t||null===e)return!1;if(t!==t&&e!==e)return!0;var r,i,o,a=typeof t,s=typeof e;if(a==s&&"object"==a){if(!$r(t)){if(x(t))return x(e)?I(t.getTime(),e.getTime()):!1;if(C(t))return C(e)?t.toString()==e.toString():!1;if(E(t)||E(e)||A(t)||A(e)||$r(e)||x(e)||C(e))return!1;o={};for(i in t)if("$"!==i.charAt(0)&&!S(t[i])){if(!I(t[i],e[i]))return!1;o[i]=!0}for(i in e)if(!o.hasOwnProperty(i)&&"$"!==i.charAt(0)&&e[i]!==n&&!S(e[i]))return!1;return!0}if(!$r(e))return!1;if((r=t.length)==e.length){for(i=0;r>i;i++)if(!I(t[i],e[i]))return!1;return!0}}return!1}function q(t,e,n){return t.concat(or.call(e,n))}function U(t,e){return or.call(t,e||0)}function F(t,e){var n=arguments.length>2?U(arguments,2):[];return!S(e)||e instanceof RegExp?e:n.length?function(){return arguments.length?e.apply(t,q(n,arguments,0)):e.apply(t,n)}:function(){return arguments.length?e.apply(t,arguments):e.call(t)}}function H(t,r){var i=r;return"string"==typeof t&&"$"===t.charAt(0)&&"$"===t.charAt(1)?i=n:A(r)?i="$WINDOW":r&&e===r?i="$DOCUMENT":E(r)&&(i="$SCOPE"),i}function L(t,e){return"undefined"==typeof t?n:(b(e)||(e=e?2:null),JSON.stringify(t,H,e))}function B(t){return w(t)?JSON.parse(t):t}function z(t){t=nr(t).clone();try{t.empty()}catch(e){}var n=nr("<div>").append(t).html();try{return t[0].nodeType===xr?Zn(n):n.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(t,e){return"<"+Zn(e)})}catch(e){return Zn(n)}}function G(t){try{return decodeURIComponent(t)}catch(e){}}function W(t){var e,n,r={};return o((t||"").split("&"),function(t){if(t&&(e=t.replace(/\+/g,"%20").split("="),n=G(e[0]),g(n))){var i=g(e[1])?G(e[1]):!0;Kn.call(r,n)?$r(r[n])?r[n].push(i):r[n]=[r[n],i]:r[n]=i}}),r}function Y(t){var e=[];return o(t,function(t,n){$r(t)?o(t,function(t){e.push(Z(n,!0)+(t===!0?"":"="+Z(t,!0)))}):e.push(Z(n,!0)+(t===!0?"":"="+Z(t,!0)))}),e.length?e.join("&"):""}function J(t){return Z(t,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function Z(t,e){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,e?"%20":"+")}function K(t,e){var n,r,i=mr.length;for(t=nr(t),r=0;i>r;++r)if(n=mr[r]+e,w(n=t.attr(n)))return n;return null}function X(t,e){var n,r,i={};o(mr,function(e){var i=e+"app";!n&&t.hasAttribute&&t.hasAttribute(i)&&(n=t,r=t.getAttribute(i))}),o(mr,function(e){var i,o=e+"app";!n&&(i=t.querySelector("["+o.replace(":","\\:")+"]"))&&(n=i,r=i.getAttribute(o))}),n&&(i.strictDi=null!==K(n,"strict-di"),e(n,r?[r]:[],i))}function Q(n,r,i){y(i)||(i={});var a={strictDi:!1};i=f(a,i);var s=function(){if(n=nr(n),n.injector()){var t=n[0]===e?"document":z(n);throw cr("btstrpd","App Already Bootstrapped with this Element '{0}'",t.replace(/</,"<").replace(/>/,">"))}r=r||[],r.unshift(["$provide",function(t){t.value("$rootElement",n)}]),i.debugInfoEnabled&&r.push(["$compileProvider",function(t){t.debugInfoEnabled(!0)}]),r.unshift("ng");var o=Bt(r,i.strictDi);return o.invoke(["$rootScope","$rootElement","$compile","$injector",function(t,e,n,r){t.$apply(function(){e.data("$injector",r),n(e)(t)})}]),o},u=/^NG_ENABLE_DEBUG_INFO!/,c=/^NG_DEFER_BOOTSTRAP!/;return t&&u.test(t.name)&&(i.debugInfoEnabled=!0,t.name=t.name.replace(u,"")),t&&!c.test(t.name)?s():(t.name=t.name.replace(c,""),lr.resumeBootstrap=function(t){return o(t,function(t){r.push(t)}),s()},void(S(lr.resumeDeferredBootstrap)&&lr.resumeDeferredBootstrap()))}function tt(){t.name="NG_ENABLE_DEBUG_INFO!"+t.name,t.location.reload()}function et(t){var e=lr.element(t).injector();if(!e)throw cr("test","no injector found for element argument to getTestability");return e.get("$$testability")}function nt(t,e){return e=e||"_",t.replace(gr,function(t,n){return(n?e:"")+t.toLowerCase()})}function rt(){var e;yr||(rr=t.jQuery,rr&&rr.fn.on?(nr=rr,f(rr.fn,{scope:Ur.scope,isolateScope:Ur.isolateScope,controller:Ur.controller,injector:Ur.injector,inheritedData:Ur.inheritedData}),e=rr.cleanData,rr.cleanData=function(t){var n;if(hr)hr=!1;else for(var r,i=0;null!=(r=t[i]);i++)n=rr._data(r,"events"),n&&n.$destroy&&rr(r).triggerHandler("$destroy");e(t)}):nr=wt,lr.element=nr,yr=!0)}function it(t,e,n){if(!t)throw cr("areq","Argument '{0}' is {1}",e||"?",n||"required");return t}function ot(t,e,n){return n&&$r(t)&&(t=t[t.length-1]),it(S(t),e,"not a function, got "+(t&&"object"==typeof t?t.constructor.name||"Object":typeof t)),t}function at(t,e){if("hasOwnProperty"===t)throw cr("badname","hasOwnProperty is not a valid {0} name",e)}function st(t,e,n){if(!e)return t;for(var r,i=e.split("."),o=t,a=i.length,s=0;a>s;s++)r=i[s],t&&(t=(o=t)[r]);return!n&&S(t)?F(o,t):t}function ut(t){var e=t[0],n=t[t.length-1],r=[e];do{if(e=e.nextSibling,!e)break;r.push(e)}while(e!==n);return nr(r)}function ct(){return Object.create(null)}function lt(t){function e(t,e,n){return t[e]||(t[e]=n())}var n=r("$injector"),i=r("ng"),o=e(t,"angular",Object);return o.$$minErr=o.$$minErr||r,e(o,"module",function(){var t={};return function(r,o,a){var s=function(t,e){if("hasOwnProperty"===t)throw i("badname","hasOwnProperty is not a valid {0} name",e)};return s(r,"module"),o&&t.hasOwnProperty(r)&&(t[r]=null),e(t,r,function(){function t(t,n,r,i){return i||(i=e),function(){return i[r||"push"]([t,n,arguments]),c}}if(!o)throw n("nomod","Module '{0}' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.",r);var e=[],i=[],s=[],u=t("$injector","invoke","push",i),c={_invokeQueue:e,_configBlocks:i,_runBlocks:s,requires:o,name:r,provider:t("$provide","provider"),factory:t("$provide","factory"),service:t("$provide","service"),value:t("$provide","value"),constant:t("$provide","constant","unshift"),animation:t("$animateProvider","register"),filter:t("$filterProvider","register"),controller:t("$controllerProvider","register"),directive:t("$compileProvider","directive"),config:u,run:function(t){return s.push(t),this}};return a&&u(a),c})}})}function ft(t){var e=[];return JSON.stringify(t,function(t,n){if(n=H(t,n),y(n)){if(e.indexOf(n)>=0)return"<<already seen>>";e.push(n)}return n})}function ht(t){return"function"==typeof t?t.toString().replace(/ \{[\s\S]*$/,""):"undefined"==typeof t?"undefined":"string"!=typeof t?ft(t):t}function $t(e){f(e,{bootstrap:Q,copy:P,extend:f,equals:I,element:nr,forEach:o,injector:Bt,noop:p,bind:F,toJson:L,fromJson:B,identity:d,isUndefined:m,isDefined:g,isString:w,isFunction:S,isObject:y,isNumber:b,isElement:V,isArray:$r,version:Er,isDate:x,lowercase:Zn,uppercase:Xn,callbacks:{counter:0},getTestability:et,$$minErr:r,$$csp:vr,reloadWithDebugInfo:tt}),ir=lt(t);try{ir("ngLocale")}catch(n){ir("ngLocale",[]).provider("$locale",ve)}ir("ng",["ngLocale"],["$provide",function(t){t.provider({$$sanitizeUri:Je}),t.provider("$compile",Kt).directive({a:Vi,input:Ji,textarea:Ji,form:_i,script:qo,select:Ho,style:Bo,option:Lo,ngBind:Xi,ngBindHtml:to,ngBindTemplate:Qi,ngClass:no,ngClassEven:io,ngClassOdd:ro,ngCloak:oo,ngController:ao,ngForm:Ii,ngHide:Do,ngIf:co,ngInclude:lo,ngInit:ho,ngNonBindable:ko,ngPluralize:Oo,ngRepeat:To,ngShow:Vo,ngStyle:jo,ngSwitch:Ro,ngSwitchWhen:Po,ngSwitchDefault:_o,ngOptions:Fo,ngTransclude:Io,ngModel:Co,ngList:$o,ngChange:eo,pattern:Go,ngPattern:Go,required:zo,ngRequired:zo,minlength:Yo,ngMinlength:Yo,maxlength:Wo,ngMaxlength:Wo,ngValue:Ki,ngModelOptions:Eo}).directive({ngInclude:fo}).directive(Di).directive(so),t.provider({$anchorScroll:zt,$animate:Zr,$browser:Yt,$cacheFactory:Jt,$controller:ee,$document:ne,$exceptionHandler:re,$filter:un,$interpolate:pe,$interval:de,$http:le,$httpBackend:he,$location:Me,$log:Ne,$parse:Le,$rootScope:Ye,$q:Be,$$q:ze,$sce:Qe,$sceDelegate:Xe,$sniffer:tn,$templateCache:Zt,$templateRequest:en,$$testability:nn,$timeout:rn,$window:sn,$$rAF:We,$$asyncCallback:Gt,$$jqLite:qt})}])}function pt(){return++Or}function dt(t){return t.replace(Nr,function(t,e,n,r){return r?n.toUpperCase():n}).replace(Vr,"Moz$1")}function vt(t){return!Pr.test(t)}function mt(t){var e=t.nodeType;return e===wr||!e||e===Cr}function gt(t,e){var n,r,i,a,s=e.createDocumentFragment(),u=[];if(vt(t))u.push(e.createTextNode(t));else{for(n=n||s.appendChild(e.createElement("div")),r=(_r.exec(t)||["",""])[1].toLowerCase(),i=qr[r]||qr._default,n.innerHTML=i[1]+t.replace(Ir,"<$1></$2>")+i[2],a=i[0];a--;)n=n.lastChild;u=q(u,n.childNodes),n=s.firstChild,n.textContent=""}return s.textContent="",s.innerHTML="",o(u,function(t){s.appendChild(t)}),s}function yt(t,n){n=n||e;var r;return(r=Rr.exec(t))?[n.createElement(r[1])]:(r=gt(t,n))?r.childNodes:[]}function wt(t){if(t instanceof wt)return t;var e;if(w(t)&&(t=pr(t),e=!0),!(this instanceof wt)){if(e&&"<"!=t.charAt(0))throw jr("nosel","Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element");return new wt(t)}e?Mt(this,yt(t)):Mt(this,t)}function bt(t){return t.cloneNode(!0)}function xt(t,e){if(e||Ct(t),t.querySelectorAll)for(var n=t.querySelectorAll("*"),r=0,i=n.length;i>r;r++)Ct(n[r])}function St(t,e,n,r){if(g(r))throw jr("offargs","jqLite#off() does not support the `selector` argument");var i=At(t),a=i&&i.events,s=i&&i.handle;if(s)if(e)o(e.split(" "),function(e){if(g(n)){var r=a[e];if(R(r||[],n),r&&r.length>0)return}Mr(t,e,s),delete a[e]});else for(e in a)"$destroy"!==e&&Mr(t,e,s),delete a[e]}function Ct(t,e){var r=t.ng339,i=r&&kr[r];if(i){if(e)return void delete i.data[e];i.handle&&(i.events.$destroy&&i.handle({},"$destroy"),St(t)),delete kr[r],t.ng339=n}}function At(t,e){var r=t.ng339,i=r&&kr[r];return e&&!i&&(t.ng339=r=pt(),i=kr[r]={events:{},data:{},handle:n}),i}function Et(t,e,n){if(mt(t)){var r=g(n),i=!r&&e&&!y(e),o=!e,a=At(t,!i),s=a&&a.data;if(r)s[e]=n;else{if(o)return s;if(i)return s&&s[e];f(s,e)}}}function kt(t,e){return t.getAttribute?(" "+(t.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+e+" ")>-1:!1}function Ot(t,e){e&&t.setAttribute&&o(e.split(" "),function(e){t.setAttribute("class",pr((" "+(t.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+pr(e)+" "," ")))})}function Tt(t,e){if(e&&t.setAttribute){var n=(" "+(t.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");o(e.split(" "),function(t){t=pr(t),-1===n.indexOf(" "+t+" ")&&(n+=t+" ")}),t.setAttribute("class",pr(n))}}function Mt(t,e){if(e)if(e.nodeType)t[t.length++]=e;else{var n=e.length;if("number"==typeof n&&e.window!==e){if(n)for(var r=0;n>r;r++)t[t.length++]=e[r]}else t[t.length++]=e}}function Nt(t,e){return Vt(t,"$"+(e||"ngController")+"Controller")}function Vt(t,e,r){t.nodeType==Cr&&(t=t.documentElement);for(var i=$r(e)?e:[e];t;){for(var o=0,a=i.length;a>o;o++)if((r=nr.data(t,i[o]))!==n)return r;t=t.parentNode||t.nodeType===Ar&&t.host}}function Dt(t){for(xt(t,!0);t.firstChild;)t.removeChild(t.firstChild)}function jt(t,e){e||xt(t);var n=t.parentNode;n&&n.removeChild(t)}function Rt(e,n){n=n||t,"complete"===n.document.readyState?n.setTimeout(e):nr(n).on("load",e)}function Pt(t,e){var n=Fr[e.toLowerCase()];return n&&Hr[j(t)]&&n}function _t(t,e){var n=t.nodeName;return("INPUT"===n||"TEXTAREA"===n)&&Lr[e]}function It(t,e){var n=function(n,r){n.isDefaultPrevented=function(){return n.defaultPrevented};var i=e[r||n.type],o=i?i.length:0;if(o){if(m(n.immediatePropagationStopped)){var a=n.stopImmediatePropagation;n.stopImmediatePropagation=function(){n.immediatePropagationStopped=!0,n.stopPropagation&&n.stopPropagation(),a&&a.call(n)}}n.isImmediatePropagationStopped=function(){return n.immediatePropagationStopped===!0},o>1&&(i=_(i));for(var s=0;o>s;s++)n.isImmediatePropagationStopped()||i[s].call(t,n)}};return n.elem=t,n}function qt(){this.$get=function(){return f(wt,{hasClass:function(t,e){return t.attr&&(t=t[0]),kt(t,e)},addClass:function(t,e){return t.attr&&(t=t[0]),Tt(t,e)},removeClass:function(t,e){return t.attr&&(t=t[0]),Ot(t,e)}})}}function Ut(t,e){var n=t&&t.$$hashKey;if(n)return"function"==typeof n&&(n=t.$$hashKey()),n;var r=typeof t;return n="function"==r||"object"==r&&null!==t?t.$$hashKey=r+":"+(e||c)():r+":"+t}function Ft(t,e){if(e){var n=0;this.nextUid=function(){return++n}}o(t,this.put,this)}function Ht(t){var e=t.toString().replace(Wr,""),n=e.match(Br);return n?"function("+(n[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function Lt(t,e,n){var r,i,a,s;if("function"==typeof t){if(!(r=t.$inject)){if(r=[],t.length){if(e)throw w(n)&&n||(n=t.name||Ht(t)),Yr("strictdi","{0} is not using explicit annotation and cannot be invoked in strict mode",n);i=t.toString().replace(Wr,""),a=i.match(Br),o(a[1].split(zr),function(t){t.replace(Gr,function(t,e,n){r.push(n)})})}t.$inject=r}}else $r(t)?(s=t.length-1,ot(t[s],"fn"),r=t.slice(0,s)):ot(t,"fn",!0);return r}function Bt(t,e){function r(t){return function(e,n){return y(e)?void o(e,u(t)):t(e,n)}}function i(t,e){if(at(t,"service"),(S(e)||$r(e))&&(e=E.instantiate(e)),!e.$get)throw Yr("pget","Provider '{0}' must define $get factory method.",t);return A[t+b]=e}function a(t,e){return function(){var n=O.invoke(e,this);if(m(n))throw Yr("undef","Provider '{0}' must return a value from $get factory method.",t);return n}}function s(t,e,n){return i(t,{$get:n!==!1?a(t,e):e})}function c(t,e){return s(t,["$injector",function(t){return t.instantiate(e)}])}function l(t,e){return s(t,v(e),!1)}function f(t,e){at(t,"constant"),A[t]=e,k[t]=e}function h(t,e){var n=E.get(t+b),r=n.$get;n.$get=function(){var t=O.invoke(r,n);return O.invoke(e,null,{$delegate:t})}}function $(t){var e,n=[];return o(t,function(t){function r(t){var e,n;for(e=0,n=t.length;n>e;e++){var r=t[e],i=E.get(r[0]);i[r[1]].apply(i,r[2])}}if(!C.get(t)){C.put(t,!0);try{w(t)?(e=ir(t),n=n.concat($(e.requires)).concat(e._runBlocks),r(e._invokeQueue),r(e._configBlocks)):S(t)?n.push(E.invoke(t)):$r(t)?n.push(E.invoke(t)):ot(t,"module")}catch(i){throw $r(t)&&(t=t[t.length-1]),i.message&&i.stack&&-1==i.stack.indexOf(i.message)&&(i=i.message+"\n"+i.stack),Yr("modulerr","Failed to instantiate module {0} due to:\n{1}",t,i.stack||i.message||i)}}}),n}function d(t,n){function r(e,r){if(t.hasOwnProperty(e)){if(t[e]===g)throw Yr("cdep","Circular dependency found: {0}",e+" <- "+x.join(" <- "));return t[e]}try{return x.unshift(e),t[e]=g,t[e]=n(e,r)}catch(i){throw t[e]===g&&delete t[e],i}finally{x.shift()}}function i(t,n,i,o){"string"==typeof i&&(o=i,i=null);var a,s,u,c=[],l=Bt.$$annotate(t,e,o);for(s=0,a=l.length;a>s;s++){if(u=l[s],"string"!=typeof u)throw Yr("itkn","Incorrect injection token! Expected service name as string, got {0}",u);c.push(i&&i.hasOwnProperty(u)?i[u]:r(u,o))}return $r(t)&&(t=t[a]),t.apply(n,c)}function o(t,e,n){var r=Object.create(($r(t)?t[t.length-1]:t).prototype||null),o=i(t,r,e,n);return y(o)||S(o)?o:r}return{invoke:i,instantiate:o,get:r,annotate:Bt.$$annotate,has:function(e){return A.hasOwnProperty(e+b)||t.hasOwnProperty(e)}}}e=e===!0;var g={},b="Provider",x=[],C=new Ft([],!0),A={$provide:{provider:r(i),factory:r(s),service:r(c),value:r(l),constant:r(f),decorator:h}},E=A.$injector=d(A,function(t,e){throw lr.isString(e)&&x.push(e),Yr("unpr","Unknown provider: {0}",x.join(" <- "))}),k={},O=k.$injector=d(k,function(t,e){var r=E.get(t+b,e);return O.invoke(r.$get,r,n,t)});return o($(t),function(t){O.invoke(t||p)}),O}function zt(){var t=!0;this.disableAutoScrolling=function(){t=!1},this.$get=["$window","$location","$rootScope",function(e,n,r){function i(t){var e=null;return Array.prototype.some.call(t,function(t){return"a"===j(t)?(e=t,!0):void 0}),e}function o(){var t=s.yOffset;if(S(t))t=t();else if(V(t)){var n=t[0],r=e.getComputedStyle(n);t="fixed"!==r.position?0:n.getBoundingClientRect().bottom}else b(t)||(t=0);return t}function a(t){if(t){t.scrollIntoView();var n=o();if(n){var r=t.getBoundingClientRect().top;e.scrollBy(0,r-n)}}else e.scrollTo(0,0)}function s(){var t,e=n.hash();e?(t=u.getElementById(e))?a(t):(t=i(u.getElementsByName(e)))?a(t):"top"===e&&a(null):a(null)}var u=e.document;return t&&r.$watch(function(){return n.hash()},function(t,e){(t!==e||""!==t)&&Rt(function(){r.$evalAsync(s)})}),s}]}function Gt(){this.$get=["$$rAF","$timeout",function(t,e){return t.supported?function(e){return t(e)}:function(t){return e(t,0,!1)}}]}function Wt(t,e,r,i){function a(t){try{t.apply(null,U(arguments,1))}finally{if(C--,0===C)for(;A.length;)try{A.pop()()}catch(e){r.error(e)}}}function s(t){var e=t.indexOf("#");return-1===e?"":t.substr(e)}function u(t,e){!function n(){o(k,function(t){t()}),E=e(n,t)}()}function c(){f(),h()}function l(){try{return y.state}catch(t){}}function f(){O=l(),O=m(O)?null:O,I(O,R)&&(O=R),R=O}function h(){(M!==d.url()||T!==O)&&(M=d.url(),T=O,o(D,function(t){t(d.url(),O)}))}function $(t){try{return decodeURIComponent(t)}catch(e){return t}}var d=this,v=e[0],g=t.location,y=t.history,b=t.setTimeout,x=t.clearTimeout,S={};d.isMock=!1;var C=0,A=[];d.$$completeOutstandingRequest=a,d.$$incOutstandingRequestCount=function(){C++},d.notifyWhenNoOutstandingRequests=function(t){o(k,function(t){t()}),0===C?t():A.push(t)};var E,k=[];d.addPollFn=function(t){return m(E)&&u(100,b),k.push(t),t};var O,T,M=g.href,N=e.find("base"),V=null;f(),T=O,d.url=function(e,n,r){if(m(r)&&(r=null),g!==t.location&&(g=t.location),y!==t.history&&(y=t.history),e){var o=T===r;if(M===e&&(!i.history||o))return d;var a=M&&be(M)===be(e);return M=e,T=r,!i.history||a&&o?((!a||V)&&(V=e),n?g.replace(e):a?g.hash=s(e):g.href=e):(y[n?"replaceState":"pushState"](r,"",e),f(),T=O),d}return V||g.href.replace(/%27/g,"'")},d.state=function(){return O};var D=[],j=!1,R=null;d.onUrlChange=function(e){return j||(i.history&&nr(t).on("popstate",c),nr(t).on("hashchange",c),j=!0),D.push(e),e},d.$$checkUrlChange=h,d.baseHref=function(){var t=N.attr("href");return t?t.replace(/^(https?\:)?\/\/[^\/]*/,""):""};var P={},_="",q=d.baseHref();d.cookies=function(t,e){var i,o,a,s,u;if(!t){if(v.cookie!==_)for(_=v.cookie,o=_.split("; "),P={},s=0;s<o.length;s++)a=o[s],u=a.indexOf("="),u>0&&(t=$(a.substring(0,u)),P[t]===n&&(P[t]=$(a.substring(u+1))));return P}e===n?v.cookie=encodeURIComponent(t)+"=;path="+q+";expires=Thu, 01 Jan 1970 00:00:00 GMT":w(e)&&(i=(v.cookie=encodeURIComponent(t)+"="+encodeURIComponent(e)+";path="+q).length+1,i>4096&&r.warn("Cookie '"+t+"' possibly not set or overflowed because it was too large ("+i+" > 4096 bytes)!"))},d.defer=function(t,e){var n;return C++,n=b(function(){delete S[n],a(t)},e||0),S[n]=!0,n},d.defer.cancel=function(t){return S[t]?(delete S[t],x(t),a(p),!0):!1}}function Yt(){this.$get=["$window","$log","$sniffer","$document",function(t,e,n,r){return new Wt(t,r,e,n)}]}function Jt(){this.$get=function(){function t(t,n){function i(t){t!=h&&($?$==t&&($=t.n):$=t,o(t.n,t.p),o(t,h),h=t,h.n=null)}function o(t,e){t!=e&&(t&&(t.p=e),e&&(e.n=t))}if(t in e)throw r("$cacheFactory")("iid","CacheId '{0}' is already taken!",t);var a=0,s=f({},n,{id:t}),u={},c=n&&n.capacity||Number.MAX_VALUE,l={},h=null,$=null;return e[t]={put:function(t,e){if(c<Number.MAX_VALUE){var n=l[t]||(l[t]={key:t});i(n)}if(!m(e))return t in u||a++,u[t]=e,a>c&&this.remove($.key),e},get:function(t){if(c<Number.MAX_VALUE){var e=l[t];if(!e)return;i(e)}return u[t]},remove:function(t){if(c<Number.MAX_VALUE){var e=l[t];if(!e)return;e==h&&(h=e.p),e==$&&($=e.n),o(e.n,e.p),delete l[t]}delete u[t],a--},removeAll:function(){u={},a=0,l={},h=$=null},destroy:function(){u=null,s=null,l=null,delete e[t]},info:function(){return f({},s,{size:a})}}}var e={};return t.info=function(){var t={};return o(e,function(e,n){t[n]=e.info()}),t},t.get=function(t){return e[t]},t}}function Zt(){this.$get=["$cacheFactory",function(t){return t("templates")}]}function Kt(t,r){function i(t,e){var n=/^\s*([@&]|=(\*?))(\??)\s*(\w*)\s*$/,r={};return o(t,function(t,i){var o=t.match(n);if(!o)throw Kr("iscp","Invalid isolate scope definition for directive '{0}'. Definition: {... {1}: '{2}' ...}",e,i,t);r[i]={mode:o[1][0],collection:"*"===o[2],optional:"?"===o[3],attrName:o[4]||i}}),r}var a={},s="Directive",c=/^\s*directive\:\s*([\w\-]+)\s+(.*)$/,l=/(([\w\-]+)(?:\:([^;]+))?;?)/,h=D("ngSrc,ngSrcset,src,srcset"),m=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/,b=/^(on[a-z]+|formaction)$/;this.directive=function C(e,n){return at(e,"directive"),w(e)?(it(n,"directiveFactory"),a.hasOwnProperty(e)||(a[e]=[],t.factory(e+s,["$injector","$exceptionHandler",function(t,n){var r=[];return o(a[e],function(o,a){try{var s=t.invoke(o);S(s)?s={compile:v(s)}:!s.compile&&s.link&&(s.compile=v(s.link)),s.priority=s.priority||0,s.index=a,s.name=s.name||e,s.require=s.require||s.controller&&s.name,s.restrict=s.restrict||"EA",y(s.scope)&&(s.$$isolateBindings=i(s.scope,s.name)),r.push(s)}catch(u){n(u)}}),r}])),a[e].push(n)):o(e,u(C)),this},this.aHrefSanitizationWhitelist=function(t){return g(t)?(r.aHrefSanitizationWhitelist(t),this):r.aHrefSanitizationWhitelist()},this.imgSrcSanitizationWhitelist=function(t){return g(t)?(r.imgSrcSanitizationWhitelist(t),this):r.imgSrcSanitizationWhitelist()};var x=!0;this.debugInfoEnabled=function(t){return g(t)?(x=t,this):x},this.$get=["$injector","$interpolate","$exceptionHandler","$templateRequest","$parse","$controller","$rootScope","$document","$sce","$animate","$$sanitizeUri",function(t,r,i,u,v,g,C,A,k,O,T){function M(t,e){try{t.addClass(e)}catch(n){}}function N(t,e,n,r,i){t instanceof nr||(t=nr(t)),o(t,function(e,n){e.nodeType==xr&&e.nodeValue.match(/\S+/)&&(t[n]=nr(e).wrap("<span></span>").parent()[0])});var a=D(t,e,t,n,r,i);N.$$addScopeClass(t);var s=null;return function(e,n,r){it(e,"scope"),r=r||{};var i=r.parentBoundTranscludeFn,o=r.transcludeControllers,u=r.futureParentElement;i&&i.$$boundTransclude&&(i=i.$$boundTransclude),s||(s=V(u));var c;if(c="html"!==s?nr(X(s,nr("<div>").append(t).html())):n?Ur.clone.call(t):t,o)for(var l in o)c.data("$"+l+"Controller",o[l].instance);return N.$$addScopeInfo(c,e),n&&n(c,e),a&&a(e,c,c,i),c}}function V(t){var e=t&&t[0];return e&&"foreignobject"!==j(e)&&e.toString().match(/SVG/)?"svg":"html"}function D(t,e,r,i,o,a){function s(t,r,i,o){var a,s,u,c,l,f,h,$,v;if(p){var m=r.length;for(v=new Array(m),l=0;l<d.length;l+=3)h=d[l],v[h]=r[h]}else v=r;for(l=0,f=d.length;f>l;)u=v[d[l++]],a=d[l++],s=d[l++],a?(a.scope?(c=t.$new(),N.$$addScopeInfo(nr(u),c)):c=t,$=a.transcludeOnThisElement?P(t,a.transclude,o,a.elementTranscludeOnThisElement):!a.templateOnThisElement&&o?o:!o&&e?P(t,e):null,a(s,c,u,i,$)):s&&s(t,u.childNodes,n,o)}for(var u,c,l,f,h,$,p,d=[],v=0;v<t.length;v++)u=new at,c=_(t[v],[],u,0===v?i:n,o),l=c.length?H(c,t[v],u,e,r,null,[],[],a):null,l&&l.scope&&N.$$addScopeClass(u.$$element),h=l&&l.terminal||!(f=t[v].childNodes)||!f.length?null:D(f,l?(l.transcludeOnThisElement||!l.templateOnThisElement)&&l.transclude:e),(l||h)&&(d.push(v,l,h),$=!0,p=p||l),a=null;return $?s:null}function P(t,e,n,r){var i=function(r,i,o,a,s){return r||(r=t.$new(!1,s),r.$$transcluded=!0),e(r,i,{parentBoundTranscludeFn:n,transcludeControllers:o,futureParentElement:a})};return i}function _(t,e,n,r,i){var o,a,s=t.nodeType,u=n.$attr;switch(s){case wr:B(e,Xt(j(t)),"E",r,i);for(var f,h,$,p,d,v,m=t.attributes,g=0,b=m&&m.length;b>g;g++){var x=!1,S=!1;f=m[g],h=f.name,d=pr(f.value),p=Xt(h),(v=ft.test(p))&&(h=h.replace(Xr,"").substr(8).replace(/_(.)/g,function(t,e){return e.toUpperCase()}));var C=p.replace(/(Start|End)$/,"");G(C)&&p===C+"Start"&&(x=h,S=h.substr(0,h.length-5)+"end",h=h.substr(0,h.length-6)),$=Xt(h.toLowerCase()),u[$]=h,(v||!n.hasOwnProperty($))&&(n[$]=d,Pt(t,$)&&(n[$]=!0)),tt(t,e,d,$,v),B(e,$,"A",r,i,x,S)}if(a=t.className,y(a)&&(a=a.animVal),w(a)&&""!==a)for(;o=l.exec(a);)$=Xt(o[2]),B(e,$,"C",r,i)&&(n[$]=pr(o[3])),a=a.substr(o.index+o[0].length);break;case xr:K(e,t.nodeValue);break;case Sr:try{o=c.exec(t.nodeValue),o&&($=Xt(o[1]),B(e,$,"M",r,i)&&(n[$]=pr(o[2])))}catch(A){}}return e.sort(J),e}function q(t,e,n){var r=[],i=0;if(e&&t.hasAttribute&&t.hasAttribute(e)){do{if(!t)throw Kr("uterdir","Unterminated attribute, found '{0}' but no matching '{1}' found.",e,n);t.nodeType==wr&&(t.hasAttribute(e)&&i++,t.hasAttribute(n)&&i--),r.push(t),t=t.nextSibling}while(i>0)}else r.push(t);return nr(r)}function F(t,e,n){return function(r,i,o,a,s){return i=q(i[0],e,n),t(r,i,o,a,s)}}function H(t,a,s,u,c,l,f,h,$){function p(t,e,n,r){t&&(n&&(t=F(t,n,r)),t.require=A.require,t.directiveName=k,(j===A||A.$$isolateScope)&&(t=rt(t,{isolateScope:!0})),f.push(t)),e&&(n&&(e=F(e,n,r)),e.require=A.require,e.directiveName=k,(j===A||A.$$isolateScope)&&(e=rt(e,{isolateScope:!0})),h.push(e))}function d(t,e,n,r){var i,a,s="data",u=!1,c=n;if(w(e)){if(a=e.match(m),e=e.substring(a[0].length),a[3]&&(a[1]?a[3]=null:a[1]=a[3]),"^"===a[1]?s="inheritedData":"^^"===a[1]&&(s="inheritedData",c=n.parent()),"?"===a[2]&&(u=!0),i=null,r&&"data"===s&&(i=r[e])&&(i=i.instance),i=i||c[s]("$"+e+"Controller"),!i&&!u)throw Kr("ctreq","Controller '{0}', required by directive '{1}', can't be found!",e,t);return i||null}return $r(e)&&(i=[],o(e,function(e){i.push(d(t,e,n,r))})),i}function b(t,e,i,u,c){function l(t,e,r){var i;return E(t)||(r=e,e=t,t=n),G&&(i=b),r||(r=G?S.parent():S),c(t,e,i,r,T)}var $,p,m,y,w,b,x,S,A;if(a===i?(A=s,S=s.$$element):(S=nr(i),A=new at(S,s)),j&&(w=e.$new(!0)),c&&(x=l,x.$$boundTransclude=c),D&&(C={},b={},o(D,function(t){var n,r={$scope:t===j||t.$$isolateScope?w:e,$element:S,$attrs:A,$transclude:x};y=t.controller,"@"==y&&(y=A[t.name]),n=g(y,r,!0,t.controllerAs),b[t.name]=n,G||S.data("$"+t.name+"Controller",n.instance),C[t.name]=n})),j){N.$$addScopeInfo(S,w,!0,!(R&&(R===j||R===j.$$originalDirective))),N.$$addScopeClass(S,!0);var k=C&&C[j.name],O=w;k&&k.identifier&&j.bindToController===!0&&(O=k.instance),o(w.$$isolateBindings=j.$$isolateBindings,function(t,n){var i,o,a,s,u=t.attrName,c=t.optional,l=t.mode;switch(l){case"@":A.$observe(u,function(t){O[n]=t}),A.$$observers[u].$$scope=e,A[u]&&(O[n]=r(A[u])(e));break;case"=":if(c&&!A[u])return;o=v(A[u]),s=o.literal?I:function(t,e){return t===e||t!==t&&e!==e},a=o.assign||function(){throw i=O[n]=o(e),Kr("nonassign","Expression '{0}' used with directive '{1}' is non-assignable!",A[u],j.name)},i=O[n]=o(e);var f=function(t){return s(t,O[n])||(s(t,i)?a(e,t=O[n]):O[n]=t),i=t};f.$stateful=!0;var h;h=t.collection?e.$watchCollection(A[u],f):e.$watch(v(A[u],f),null,o.literal),w.$on("$destroy",h);break;case"&":o=v(A[u]),O[n]=function(t){return o(e,t)}}})}for(C&&(o(C,function(t){t()}),C=null),$=0,p=f.length;p>$;$++)m=f[$],ot(m,m.isolateScope?w:e,S,A,m.require&&d(m.directiveName,m.require,S,b),x);var T=e;for(j&&(j.template||null===j.templateUrl)&&(T=w),t&&t(T,i.childNodes,n,c),$=h.length-1;$>=0;$--)m=h[$],ot(m,m.isolateScope?w:e,S,A,m.require&&d(m.directiveName,m.require,S,b),x)}$=$||{};for(var x,C,A,k,O,T,M,V=-Number.MAX_VALUE,D=$.controllerDirectives,j=$.newIsolateScopeDirective,R=$.templateDirective,P=$.nonTlbTranscludeDirective,H=!1,B=!1,G=$.hasElementTranscludeDirective,J=s.$$element=nr(a),K=l,Q=u,tt=0,nt=t.length;nt>tt;tt++){A=t[tt];var it=A.$$start,st=A.$$end;if(it&&(J=q(a,it,st)),O=n,V>A.priority)break;if((M=A.scope)&&(A.templateUrl||(y(M)?(Z("new/isolated scope",j||x,A,J),j=A):Z("new/isolated scope",j,A,J)),x=x||A),k=A.name,!A.templateUrl&&A.controller&&(M=A.controller,D=D||{},Z("'"+k+"' controller",D[k],A,J),D[k]=A),(M=A.transclude)&&(H=!0,A.$$tlb||(Z("transclusion",P,A,J),P=A),"element"==M?(G=!0,V=A.priority,O=J,J=s.$$element=nr(e.createComment(" "+k+": "+s[k]+" ")),a=J[0],et(c,U(O),a),Q=N(O,u,V,K&&K.name,{nonTlbTranscludeDirective:P})):(O=nr(bt(a)).contents(),J.empty(),Q=N(O,u))),A.template)if(B=!0,Z("template",R,A,J),R=A,M=S(A.template)?A.template(J,s):A.template,M=lt(M),A.replace){if(K=A,O=vt(M)?[]:te(X(A.templateNamespace,pr(M))),a=O[0],1!=O.length||a.nodeType!==wr)throw Kr("tplrt","Template for directive '{0}' must have exactly one root element. {1}",k,"");et(c,J,a);var ut={$attr:{}},ct=_(a,[],ut),ft=t.splice(tt+1,t.length-(tt+1));j&&L(ct),t=t.concat(ct).concat(ft),W(s,ut),nt=t.length}else J.html(M);if(A.templateUrl)B=!0,Z("template",R,A,J),R=A,A.replace&&(K=A),b=Y(t.splice(tt,t.length-tt),J,s,c,H&&Q,f,h,{controllerDirectives:D,newIsolateScopeDirective:j,templateDirective:R,nonTlbTranscludeDirective:P}),nt=t.length;else if(A.compile)try{T=A.compile(J,s,Q),S(T)?p(null,T,it,st):T&&p(T.pre,T.post,it,st)}catch(ht){i(ht,z(J))}A.terminal&&(b.terminal=!0,V=Math.max(V,A.priority))}return b.scope=x&&x.scope===!0,b.transcludeOnThisElement=H,b.elementTranscludeOnThisElement=G,b.templateOnThisElement=B,b.transclude=Q,$.hasElementTranscludeDirective=G,b}function L(t){for(var e=0,n=t.length;n>e;e++)t[e]=$(t[e],{$$isolateScope:!0})}function B(e,r,o,u,c,l,f){if(r===c)return null;var h=null;if(a.hasOwnProperty(r))for(var p,d=t.get(r+s),v=0,m=d.length;m>v;v++)try{p=d[v],(u===n||u>p.priority)&&-1!=p.restrict.indexOf(o)&&(l&&(p=$(p,{
|
6
|
-
$$start:l,$$end:f})),e.push(p),h=p)}catch(g){i(g)}return h}function G(e){if(a.hasOwnProperty(e))for(var n,r=t.get(e+s),i=0,o=r.length;o>i;i++)if(n=r[i],n.multiElement)return!0;return!1}function W(t,e){var n=e.$attr,r=t.$attr,i=t.$$element;o(t,function(r,i){"$"!=i.charAt(0)&&(e[i]&&e[i]!==r&&(r+=("style"===i?";":" ")+e[i]),t.$set(i,r,!0,n[i]))}),o(e,function(e,o){"class"==o?(M(i,e),t["class"]=(t["class"]?t["class"]+" ":"")+e):"style"==o?(i.attr("style",i.attr("style")+";"+e),t.style=(t.style?t.style+";":"")+e):"$"==o.charAt(0)||t.hasOwnProperty(o)||(t[o]=e,r[o]=n[o])})}function Y(t,e,n,r,i,a,s,c){var l,f,h=[],p=e[0],d=t.shift(),v=$(d,{templateUrl:null,transclude:null,replace:null,$$originalDirective:d}),m=S(d.templateUrl)?d.templateUrl(e,n):d.templateUrl,g=d.templateNamespace;return e.empty(),u(m).then(function(u){var $,w,b,x;if(u=lt(u),d.replace){if(b=vt(u)?[]:te(X(g,pr(u))),$=b[0],1!=b.length||$.nodeType!==wr)throw Kr("tplrt","Template for directive '{0}' must have exactly one root element. {1}",d.name,m);w={$attr:{}},et(r,e,$);var S=_($,[],w);y(d.scope)&&L(S),t=S.concat(t),W(n,w)}else $=p,e.html(u);for(t.unshift(v),l=H(t,$,n,i,e,d,a,s,c),o(r,function(t,n){t==$&&(r[n]=e[0])}),f=D(e[0].childNodes,i);h.length;){var C=h.shift(),A=h.shift(),E=h.shift(),k=h.shift(),O=e[0];if(!C.$$destroyed){if(A!==p){var T=A.className;c.hasElementTranscludeDirective&&d.replace||(O=bt($)),et(E,nr(A),O),M(nr(O),T)}x=l.transcludeOnThisElement?P(C,l.transclude,k):k,l(f,C,O,r,x)}}h=null}),function(t,e,n,r,i){var o=i;e.$$destroyed||(h?h.push(e,n,r,o):(l.transcludeOnThisElement&&(o=P(e,l.transclude,i)),l(f,e,n,r,o)))}}function J(t,e){var n=e.priority-t.priority;return 0!==n?n:t.name!==e.name?t.name<e.name?-1:1:t.index-e.index}function Z(t,e,n,r){if(e)throw Kr("multidir","Multiple directives [{0}, {1}] asking for {2} on: {3}",e.name,n.name,t,z(r))}function K(t,e){var n=r(e,!0);n&&t.push({priority:0,compile:function(t){var e=t.parent(),r=!!e.length;return r&&N.$$addBindingClass(e),function(t,e){var i=e.parent();r||N.$$addBindingClass(i),N.$$addBindingInfo(i,n.expressions),t.$watch(n,function(t){e[0].nodeValue=t})}}})}function X(t,n){switch(t=Zn(t||"html")){case"svg":case"math":var r=e.createElement("div");return r.innerHTML="<"+t+">"+n+"</"+t+">",r.childNodes[0].childNodes;default:return n}}function Q(t,e){if("srcdoc"==e)return k.HTML;var n=j(t);return"xlinkHref"==e||"form"==n&&"action"==e||"img"!=n&&("src"==e||"ngSrc"==e)?k.RESOURCE_URL:void 0}function tt(t,e,n,i,o){var a=Q(t,i);o=h[i]||o;var s=r(n,!0,a,o);if(s){if("multiple"===i&&"select"===j(t))throw Kr("selmulti","Binding to the 'multiple' attribute is not supported. Element: {0}",z(t));e.push({priority:100,compile:function(){return{pre:function(t,e,u){var c=u.$$observers||(u.$$observers={});if(b.test(i))throw Kr("nodomevents","Interpolations for HTML DOM event attributes are disallowed. Please use the ng- versions (such as ng-click instead of onclick) instead.");var l=u[i];l!==n&&(s=l&&r(l,!0,a,o),n=l),s&&(u[i]=s(t),(c[i]||(c[i]=[])).$$inter=!0,(u.$$observers&&u.$$observers[i].$$scope||t).$watch(s,function(t,e){"class"===i&&t!=e?u.$updateClass(t,e):u.$set(i,t)}))}}}})}}function et(t,n,r){var i,o,a=n[0],s=n.length,u=a.parentNode;if(t)for(i=0,o=t.length;o>i;i++)if(t[i]==a){t[i++]=r;for(var c=i,l=c+s-1,f=t.length;f>c;c++,l++)f>l?t[c]=t[l]:delete t[c];t.length-=s-1,t.context===a&&(t.context=r);break}u&&u.replaceChild(r,a);var h=e.createDocumentFragment();h.appendChild(a),nr(r).data(nr(a).data()),rr?(hr=!0,rr.cleanData([a])):delete nr.cache[a[nr.expando]];for(var $=1,p=n.length;p>$;$++){var d=n[$];nr(d).remove(),h.appendChild(d),delete n[$]}n[0]=r,n.length=1}function rt(t,e){return f(function(){return t.apply(null,arguments)},t,e)}function ot(t,e,n,r,o,a){try{t(e,n,r,o,a)}catch(s){i(s,z(n))}}var at=function(t,e){if(e){var n,r,i,o=Object.keys(e);for(n=0,r=o.length;r>n;n++)i=o[n],this[i]=e[i]}else this.$attr={};this.$$element=t};at.prototype={$normalize:Xt,$addClass:function(t){t&&t.length>0&&O.addClass(this.$$element,t)},$removeClass:function(t){t&&t.length>0&&O.removeClass(this.$$element,t)},$updateClass:function(t,e){var n=Qt(t,e);n&&n.length&&O.addClass(this.$$element,n);var r=Qt(e,t);r&&r.length&&O.removeClass(this.$$element,r)},$set:function(t,e,r,a){var s,u=this.$$element[0],c=Pt(u,t),l=_t(u,t),f=t;if(c?(this.$$element.prop(t,e),a=c):l&&(this[l]=e,f=l),this[t]=e,a?this.$attr[t]=a:(a=this.$attr[t],a||(this.$attr[t]=a=nt(t,"-"))),s=j(this.$$element),"a"===s&&"href"===t||"img"===s&&"src"===t)this[t]=e=T(e,"src"===t);else if("img"===s&&"srcset"===t){for(var h="",$=pr(e),p=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,d=/\s/.test($)?p:/(,)/,v=$.split(d),m=Math.floor(v.length/2),g=0;m>g;g++){var y=2*g;h+=T(pr(v[y]),!0),h+=" "+pr(v[y+1])}var w=pr(v[2*g]).split(/\s/);h+=T(pr(w[0]),!0),2===w.length&&(h+=" "+pr(w[1])),this[t]=e=h}r!==!1&&(null===e||e===n?this.$$element.removeAttr(a):this.$$element.attr(a,e));var b=this.$$observers;b&&o(b[f],function(t){try{t(e)}catch(n){i(n)}})},$observe:function(t,e){var n=this,r=n.$$observers||(n.$$observers=ct()),i=r[t]||(r[t]=[]);return i.push(e),C.$evalAsync(function(){!i.$$inter&&n.hasOwnProperty(t)&&e(n[t])}),function(){R(i,e)}}};var st=r.startSymbol(),ut=r.endSymbol(),lt="{{"==st||"}}"==ut?d:function(t){return t.replace(/\{\{/g,st).replace(/}}/g,ut)},ft=/^ngAttr[A-Z]/;return N.$$addBindingInfo=x?function(t,e){var n=t.data("$binding")||[];$r(e)?n=n.concat(e):n.push(e),t.data("$binding",n)}:p,N.$$addBindingClass=x?function(t){M(t,"ng-binding")}:p,N.$$addScopeInfo=x?function(t,e,n,r){var i=n?r?"$isolateScopeNoTemplate":"$isolateScope":"$scope";t.data(i,e)}:p,N.$$addScopeClass=x?function(t,e){M(t,e?"ng-isolate-scope":"ng-scope")}:p,N}]}function Xt(t){return dt(t.replace(Xr,""))}function Qt(t,e){var n="",r=t.split(/\s+/),i=e.split(/\s+/);t:for(var o=0;o<r.length;o++){for(var a=r[o],s=0;s<i.length;s++)if(a==i[s])continue t;n+=(n.length>0?" ":"")+a}return n}function te(t){t=nr(t);var e=t.length;if(1>=e)return t;for(;e--;){var n=t[e];n.nodeType===Sr&&ar.call(t,e,1)}return t}function ee(){var t={},e=!1,i=/^(\S+)(\s+as\s+(\w+))?$/;this.register=function(e,n){at(e,"controller"),y(e)?f(t,e):t[e]=n},this.allowGlobals=function(){e=!0},this.$get=["$injector","$window",function(o,a){function s(t,e,n,i){if(!t||!y(t.$scope))throw r("$controller")("noscp","Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.",i,e);t.$scope[e]=n}return function(r,u,c,l){var h,$,p,d;if(c=c===!0,l&&w(l)&&(d=l),w(r)){if($=r.match(i),!$)throw Qr("ctrlfmt","Badly formed controller string '{0}'. Must match `__name__ as __id__` or `__name__`.",r);p=$[1],d=d||$[3],r=t.hasOwnProperty(p)?t[p]:st(u.$scope,p,!0)||(e?st(a,p,!0):n),ot(r,p,!0)}if(c){var v=($r(r)?r[r.length-1]:r).prototype;return h=Object.create(v||null),d&&s(u,d,h,p||r.name),f(function(){return o.invoke(r,h,u,p),h},{instance:h,identifier:d})}return h=o.instantiate(r,u,p),d&&s(u,d,h,p||r.name),h}}]}function ne(){this.$get=["$window",function(t){return nr(t.document)}]}function re(){this.$get=["$log",function(t){return function(e,n){t.error.apply(t,arguments)}}]}function ie(t,e){if(w(t)){var n=t.replace(ii,"").trim();if(n){var r=e("Content-Type");(r&&0===r.indexOf(ti)||oe(n))&&(t=B(n))}}return t}function oe(t){var e=t.match(ni);return e&&ri[e[0]].test(t)}function ae(t){var e,n,r,i=ct();return t?(o(t.split("\n"),function(t){r=t.indexOf(":"),e=Zn(pr(t.substr(0,r))),n=pr(t.substr(r+1)),e&&(i[e]=i[e]?i[e]+", "+n:n)}),i):i}function se(t){var e=y(t)?t:n;return function(n){if(e||(e=ae(t)),n){var r=e[Zn(n)];return void 0===r&&(r=null),r}return e}}function ue(t,e,n,r){return S(r)?r(t,e,n):(o(r,function(r){t=r(t,e,n)}),t)}function ce(t){return t>=200&&300>t}function le(){var t=this.defaults={transformResponse:[ie],transformRequest:[function(t){return!y(t)||k(t)||T(t)||O(t)?t:L(t)}],headers:{common:{Accept:"application/json, text/plain, */*"},post:_(ei),put:_(ei),patch:_(ei)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN"},e=!1;this.useApplyAsync=function(t){return g(t)?(e=!!t,this):e};var i=this.interceptors=[];this.$get=["$httpBackend","$browser","$cacheFactory","$rootScope","$q","$injector",function(a,u,c,l,h,$){function p(e){function i(t){var e=f({},t);return t.data?e.data=ue(t.data,t.headers,t.status,u.transformResponse):e.data=t.data,ce(t.status)?e:h.reject(e)}function a(t){var e,n={};return o(t,function(t,r){S(t)?(e=t(),null!=e&&(n[r]=e)):n[r]=t}),n}function s(e){var n,r,i,o=t.headers,s=f({},e.headers);o=f({},o.common,o[Zn(e.method)]);t:for(n in o){r=Zn(n);for(i in s)if(Zn(i)===r)continue t;s[n]=o[n]}return a(s)}if(!lr.isObject(e))throw r("$http")("badreq","Http request configuration must be an object. Received: {0}",e);var u=f({method:"get",transformRequest:t.transformRequest,transformResponse:t.transformResponse},e);u.headers=s(e),u.method=Xn(u.method);var c=function(e){var r=e.headers,a=ue(e.data,se(r),n,e.transformRequest);return m(a)&&o(r,function(t,e){"content-type"===Zn(e)&&delete r[e]}),m(e.withCredentials)&&!m(t.withCredentials)&&(e.withCredentials=t.withCredentials),b(e,a).then(i,i)},l=[c,n],$=h.when(u);for(o(E,function(t){(t.request||t.requestError)&&l.unshift(t.request,t.requestError),(t.response||t.responseError)&&l.push(t.response,t.responseError)});l.length;){var p=l.shift(),d=l.shift();$=$.then(p,d)}return $.success=function(t){return ot(t,"fn"),$.then(function(e){t(e.data,e.status,e.headers,u)}),$},$.error=function(t){return ot(t,"fn"),$.then(null,function(e){t(e.data,e.status,e.headers,u)}),$},$}function d(t){o(arguments,function(t){p[t]=function(e,n){return p(f(n||{},{method:t,url:e}))}})}function v(t){o(arguments,function(t){p[t]=function(e,n,r){return p(f(r||{},{method:t,url:e,data:n}))}})}function b(r,i){function o(t,n,r,i){function o(){s(n,t,r,i)}$&&(ce(t)?$.put(x,[t,n,ae(r),i]):$.remove(x)),e?l.$applyAsync(o):(o(),l.$$phase||l.$apply())}function s(t,e,n,i){e=e>=-1?e:0,(ce(e)?v.resolve:v.reject)({data:t,status:e,headers:se(n),config:r,statusText:i})}function c(t){s(t.data,t.status,_(t.headers()),t.statusText)}function f(){var t=p.pendingRequests.indexOf(r);-1!==t&&p.pendingRequests.splice(t,1)}var $,d,v=h.defer(),w=v.promise,b=r.headers,x=C(r.url,r.params);if(p.pendingRequests.push(r),w.then(f,f),!r.cache&&!t.cache||r.cache===!1||"GET"!==r.method&&"JSONP"!==r.method||($=y(r.cache)?r.cache:y(t.cache)?t.cache:A),$&&(d=$.get(x),g(d)?N(d)?d.then(c,c):$r(d)?s(d[1],d[0],_(d[2]),d[3]):s(d,200,{},"OK"):$.put(x,w)),m(d)){var S=an(r.url)?u.cookies()[r.xsrfCookieName||t.xsrfCookieName]:n;S&&(b[r.xsrfHeaderName||t.xsrfHeaderName]=S),a(r.method,x,i,o,b,r.timeout,r.withCredentials,r.responseType)}return w}function C(t,e){if(!e)return t;var n=[];return s(e,function(t,e){null===t||m(t)||($r(t)||(t=[t]),o(t,function(t){y(t)&&(t=x(t)?t.toISOString():L(t)),n.push(Z(e)+"="+Z(t))}))}),n.length>0&&(t+=(-1==t.indexOf("?")?"?":"&")+n.join("&")),t}var A=c("$http"),E=[];return o(i,function(t){E.unshift(w(t)?$.get(t):$.invoke(t))}),p.pendingRequests=[],d("get","delete","head","jsonp"),v("post","put","patch"),p.defaults=t,p}]}function fe(){return new t.XMLHttpRequest}function he(){this.$get=["$browser","$window","$document",function(t,e,n){return $e(t,fe,t.defer,e.angular.callbacks,n[0])}]}function $e(t,e,r,i,a){function s(t,e,n){var r=a.createElement("script"),o=null;return r.type="text/javascript",r.src=t,r.async=!0,o=function(t){Mr(r,"load",o),Mr(r,"error",o),a.body.removeChild(r),r=null;var s=-1,u="unknown";t&&("load"!==t.type||i[e].called||(t={type:"error"}),u=t.type,s="error"===t.type?404:200),n&&n(s,u)},Tr(r,"load",o),Tr(r,"error",o),a.body.appendChild(r),o}return function(a,u,c,l,f,h,$,d){function v(){w&&w(),b&&b.abort()}function m(e,i,o,a,s){C!==n&&r.cancel(C),w=b=null,e(i,o,a,s),t.$$completeOutstandingRequest(p)}if(t.$$incOutstandingRequestCount(),u=u||t.url(),"jsonp"==Zn(a)){var y="_"+(i.counter++).toString(36);i[y]=function(t){i[y].data=t,i[y].called=!0};var w=s(u.replace("JSON_CALLBACK","angular.callbacks."+y),y,function(t,e){m(l,t,i[y].data,"",e),i[y]=p})}else{var b=e();b.open(a,u,!0),o(f,function(t,e){g(t)&&b.setRequestHeader(e,t)}),b.onload=function(){var t=b.statusText||"",e="response"in b?b.response:b.responseText,n=1223===b.status?204:b.status;0===n&&(n=e?200:"file"==on(u).protocol?404:0),m(l,n,e,b.getAllResponseHeaders(),t)};var x=function(){m(l,-1,null,null,"")};if(b.onerror=x,b.onabort=x,$&&(b.withCredentials=!0),d)try{b.responseType=d}catch(S){if("json"!==d)throw S}b.send(c||null)}if(h>0)var C=r(v,h);else N(h)&&h.then(v)}}function pe(){var t="{{",e="}}";this.startSymbol=function(e){return e?(t=e,this):t},this.endSymbol=function(t){return t?(e=t,this):e},this.$get=["$parse","$exceptionHandler","$sce",function(n,r,i){function o(t){return"\\\\\\"+t}function a(o,a,h,$){function p(n){return n.replace(c,t).replace(l,e)}function d(t){try{return t=T(t),$&&!g(t)?t:M(t)}catch(e){var n=oi("interr","Can't interpolate: {0}\n{1}",o,e.toString());r(n)}}$=!!$;for(var v,y,w,b=0,x=[],C=[],A=o.length,E=[],k=[];A>b;){if(-1==(v=o.indexOf(t,b))||-1==(y=o.indexOf(e,v+s))){b!==A&&E.push(p(o.substring(b)));break}b!==v&&E.push(p(o.substring(b,v))),w=o.substring(v+s,y),x.push(w),C.push(n(w,d)),b=y+u,k.push(E.length),E.push("")}if(h&&E.length>1)throw oi("noconcat","Error while interpolating: {0}\nStrict Contextual Escaping disallows interpolations that concatenate multiple expressions when a trusted value is required. See http://docs.angularjs.org/api/ng.$sce",o);if(!a||x.length){var O=function(t){for(var e=0,n=x.length;n>e;e++){if($&&m(t[e]))return;E[k[e]]=t[e]}return E.join("")},T=function(t){return h?i.getTrusted(h,t):i.valueOf(t)},M=function(t){if(null==t)return"";switch(typeof t){case"string":break;case"number":t=""+t;break;default:t=L(t)}return t};return f(function(t){var e=0,n=x.length,i=new Array(n);try{for(;n>e;e++)i[e]=C[e](t);return O(i)}catch(a){var s=oi("interr","Can't interpolate: {0}\n{1}",o,a.toString());r(s)}},{exp:o,expressions:x,$$watchDelegate:function(t,e,n){var r;return t.$watchGroup(C,function(n,i){var o=O(n);S(e)&&e.call(this,o,n!==i?r:o,t),r=o},n)}})}}var s=t.length,u=e.length,c=new RegExp(t.replace(/./g,o),"g"),l=new RegExp(e.replace(/./g,o),"g");return a.startSymbol=function(){return t},a.endSymbol=function(){return e},a}]}function de(){this.$get=["$rootScope","$window","$q","$$q",function(t,e,n,r){function i(i,a,s,u){var c=e.setInterval,l=e.clearInterval,f=0,h=g(u)&&!u,$=(h?r:n).defer(),p=$.promise;return s=g(s)?s:0,p.then(null,null,i),p.$$intervalId=c(function(){$.notify(f++),s>0&&f>=s&&($.resolve(f),l(p.$$intervalId),delete o[p.$$intervalId]),h||t.$apply()},a),o[p.$$intervalId]=$,p}var o={};return i.cancel=function(t){return t&&t.$$intervalId in o?(o[t.$$intervalId].reject("canceled"),e.clearInterval(t.$$intervalId),delete o[t.$$intervalId],!0):!1},i}]}function ve(){this.$get=function(){return{id:"en-us",NUMBER_FORMATS:{DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{minInt:1,minFrac:0,maxFrac:3,posPre:"",posSuf:"",negPre:"-",negSuf:"",gSize:3,lgSize:3},{minInt:1,minFrac:2,maxFrac:2,posPre:"¤",posSuf:"",negPre:"(¤",negSuf:")",gSize:3,lgSize:3}],CURRENCY_SYM:"$"},DATETIME_FORMATS:{MONTH:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),SHORTMONTH:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),DAY:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),SHORTDAY:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(","),AMPMS:["AM","PM"],medium:"MMM d, y h:mm:ss a","short":"M/d/yy h:mm a",fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",mediumDate:"MMM d, y",shortDate:"M/d/yy",mediumTime:"h:mm:ss a",shortTime:"h:mm a",ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"]},pluralCat:function(t){return 1===t?"one":"other"}}}}function me(t){for(var e=t.split("/"),n=e.length;n--;)e[n]=J(e[n]);return e.join("/")}function ge(t,e){var n=on(t);e.$$protocol=n.protocol,e.$$host=n.hostname,e.$$port=h(n.port)||si[n.protocol]||null}function ye(t,e){var n="/"!==t.charAt(0);n&&(t="/"+t);var r=on(t);e.$$path=decodeURIComponent(n&&"/"===r.pathname.charAt(0)?r.pathname.substring(1):r.pathname),e.$$search=W(r.search),e.$$hash=decodeURIComponent(r.hash),e.$$path&&"/"!=e.$$path.charAt(0)&&(e.$$path="/"+e.$$path)}function we(t,e){return 0===e.indexOf(t)?e.substr(t.length):void 0}function be(t){var e=t.indexOf("#");return-1==e?t:t.substr(0,e)}function xe(t){return t.replace(/(#.+)|#$/,"$1")}function Se(t){return t.substr(0,be(t).lastIndexOf("/")+1)}function Ce(t){return t.substring(0,t.indexOf("/",t.indexOf("//")+2))}function Ae(t,e,r){this.$$html5=!0,r=r||"",ge(t,this),this.$$parse=function(t){var n=we(e,t);if(!w(n))throw ui("ipthprfx",'Invalid url "{0}", missing path prefix "{1}".',t,e);ye(n,this),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){var t=Y(this.$$search),n=this.$$hash?"#"+J(this.$$hash):"";this.$$url=me(this.$$path)+(t?"?"+t:"")+n,this.$$absUrl=e+this.$$url.substr(1)},this.$$parseLinkUrl=function(i,o){if(o&&"#"===o[0])return this.hash(o.slice(1)),!0;var a,s,u;return(a=we(t,i))!==n?(s=a,u=(a=we(r,a))!==n?e+(we("/",a)||a):t+s):(a=we(e,i))!==n?u=e+a:e==i+"/"&&(u=e),u&&this.$$parse(u),!!u}}function Ee(t,e,n){ge(t,this),this.$$parse=function(r){function i(t,e,n){var r,i=/^\/[A-Z]:(\/.*)/;return 0===e.indexOf(n)&&(e=e.replace(n,"")),i.exec(e)?t:(r=i.exec(t),r?r[1]:t)}var o,a=we(t,r)||we(e,r);m(a)||"#"!==a.charAt(0)?this.$$html5?o=a:(o="",m(a)&&(t=r,this.replace())):(o=we(n,a),m(o)&&(o=a)),ye(o,this),this.$$path=i(this.$$path,o,t),this.$$compose()},this.$$compose=function(){var e=Y(this.$$search),r=this.$$hash?"#"+J(this.$$hash):"";this.$$url=me(this.$$path)+(e?"?"+e:"")+r,this.$$absUrl=t+(this.$$url?n+this.$$url:"")},this.$$parseLinkUrl=function(e,n){return be(t)==be(e)?(this.$$parse(e),!0):!1}}function ke(t,e,n){this.$$html5=!0,Ee.apply(this,arguments),this.$$parseLinkUrl=function(r,i){if(i&&"#"===i[0])return this.hash(i.slice(1)),!0;var o,a;return t==be(r)?o=r:(a=we(e,r))?o=t+n+a:e===r+"/"&&(o=e),o&&this.$$parse(o),!!o},this.$$compose=function(){var e=Y(this.$$search),r=this.$$hash?"#"+J(this.$$hash):"";this.$$url=me(this.$$path)+(e?"?"+e:"")+r,this.$$absUrl=t+n+this.$$url}}function Oe(t){return function(){return this[t]}}function Te(t,e){return function(n){return m(n)?this[t]:(this[t]=e(n),this.$$compose(),this)}}function Me(){var t="",e={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(e){return g(e)?(t=e,this):t},this.html5Mode=function(t){return M(t)?(e.enabled=t,this):y(t)?(M(t.enabled)&&(e.enabled=t.enabled),M(t.requireBase)&&(e.requireBase=t.requireBase),M(t.rewriteLinks)&&(e.rewriteLinks=t.rewriteLinks),this):e},this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(n,r,i,o,a){function s(t,e,n){var i=c.url(),o=c.$$state;try{r.url(t,e,n),c.$$state=r.state()}catch(a){throw c.url(i),c.$$state=o,a}}function u(t,e){n.$broadcast("$locationChangeSuccess",c.absUrl(),t,c.$$state,e)}var c,l,f,h=r.baseHref(),$=r.url();if(e.enabled){if(!h&&e.requireBase)throw ui("nobase","$location in HTML5 mode requires a <base> tag to be present!");f=Ce($)+(h||"/"),l=i.history?Ae:ke}else f=be($),l=Ee;var p=Se(f);c=new l(f,p,"#"+t),c.$$parseLinkUrl($,$),c.$$state=r.state();var d=/^\s*(javascript|mailto):/i;o.on("click",function(t){if(e.rewriteLinks&&!t.ctrlKey&&!t.metaKey&&!t.shiftKey&&2!=t.which&&2!=t.button){for(var i=nr(t.target);"a"!==j(i[0]);)if(i[0]===o[0]||!(i=i.parent())[0])return;var s=i.prop("href"),u=i.attr("href")||i.attr("xlink:href");y(s)&&"[object SVGAnimatedString]"===s.toString()&&(s=on(s.animVal).href),d.test(s)||!s||i.attr("target")||t.isDefaultPrevented()||c.$$parseLinkUrl(s,u)&&(t.preventDefault(),c.absUrl()!=r.url()&&(n.$apply(),a.angular["ff-684208-preventDefault"]=!0))}}),xe(c.absUrl())!=xe($)&&r.url(c.absUrl(),!0);var v=!0;return r.onUrlChange(function(t,e){return m(we(p,t))?void(a.location.href=t):(n.$evalAsync(function(){var r,i=c.absUrl(),o=c.$$state;c.$$parse(t),c.$$state=e,r=n.$broadcast("$locationChangeStart",t,i,e,o).defaultPrevented,c.absUrl()===t&&(r?(c.$$parse(i),c.$$state=o,s(i,!1,o)):(v=!1,u(i,o)))}),void(n.$$phase||n.$digest()))}),n.$watch(function(){var t=xe(r.url()),e=xe(c.absUrl()),o=r.state(),a=c.$$replace,l=t!==e||c.$$html5&&i.history&&o!==c.$$state;(v||l)&&(v=!1,n.$evalAsync(function(){var e=c.absUrl(),r=n.$broadcast("$locationChangeStart",e,t,c.$$state,o).defaultPrevented;c.absUrl()===e&&(r?(c.$$parse(t),c.$$state=o):(l&&s(e,a,o===c.$$state?null:c.$$state),u(t,o)))})),c.$$replace=!1}),c}]}function Ne(){var t=!0,e=this;this.debugEnabled=function(e){return g(e)?(t=e,this):t},this.$get=["$window",function(n){function r(t){return t instanceof Error&&(t.stack?t=t.message&&-1===t.stack.indexOf(t.message)?"Error: "+t.message+"\n"+t.stack:t.stack:t.sourceURL&&(t=t.message+"\n"+t.sourceURL+":"+t.line)),t}function i(t){var e=n.console||{},i=e[t]||e.log||p,a=!1;try{a=!!i.apply}catch(s){}return a?function(){var t=[];return o(arguments,function(e){t.push(r(e))}),i.apply(e,t)}:function(t,e){i(t,null==e?"":e)}}return{log:i("log"),info:i("info"),warn:i("warn"),error:i("error"),debug:function(){var n=i("debug");return function(){t&&n.apply(e,arguments)}}()}}]}function Ve(t,e){if("__defineGetter__"===t||"__defineSetter__"===t||"__lookupGetter__"===t||"__lookupSetter__"===t||"__proto__"===t)throw li("isecfld","Attempting to access a disallowed field in Angular expressions! Expression: {0}",e);return t}function De(t,e){if(t+="",!w(t))throw li("iseccst","Cannot convert object to primitive value! Expression: {0}",e);return t}function je(t,e){if(t){if(t.constructor===t)throw li("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",e);if(t.window===t)throw li("isecwindow","Referencing the Window in Angular expressions is disallowed! Expression: {0}",e);if(t.children&&(t.nodeName||t.prop&&t.attr&&t.find))throw li("isecdom","Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}",e);if(t===Object)throw li("isecobj","Referencing Object in Angular expressions is disallowed! Expression: {0}",e)}return t}function Re(t,e){if(t){if(t.constructor===t)throw li("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",e);if(t===fi||t===hi||t===$i)throw li("isecff","Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}",e)}}function Pe(t){return t.constant}function _e(t,e,n,r,i){je(t,i),je(e,i);for(var o,a=n.split("."),s=0;a.length>1;s++){o=Ve(a.shift(),i);var u=0===s&&e&&e[o]||t[o];u||(u={},t[o]=u),t=je(u,i)}return o=Ve(a.shift(),i),je(t[o],i),t[o]=r,r}function Ie(t){return"constructor"==t}function qe(t,e,r,i,o,a,s){Ve(t,a),Ve(e,a),Ve(r,a),Ve(i,a),Ve(o,a);var u=function(t){return je(t,a)},c=s||Ie(t)?u:d,l=s||Ie(e)?u:d,f=s||Ie(r)?u:d,h=s||Ie(i)?u:d,$=s||Ie(o)?u:d;return function(a,s){var u=s&&s.hasOwnProperty(t)?s:a;return null==u?u:(u=c(u[t]),e?null==u?n:(u=l(u[e]),r?null==u?n:(u=f(u[r]),i?null==u?n:(u=h(u[i]),o?null==u?n:u=$(u[o]):u):u):u):u)}}function Ue(t,e){return function(n,r){return t(n,r,je,e)}}function Fe(t,e,r){var i=e.expensiveChecks,a=i?wi:yi,s=a[t];if(s)return s;var u=t.split("."),c=u.length;if(e.csp)s=6>c?qe(u[0],u[1],u[2],u[3],u[4],r,i):function(t,e){var o,a=0;do o=qe(u[a++],u[a++],u[a++],u[a++],u[a++],r,i)(t,e),e=n,t=o;while(c>a);return o};else{var l="";i&&(l+="s = eso(s, fe);\nl = eso(l, fe);\n");var f=i;o(u,function(t,e){Ve(t,r);var n=(e?"s":'((l&&l.hasOwnProperty("'+t+'"))?l:s)')+"."+t;(i||Ie(t))&&(n="eso("+n+", fe)",f=!0),l+="if(s == null) return undefined;\ns="+n+";\n"}),l+="return s;";var h=new Function("s","l","eso","fe",l);h.toString=v(l),f&&(h=Ue(h,r)),s=h}return s.sharedGetter=!0,s.assign=function(e,n,r){return _e(e,r,t,n,t)},a[t]=s,s}function He(t){return S(t.valueOf)?t.valueOf():bi.call(t)}function Le(){var t=ct(),e=ct();this.$get=["$filter","$sniffer",function(n,r){function i(t){var e=t;return t.sharedGetter&&(e=function(e,n){return t(e,n)},e.literal=t.literal,e.constant=t.constant,e.assign=t.assign),e}function a(t,e){for(var n=0,r=t.length;r>n;n++){var i=t[n];i.constant||(i.inputs?a(i.inputs,e):-1===e.indexOf(i)&&e.push(i))}return e}function s(t,e){return null==t||null==e?t===e:"object"==typeof t&&(t=He(t),"object"==typeof t)?!1:t===e||t!==t&&e!==e}function u(t,e,n,r){var i,o=r.$$inputs||(r.$$inputs=a(r.inputs,[]));if(1===o.length){var u=s;return o=o[0],t.$watch(function(t){var e=o(t);return s(e,u)||(i=r(t),u=e&&He(e)),i},e,n)}for(var c=[],l=0,f=o.length;f>l;l++)c[l]=s;return t.$watch(function(t){for(var e=!1,n=0,a=o.length;a>n;n++){var u=o[n](t);(e||(e=!s(u,c[n])))&&(c[n]=u&&He(u))}return e&&(i=r(t)),i},e,n)}function c(t,e,n,r){var i,o;return i=t.$watch(function(t){return r(t)},function(t,n,r){o=t,S(e)&&e.apply(this,arguments),g(t)&&r.$$postDigest(function(){g(o)&&i()})},n)}function l(t,e,n,r){function i(t){var e=!0;return o(t,function(t){g(t)||(e=!1)}),e}var a,s;return a=t.$watch(function(t){return r(t)},function(t,n,r){s=t,S(e)&&e.call(this,t,n,r),i(t)&&r.$$postDigest(function(){i(s)&&a()})},n)}function f(t,e,n,r){var i;return i=t.$watch(function(t){return r(t)},function(t,n,r){S(e)&&e.apply(this,arguments),i()},n)}function h(t,e){if(!e)return t;var n=t.$$watchDelegate,r=n!==l&&n!==c,i=r?function(n,r){var i=t(n,r);return e(i,n,r)}:function(n,r){var i=t(n,r),o=e(i,n,r);return g(i)?o:i};return t.$$watchDelegate&&t.$$watchDelegate!==u?i.$$watchDelegate=t.$$watchDelegate:e.$stateful||(i.$$watchDelegate=u,i.inputs=[t]),i}var $={csp:r.csp,expensiveChecks:!1},d={csp:r.csp,expensiveChecks:!0};return function(r,o,a){var s,v,m;switch(typeof r){case"string":m=r=r.trim();var g=a?e:t;if(s=g[m],!s){":"===r.charAt(0)&&":"===r.charAt(1)&&(v=!0,r=r.substring(2));var y=a?d:$,w=new mi(y),b=new gi(w,n,y);s=b.parse(r),s.constant?s.$$watchDelegate=f:v?(s=i(s),s.$$watchDelegate=s.literal?l:c):s.inputs&&(s.$$watchDelegate=u),g[m]=s}return h(s,o);case"function":return h(r,o);default:return h(p,o)}}}]}function Be(){this.$get=["$rootScope","$exceptionHandler",function(t,e){return Ge(function(e){t.$evalAsync(e)},e)}]}function ze(){this.$get=["$browser","$exceptionHandler",function(t,e){return Ge(function(e){t.defer(e)},e)}]}function Ge(t,e){function i(t,e,n){function r(e){return function(n){i||(i=!0,e.call(t,n))}}var i=!1;return[r(e),r(n)]}function a(){this.$$state={status:0}}function s(t,e){return function(n){e.call(t,n)}}function u(t){var r,i,o;o=t.pending,t.processScheduled=!1,t.pending=n;for(var a=0,s=o.length;s>a;++a){i=o[a][0],r=o[a][t.status];try{S(r)?i.resolve(r(t.value)):1===t.status?i.resolve(t.value):i.reject(t.value)}catch(u){i.reject(u),e(u)}}}function c(e){!e.processScheduled&&e.pending&&(e.processScheduled=!0,t(function(){u(e)}))}function l(){this.promise=new a,this.resolve=s(this,this.resolve),this.reject=s(this,this.reject),this.notify=s(this,this.notify)}function f(t){var e=new l,n=0,r=$r(t)?[]:{};return o(t,function(t,i){n++,m(t).then(function(t){r.hasOwnProperty(i)||(r[i]=t,--n||e.resolve(r))},function(t){r.hasOwnProperty(i)||e.reject(t)})}),0===n&&e.resolve(r),e.promise}var h=r("$q",TypeError),$=function(){return new l};a.prototype={then:function(t,e,n){var r=new l;return this.$$state.pending=this.$$state.pending||[],this.$$state.pending.push([r,t,e,n]),this.$$state.status>0&&c(this.$$state),r.promise},"catch":function(t){return this.then(null,t)},"finally":function(t,e){return this.then(function(e){return v(e,!0,t)},function(e){return v(e,!1,t)},e)}},l.prototype={resolve:function(t){this.promise.$$state.status||(t===this.promise?this.$$reject(h("qcycle","Expected promise to be resolved with value other than itself '{0}'",t)):this.$$resolve(t))},$$resolve:function(t){var n,r;r=i(this,this.$$resolve,this.$$reject);try{(y(t)||S(t))&&(n=t&&t.then),S(n)?(this.promise.$$state.status=-1,n.call(t,r[0],r[1],this.notify)):(this.promise.$$state.value=t,this.promise.$$state.status=1,c(this.promise.$$state))}catch(o){r[1](o),e(o)}},reject:function(t){this.promise.$$state.status||this.$$reject(t)},$$reject:function(t){this.promise.$$state.value=t,this.promise.$$state.status=2,c(this.promise.$$state)},notify:function(n){var r=this.promise.$$state.pending;this.promise.$$state.status<=0&&r&&r.length&&t(function(){for(var t,i,o=0,a=r.length;a>o;o++){i=r[o][0],t=r[o][3];try{i.notify(S(t)?t(n):n)}catch(s){e(s)}}})}};var p=function(t){var e=new l;return e.reject(t),e.promise},d=function(t,e){var n=new l;return e?n.resolve(t):n.reject(t),n.promise},v=function(t,e,n){var r=null;try{S(n)&&(r=n())}catch(i){return d(i,!1)}return N(r)?r.then(function(){return d(t,e)},function(t){return d(t,!1)}):d(t,e)},m=function(t,e,n,r){var i=new l;return i.resolve(t),i.promise.then(e,n,r)},g=function w(t){function e(t){r.resolve(t)}function n(t){r.reject(t)}if(!S(t))throw h("norslvr","Expected resolverFn, got '{0}'",t);if(!(this instanceof w))return new w(t);var r=new l;return t(e,n),r.promise};return g.defer=$,g.reject=p,g.when=m,g.all=f,g}function We(){this.$get=["$window","$timeout",function(t,e){function n(){for(var t=0;t<l.length;t++){var e=l[t];e&&(l[t]=null,e())}c=l.length=0}function r(t){var e=l.length;return c++,l.push(t),0===e&&(u=s(n)),function(){e>=0&&(l[e]=null,e=null,0===--c&&u&&(u(),u=null,l.length=0))}}var i=t.requestAnimationFrame||t.webkitRequestAnimationFrame,o=t.cancelAnimationFrame||t.webkitCancelAnimationFrame||t.webkitCancelRequestAnimationFrame,a=!!i,s=a?function(t){var e=i(t);return function(){o(e)}}:function(t){var n=e(t,16.66,!1);return function(){e.cancel(n)}};r.supported=a;var u,c=0,l=[];return r}]}function Ye(){function t(t){function e(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null,this.$$listeners={},this.$$listenerCount={},this.$id=c(),this.$$ChildScope=null}return e.prototype=t,e}var e=10,n=r("$rootScope"),a=null,s=null;this.digestTtl=function(t){return arguments.length&&(e=t),e},this.$get=["$injector","$exceptionHandler","$parse","$browser",function(r,u,l,f){function h(t){t.currentScope.$$destroyed=!0}function $(){this.$id=c(),this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null,this.$root=this,this.$$destroyed=!1,this.$$listeners={},this.$$listenerCount={},this.$$isolateBindings=null}function d(t){if(C.$$phase)throw n("inprog","{0} already in progress",C.$$phase);C.$$phase=t}function v(){C.$$phase=null}function g(t,e,n){do t.$$listenerCount[n]-=e,0===t.$$listenerCount[n]&&delete t.$$listenerCount[n];while(t=t.$parent)}function w(){}function b(){for(;k.length;)try{k.shift()()}catch(t){u(t)}s=null}function x(){null===s&&(s=f.defer(function(){C.$apply(b)}))}$.prototype={constructor:$,$new:function(e,n){var r;return n=n||this,e?(r=new $,r.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=t(this)),r=new this.$$ChildScope),r.$parent=n,r.$$prevSibling=n.$$childTail,n.$$childHead?(n.$$childTail.$$nextSibling=r,n.$$childTail=r):n.$$childHead=n.$$childTail=r,(e||n!=this)&&r.$on("$destroy",h),r},$watch:function(t,e,n){var r=l(t);if(r.$$watchDelegate)return r.$$watchDelegate(this,e,n,r);var i=this,o=i.$$watchers,s={fn:e,last:w,get:r,exp:t,eq:!!n};return a=null,S(e)||(s.fn=p),o||(o=i.$$watchers=[]),o.unshift(s),function(){R(o,s),a=null}},$watchGroup:function(t,e){function n(){u=!1,c?(c=!1,e(i,i,s)):e(i,r,s)}var r=new Array(t.length),i=new Array(t.length),a=[],s=this,u=!1,c=!0;if(!t.length){var l=!0;return s.$evalAsync(function(){l&&e(i,i,s)}),function(){l=!1}}return 1===t.length?this.$watch(t[0],function(t,n,o){i[0]=t,r[0]=n,e(i,t===n?i:r,o)}):(o(t,function(t,e){var o=s.$watch(t,function(t,o){i[e]=t,r[e]=o,u||(u=!0,s.$evalAsync(n))});a.push(o)}),function(){for(;a.length;)a.shift()()})},$watchCollection:function(t,e){function n(t){o=t;var e,n,r,s,u;if(!m(o)){if(y(o))if(i(o)){a!==$&&(a=$,v=a.length=0,f++),e=o.length,v!==e&&(f++,a.length=v=e);for(var c=0;e>c;c++)u=a[c],s=o[c],r=u!==u&&s!==s,r||u===s||(f++,a[c]=s)}else{a!==p&&(a=p={},v=0,f++),e=0;for(n in o)o.hasOwnProperty(n)&&(e++,s=o[n],u=a[n],n in a?(r=u!==u&&s!==s,r||u===s||(f++,a[n]=s)):(v++,a[n]=s,f++));if(v>e){f++;for(n in a)o.hasOwnProperty(n)||(v--,delete a[n])}}else a!==o&&(a=o,f++);return f;
|
7
|
-
}}function r(){if(d?(d=!1,e(o,o,u)):e(o,s,u),c)if(y(o))if(i(o)){s=new Array(o.length);for(var t=0;t<o.length;t++)s[t]=o[t]}else{s={};for(var n in o)Kn.call(o,n)&&(s[n]=o[n])}else s=o}n.$stateful=!0;var o,a,s,u=this,c=e.length>1,f=0,h=l(t,n),$=[],p={},d=!0,v=0;return this.$watch(h,r)},$digest:function(){var t,r,i,o,c,l,h,$,p,m,g=e,y=this,x=[];d("$digest"),f.$$checkUrlChange(),this===C&&null!==s&&(f.defer.cancel(s),b()),a=null;do{for(l=!1,$=y;A.length;){try{m=A.shift(),m.scope.$eval(m.expression,m.locals)}catch(k){u(k)}a=null}t:do{if(o=$.$$watchers)for(c=o.length;c--;)try{if(t=o[c])if((r=t.get($))===(i=t.last)||(t.eq?I(r,i):"number"==typeof r&&"number"==typeof i&&isNaN(r)&&isNaN(i))){if(t===a){l=!1;break t}}else l=!0,a=t,t.last=t.eq?P(r,null):r,t.fn(r,i===w?r:i,$),5>g&&(p=4-g,x[p]||(x[p]=[]),x[p].push({msg:S(t.exp)?"fn: "+(t.exp.name||t.exp.toString()):t.exp,newVal:r,oldVal:i}))}catch(k){u(k)}if(!(h=$.$$childHead||$!==y&&$.$$nextSibling))for(;$!==y&&!(h=$.$$nextSibling);)$=$.$parent}while($=h);if((l||A.length)&&!g--)throw v(),n("infdig","{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}",e,x)}while(l||A.length);for(v();E.length;)try{E.shift()()}catch(k){u(k)}},$destroy:function(){if(!this.$$destroyed){var t=this.$parent;if(this.$broadcast("$destroy"),this.$$destroyed=!0,this!==C){for(var e in this.$$listenerCount)g(this,this.$$listenerCount[e],e);t.$$childHead==this&&(t.$$childHead=this.$$nextSibling),t.$$childTail==this&&(t.$$childTail=this.$$prevSibling),this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling),this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling),this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=p,this.$on=this.$watch=this.$watchGroup=function(){return p},this.$$listeners={},this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=this.$root=this.$$watchers=null}}},$eval:function(t,e){return l(t)(this,e)},$evalAsync:function(t,e){C.$$phase||A.length||f.defer(function(){A.length&&C.$digest()}),A.push({scope:this,expression:t,locals:e})},$$postDigest:function(t){E.push(t)},$apply:function(t){try{return d("$apply"),this.$eval(t)}catch(e){u(e)}finally{v();try{C.$digest()}catch(e){throw u(e),e}}},$applyAsync:function(t){function e(){n.$eval(t)}var n=this;t&&k.push(e),x()},$on:function(t,e){var n=this.$$listeners[t];n||(this.$$listeners[t]=n=[]),n.push(e);var r=this;do r.$$listenerCount[t]||(r.$$listenerCount[t]=0),r.$$listenerCount[t]++;while(r=r.$parent);var i=this;return function(){var r=n.indexOf(e);-1!==r&&(n[r]=null,g(i,1,t))}},$emit:function(t,e){var n,r,i,o=[],a=this,s=!1,c={name:t,targetScope:a,stopPropagation:function(){s=!0},preventDefault:function(){c.defaultPrevented=!0},defaultPrevented:!1},l=q([c],arguments,1);do{for(n=a.$$listeners[t]||o,c.currentScope=a,r=0,i=n.length;i>r;r++)if(n[r])try{n[r].apply(null,l)}catch(f){u(f)}else n.splice(r,1),r--,i--;if(s)return c.currentScope=null,c;a=a.$parent}while(a);return c.currentScope=null,c},$broadcast:function(t,e){var n=this,r=n,i=n,o={name:t,targetScope:n,preventDefault:function(){o.defaultPrevented=!0},defaultPrevented:!1};if(!n.$$listenerCount[t])return o;for(var a,s,c,l=q([o],arguments,1);r=i;){for(o.currentScope=r,a=r.$$listeners[t]||[],s=0,c=a.length;c>s;s++)if(a[s])try{a[s].apply(null,l)}catch(f){u(f)}else a.splice(s,1),s--,c--;if(!(i=r.$$listenerCount[t]&&r.$$childHead||r!==n&&r.$$nextSibling))for(;r!==n&&!(i=r.$$nextSibling);)r=r.$parent}return o.currentScope=null,o}};var C=new $,A=C.$$asyncQueue=[],E=C.$$postDigestQueue=[],k=C.$$applyAsyncQueue=[];return C}]}function Je(){var t=/^\s*(https?|ftp|mailto|tel|file):/,e=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(e){return g(e)?(t=e,this):t},this.imgSrcSanitizationWhitelist=function(t){return g(t)?(e=t,this):e},this.$get=function(){return function(n,r){var i,o=r?e:t;return i=on(n).href,""===i||i.match(o)?n:"unsafe:"+i}}}function Ze(t){if("self"===t)return t;if(w(t)){if(t.indexOf("***")>-1)throw xi("iwcard","Illegal sequence *** in string matcher. String: {0}",t);return t=dr(t).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*"),new RegExp("^"+t+"$")}if(C(t))return new RegExp("^"+t.source+"$");throw xi("imatcher",'Matchers may only be "self", string patterns or RegExp objects')}function Ke(t){var e=[];return g(t)&&o(t,function(t){e.push(Ze(t))}),e}function Xe(){this.SCE_CONTEXTS=Si;var t=["self"],e=[];this.resourceUrlWhitelist=function(e){return arguments.length&&(t=Ke(e)),t},this.resourceUrlBlacklist=function(t){return arguments.length&&(e=Ke(t)),e},this.$get=["$injector",function(r){function i(t,e){return"self"===t?an(e):!!t.exec(e.href)}function o(n){var r,o,a=on(n.toString()),s=!1;for(r=0,o=t.length;o>r;r++)if(i(t[r],a)){s=!0;break}if(s)for(r=0,o=e.length;o>r;r++)if(i(e[r],a)){s=!1;break}return s}function a(t){var e=function(t){this.$$unwrapTrustedValue=function(){return t}};return t&&(e.prototype=new t),e.prototype.valueOf=function(){return this.$$unwrapTrustedValue()},e.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()},e}function s(t,e){var r=h.hasOwnProperty(t)?h[t]:null;if(!r)throw xi("icontext","Attempted to trust a value in invalid context. Context: {0}; Value: {1}",t,e);if(null===e||e===n||""===e)return e;if("string"!=typeof e)throw xi("itype","Attempted to trust a non-string value in a content requiring a string: Context: {0}",t);return new r(e)}function u(t){return t instanceof f?t.$$unwrapTrustedValue():t}function c(t,e){if(null===e||e===n||""===e)return e;var r=h.hasOwnProperty(t)?h[t]:null;if(r&&e instanceof r)return e.$$unwrapTrustedValue();if(t===Si.RESOURCE_URL){if(o(e))return e;throw xi("insecurl","Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}",e.toString())}if(t===Si.HTML)return l(e);throw xi("unsafe","Attempting to use an unsafe value in a safe context.")}var l=function(t){throw xi("unsafe","Attempting to use an unsafe value in a safe context.")};r.has("$sanitize")&&(l=r.get("$sanitize"));var f=a(),h={};return h[Si.HTML]=a(f),h[Si.CSS]=a(f),h[Si.URL]=a(f),h[Si.JS]=a(f),h[Si.RESOURCE_URL]=a(h[Si.URL]),{trustAs:s,getTrusted:c,valueOf:u}}]}function Qe(){var t=!0;this.enabled=function(e){return arguments.length&&(t=!!e),t},this.$get=["$parse","$sceDelegate",function(e,n){if(t&&8>er)throw xi("iequirks","Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks mode. You can fix this by adding the text <!doctype html> to the top of your HTML document. See http://docs.angularjs.org/api/ng.$sce for more information.");var r=_(Si);r.isEnabled=function(){return t},r.trustAs=n.trustAs,r.getTrusted=n.getTrusted,r.valueOf=n.valueOf,t||(r.trustAs=r.getTrusted=function(t,e){return e},r.valueOf=d),r.parseAs=function(t,n){var i=e(n);return i.literal&&i.constant?i:e(n,function(e){return r.getTrusted(t,e)})};var i=r.parseAs,a=r.getTrusted,s=r.trustAs;return o(Si,function(t,e){var n=Zn(e);r[dt("parse_as_"+n)]=function(e){return i(t,e)},r[dt("get_trusted_"+n)]=function(e){return a(t,e)},r[dt("trust_as_"+n)]=function(e){return s(t,e)}}),r}]}function tn(){this.$get=["$window","$document",function(t,e){var n,r,i={},o=h((/android (\d+)/.exec(Zn((t.navigator||{}).userAgent))||[])[1]),a=/Boxee/i.test((t.navigator||{}).userAgent),s=e[0]||{},u=/^(Moz|webkit|ms)(?=[A-Z])/,c=s.body&&s.body.style,l=!1,f=!1;if(c){for(var $ in c)if(r=u.exec($)){n=r[0],n=n.substr(0,1).toUpperCase()+n.substr(1);break}n||(n="WebkitOpacity"in c&&"webkit"),l=!!("transition"in c||n+"Transition"in c),f=!!("animation"in c||n+"Animation"in c),!o||l&&f||(l=w(s.body.style.webkitTransition),f=w(s.body.style.webkitAnimation))}return{history:!(!t.history||!t.history.pushState||4>o||a),hasEvent:function(t){if("input"===t&&11>=er)return!1;if(m(i[t])){var e=s.createElement("div");i[t]="on"+t in e}return i[t]},csp:vr(),vendorPrefix:n,transitions:l,animations:f,android:o}}]}function en(){this.$get=["$templateCache","$http","$q","$sce",function(t,e,n,r){function i(o,a){function s(t){if(!a)throw Kr("tpload","Failed to load template: {0}",o);return n.reject(t)}i.totalPendingRequests++,w(o)&&t.get(o)||(o=r.getTrustedResourceUrl(o));var u=e.defaults&&e.defaults.transformResponse;$r(u)?u=u.filter(function(t){return t!==ie}):u===ie&&(u=null);var c={cache:t,transformResponse:u};return e.get(o,c)["finally"](function(){i.totalPendingRequests--}).then(function(t){return t.data},s)}return i.totalPendingRequests=0,i}]}function nn(){this.$get=["$rootScope","$browser","$location",function(t,e,n){var r={};return r.findBindings=function(t,e,n){var r=t.getElementsByClassName("ng-binding"),i=[];return o(r,function(t){var r=lr.element(t).data("$binding");r&&o(r,function(r){if(n){var o=new RegExp("(^|\\s)"+dr(e)+"(\\s|\\||$)");o.test(r)&&i.push(t)}else-1!=r.indexOf(e)&&i.push(t)})}),i},r.findModels=function(t,e,n){for(var r=["ng-","data-ng-","ng\\:"],i=0;i<r.length;++i){var o=n?"=":"*=",a="["+r[i]+"model"+o+'"'+e+'"]',s=t.querySelectorAll(a);if(s.length)return s}},r.getLocation=function(){return n.url()},r.setLocation=function(e){e!==n.url()&&(n.url(e),t.$digest())},r.whenStable=function(t){e.notifyWhenNoOutstandingRequests(t)},r}]}function rn(){this.$get=["$rootScope","$browser","$q","$$q","$exceptionHandler",function(t,e,n,r,i){function o(o,s,u){var c,l=g(u)&&!u,f=(l?r:n).defer(),h=f.promise;return c=e.defer(function(){try{f.resolve(o())}catch(e){f.reject(e),i(e)}finally{delete a[h.$$timeoutId]}l||t.$apply()},s),h.$$timeoutId=c,a[c]=f,h}var a={};return o.cancel=function(t){return t&&t.$$timeoutId in a?(a[t.$$timeoutId].reject("canceled"),delete a[t.$$timeoutId],e.defer.cancel(t.$$timeoutId)):!1},o}]}function on(t){var e=t;return er&&(Ci.setAttribute("href",e),e=Ci.href),Ci.setAttribute("href",e),{href:Ci.href,protocol:Ci.protocol?Ci.protocol.replace(/:$/,""):"",host:Ci.host,search:Ci.search?Ci.search.replace(/^\?/,""):"",hash:Ci.hash?Ci.hash.replace(/^#/,""):"",hostname:Ci.hostname,port:Ci.port,pathname:"/"===Ci.pathname.charAt(0)?Ci.pathname:"/"+Ci.pathname}}function an(t){var e=w(t)?on(t):t;return e.protocol===Ai.protocol&&e.host===Ai.host}function sn(){this.$get=v(t)}function un(t){function e(r,i){if(y(r)){var a={};return o(r,function(t,n){a[n]=e(n,t)}),a}return t.factory(r+n,i)}var n="Filter";this.register=e,this.$get=["$injector",function(t){return function(e){return t.get(e+n)}}],e("currency",hn),e("date",An),e("filter",cn),e("json",En),e("limitTo",kn),e("lowercase",Mi),e("number",$n),e("orderBy",On),e("uppercase",Ni)}function cn(){return function(t,e,n){if(!$r(t))return t;var r,i,o=null!==e?typeof e:"null";switch(o){case"function":r=e;break;case"boolean":case"null":case"number":case"string":i=!0;case"object":r=ln(e,n,i);break;default:return t}return t.filter(r)}}function ln(t,e,n){var r,i=y(t)&&"$"in t;return e===!0?e=I:S(e)||(e=function(t,e){return m(t)?!1:null===t||null===e?t===e:y(t)||y(e)?!1:(t=Zn(""+t),e=Zn(""+e),-1!==t.indexOf(e))}),r=function(r){return i&&!y(r)?fn(r,t.$,e,!1):fn(r,t,e,n)}}function fn(t,e,n,r,i){var o=null!==t?typeof t:"null",a=null!==e?typeof e:"null";if("string"===a&&"!"===e.charAt(0))return!fn(t,e.substring(1),n,r);if($r(t))return t.some(function(t){return fn(t,e,n,r)});switch(o){case"object":var s;if(r){for(s in t)if("$"!==s.charAt(0)&&fn(t[s],e,n,!0))return!0;return i?!1:fn(t,e,n,!1)}if("object"===a){for(s in e){var u=e[s];if(!S(u)&&!m(u)){var c="$"===s,l=c?t:t[s];if(!fn(l,u,n,c,c))return!1}}return!0}return n(t,e);case"function":return!1;default:return n(t,e)}}function hn(t){var e=t.NUMBER_FORMATS;return function(t,n,r){return m(n)&&(n=e.CURRENCY_SYM),m(r)&&(r=e.PATTERNS[1].maxFrac),null==t?t:pn(t,e.PATTERNS[1],e.GROUP_SEP,e.DECIMAL_SEP,r).replace(/\u00A4/g,n)}}function $n(t){var e=t.NUMBER_FORMATS;return function(t,n){return null==t?t:pn(t,e.PATTERNS[0],e.GROUP_SEP,e.DECIMAL_SEP,n)}}function pn(t,e,n,r,i){if(!isFinite(t)||y(t))return"";var o=0>t;t=Math.abs(t);var a=t+"",s="",u=[],c=!1;if(-1!==a.indexOf("e")){var l=a.match(/([\d\.]+)e(-?)(\d+)/);l&&"-"==l[2]&&l[3]>i+1?t=0:(s=a,c=!0)}if(c)i>0&&1>t&&(s=t.toFixed(i),t=parseFloat(s));else{var f=(a.split(Ei)[1]||"").length;m(i)&&(i=Math.min(Math.max(e.minFrac,f),e.maxFrac)),t=+(Math.round(+(t.toString()+"e"+i)).toString()+"e"+-i);var h=(""+t).split(Ei),$=h[0];h=h[1]||"";var p,d=0,v=e.lgSize,g=e.gSize;if($.length>=v+g)for(d=$.length-v,p=0;d>p;p++)(d-p)%g===0&&0!==p&&(s+=n),s+=$.charAt(p);for(p=d;p<$.length;p++)($.length-p)%v===0&&0!==p&&(s+=n),s+=$.charAt(p);for(;h.length<i;)h+="0";i&&"0"!==i&&(s+=r+h.substr(0,i))}return 0===t&&(o=!1),u.push(o?e.negPre:e.posPre,s,o?e.negSuf:e.posSuf),u.join("")}function dn(t,e,n){var r="";for(0>t&&(r="-",t=-t),t=""+t;t.length<e;)t="0"+t;return n&&(t=t.substr(t.length-e)),r+t}function vn(t,e,n,r){return n=n||0,function(i){var o=i["get"+t]();return(n>0||o>-n)&&(o+=n),0===o&&-12==n&&(o=12),dn(o,e,r)}}function mn(t,e){return function(n,r){var i=n["get"+t](),o=Xn(e?"SHORT"+t:t);return r[o][i]}}function gn(t){var e=-1*t.getTimezoneOffset(),n=e>=0?"+":"";return n+=dn(Math[e>0?"floor":"ceil"](e/60),2)+dn(Math.abs(e%60),2)}function yn(t){var e=new Date(t,0,1).getDay();return new Date(t,0,(4>=e?5:12)-e)}function wn(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate()+(4-t.getDay()))}function bn(t){return function(e){var n=yn(e.getFullYear()),r=wn(e),i=+r-+n,o=1+Math.round(i/6048e5);return dn(o,t)}}function xn(t,e){return t.getHours()<12?e.AMPMS[0]:e.AMPMS[1]}function Sn(t,e){return t.getFullYear()<=0?e.ERAS[0]:e.ERAS[1]}function Cn(t,e){return t.getFullYear()<=0?e.ERANAMES[0]:e.ERANAMES[1]}function An(t){function e(t){var e;if(e=t.match(n)){var r=new Date(0),i=0,o=0,a=e[8]?r.setUTCFullYear:r.setFullYear,s=e[8]?r.setUTCHours:r.setHours;e[9]&&(i=h(e[9]+e[10]),o=h(e[9]+e[11])),a.call(r,h(e[1]),h(e[2])-1,h(e[3]));var u=h(e[4]||0)-i,c=h(e[5]||0)-o,l=h(e[6]||0),f=Math.round(1e3*parseFloat("0."+(e[7]||0)));return s.call(r,u,c,l,f),r}return t}var n=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(n,r,i){var a,s,u="",c=[];if(r=r||"mediumDate",r=t.DATETIME_FORMATS[r]||r,w(n)&&(n=Ti.test(n)?h(n):e(n)),b(n)&&(n=new Date(n)),!x(n))return n;for(;r;)s=Oi.exec(r),s?(c=q(c,s,1),r=c.pop()):(c.push(r),r=null);return i&&"UTC"===i&&(n=new Date(n.getTime()),n.setMinutes(n.getMinutes()+n.getTimezoneOffset())),o(c,function(e){a=ki[e],u+=a?a(n,t.DATETIME_FORMATS):e.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),u}}function En(){return function(t,e){return m(e)&&(e=2),L(t,e)}}function kn(){return function(t,e){return b(t)&&(t=t.toString()),$r(t)||w(t)?(e=Math.abs(Number(e))===1/0?Number(e):h(e),e?e>0?t.slice(0,e):t.slice(e):w(t)?"":[]):t}}function On(t){return function(e,n,r){function o(t,e){for(var r=0;r<n.length;r++){var i=n[r](t,e);if(0!==i)return i}return 0}function a(t,e){return e?function(e,n){return t(n,e)}:t}function s(t){switch(typeof t){case"number":case"boolean":case"string":return!0;default:return!1}}function u(t){return null===t?"null":"function"==typeof t.valueOf&&(t=t.valueOf(),s(t))?t:"function"==typeof t.toString&&(t=t.toString(),s(t))?t:""}function c(t,e){var n=typeof t,r=typeof e;return n===r&&"object"===n&&(t=u(t),e=u(e)),n===r?("string"===n&&(t=t.toLowerCase(),e=e.toLowerCase()),t===e?0:e>t?-1:1):r>n?-1:1}return i(e)?(n=$r(n)?n:[n],0===n.length&&(n=["+"]),n=n.map(function(e){var n=!1,r=e||d;if(w(e)){if(("+"==e.charAt(0)||"-"==e.charAt(0))&&(n="-"==e.charAt(0),e=e.substring(1)),""===e)return a(c,n);if(r=t(e),r.constant){var i=r();return a(function(t,e){return c(t[i],e[i])},n)}}return a(function(t,e){return c(r(t),r(e))},n)}),or.call(e).sort(a(o,r))):e}}function Tn(t){return S(t)&&(t={link:t}),t.restrict=t.restrict||"AC",v(t)}function Mn(t,e){t.$name=e}function Nn(t,e,r,i,a){var s=this,u=[],c=s.$$parentForm=t.parent().controller("form")||ji;s.$error={},s.$$success={},s.$pending=n,s.$name=a(e.name||e.ngForm||"")(r),s.$dirty=!1,s.$pristine=!0,s.$valid=!0,s.$invalid=!1,s.$submitted=!1,c.$addControl(s),s.$rollbackViewValue=function(){o(u,function(t){t.$rollbackViewValue()})},s.$commitViewValue=function(){o(u,function(t){t.$commitViewValue()})},s.$addControl=function(t){at(t.$name,"input"),u.push(t),t.$name&&(s[t.$name]=t)},s.$$renameControl=function(t,e){var n=t.$name;s[n]===t&&delete s[n],s[e]=t,t.$name=e},s.$removeControl=function(t){t.$name&&s[t.$name]===t&&delete s[t.$name],o(s.$pending,function(e,n){s.$setValidity(n,null,t)}),o(s.$error,function(e,n){s.$setValidity(n,null,t)}),o(s.$$success,function(e,n){s.$setValidity(n,null,t)}),R(u,t)},Gn({ctrl:this,$element:t,set:function(t,e,n){var r=t[e];if(r){var i=r.indexOf(n);-1===i&&r.push(n)}else t[e]=[n]},unset:function(t,e,n){var r=t[e];r&&(R(r,n),0===r.length&&delete t[e])},parentForm:c,$animate:i}),s.$setDirty=function(){i.removeClass(t,mo),i.addClass(t,go),s.$dirty=!0,s.$pristine=!1,c.$setDirty()},s.$setPristine=function(){i.setClass(t,mo,go+" "+Ri),s.$dirty=!1,s.$pristine=!0,s.$submitted=!1,o(u,function(t){t.$setPristine()})},s.$setUntouched=function(){o(u,function(t){t.$setUntouched()})},s.$setSubmitted=function(){i.addClass(t,Ri),s.$submitted=!0,c.$setSubmitted()}}function Vn(t){t.$formatters.push(function(e){return t.$isEmpty(e)?e:e.toString()})}function Dn(t,e,n,r,i,o){jn(t,e,n,r,i,o),Vn(r)}function jn(t,e,n,r,i,o){var a=Zn(e[0].type);if(!i.android){var s=!1;e.on("compositionstart",function(t){s=!0}),e.on("compositionend",function(){s=!1,u()})}var u=function(t){if(c&&(o.defer.cancel(c),c=null),!s){var i=e.val(),u=t&&t.type;"password"===a||n.ngTrim&&"false"===n.ngTrim||(i=pr(i)),(r.$viewValue!==i||""===i&&r.$$hasNativeValidators)&&r.$setViewValue(i,u)}};if(i.hasEvent("input"))e.on("input",u);else{var c,l=function(t,e,n){c||(c=o.defer(function(){c=null,e&&e.value===n||u(t)}))};e.on("keydown",function(t){var e=t.keyCode;91===e||e>15&&19>e||e>=37&&40>=e||l(t,this,this.value)}),i.hasEvent("paste")&&e.on("paste cut",l)}e.on("change",u),r.$render=function(){e.val(r.$isEmpty(r.$viewValue)?"":r.$viewValue)}}function Rn(t,e){if(x(t))return t;if(w(t)){zi.lastIndex=0;var n=zi.exec(t);if(n){var r=+n[1],i=+n[2],o=0,a=0,s=0,u=0,c=yn(r),l=7*(i-1);return e&&(o=e.getHours(),a=e.getMinutes(),s=e.getSeconds(),u=e.getMilliseconds()),new Date(r,0,c.getDate()+l,o,a,s,u)}}return NaN}function Pn(t,e){return function(n,r){var i,a;if(x(n))return n;if(w(n)){if('"'==n.charAt(0)&&'"'==n.charAt(n.length-1)&&(n=n.substring(1,n.length-1)),qi.test(n))return new Date(n);if(t.lastIndex=0,i=t.exec(n))return i.shift(),a=r?{yyyy:r.getFullYear(),MM:r.getMonth()+1,dd:r.getDate(),HH:r.getHours(),mm:r.getMinutes(),ss:r.getSeconds(),sss:r.getMilliseconds()/1e3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},o(i,function(t,n){n<e.length&&(a[e[n]]=+t)}),new Date(a.yyyy,a.MM-1,a.dd,a.HH,a.mm,a.ss||0,1e3*a.sss||0)}return NaN}}function _n(t,e,r,i){return function(o,a,s,u,c,l,f){function h(t){return t&&!(t.getTime&&t.getTime()!==t.getTime())}function $(t){return g(t)?x(t)?t:r(t):n}In(o,a,s,u),jn(o,a,s,u,c,l);var p,d=u&&u.$options&&u.$options.timezone;if(u.$$parserName=t,u.$parsers.push(function(t){if(u.$isEmpty(t))return null;if(e.test(t)){var i=r(t,p);return"UTC"===d&&i.setMinutes(i.getMinutes()-i.getTimezoneOffset()),i}return n}),u.$formatters.push(function(t){if(t&&!x(t))throw xo("datefmt","Expected `{0}` to be a date",t);if(h(t)){if(p=t,p&&"UTC"===d){var e=6e4*p.getTimezoneOffset();p=new Date(p.getTime()+e)}return f("date")(t,i,d)}return p=null,""}),g(s.min)||s.ngMin){var v;u.$validators.min=function(t){return!h(t)||m(v)||r(t)>=v},s.$observe("min",function(t){v=$(t),u.$validate()})}if(g(s.max)||s.ngMax){var y;u.$validators.max=function(t){return!h(t)||m(y)||r(t)<=y},s.$observe("max",function(t){y=$(t),u.$validate()})}}}function In(t,e,r,i){var o=e[0],a=i.$$hasNativeValidators=y(o.validity);a&&i.$parsers.push(function(t){var r=e.prop(Jn)||{};return r.badInput&&!r.typeMismatch?n:t})}function qn(t,e,r,i,o,a){if(In(t,e,r,i),jn(t,e,r,i,o,a),i.$$parserName="number",i.$parsers.push(function(t){return i.$isEmpty(t)?null:Hi.test(t)?parseFloat(t):n}),i.$formatters.push(function(t){if(!i.$isEmpty(t)){if(!b(t))throw xo("numfmt","Expected `{0}` to be a number",t);t=t.toString()}return t}),g(r.min)||r.ngMin){var s;i.$validators.min=function(t){return i.$isEmpty(t)||m(s)||t>=s},r.$observe("min",function(t){g(t)&&!b(t)&&(t=parseFloat(t,10)),s=b(t)&&!isNaN(t)?t:n,i.$validate()})}if(g(r.max)||r.ngMax){var u;i.$validators.max=function(t){return i.$isEmpty(t)||m(u)||u>=t},r.$observe("max",function(t){g(t)&&!b(t)&&(t=parseFloat(t,10)),u=b(t)&&!isNaN(t)?t:n,i.$validate()})}}function Un(t,e,n,r,i,o){jn(t,e,n,r,i,o),Vn(r),r.$$parserName="url",r.$validators.url=function(t,e){var n=t||e;return r.$isEmpty(n)||Ui.test(n)}}function Fn(t,e,n,r,i,o){jn(t,e,n,r,i,o),Vn(r),r.$$parserName="email",r.$validators.email=function(t,e){var n=t||e;return r.$isEmpty(n)||Fi.test(n)}}function Hn(t,e,n,r){m(n.name)&&e.attr("name",c());var i=function(t){e[0].checked&&r.$setViewValue(n.value,t&&t.type)};e.on("click",i),r.$render=function(){var t=n.value;e[0].checked=t==r.$viewValue},n.$observe("value",r.$render)}function Ln(t,e,n,r,i){var o;if(g(r)){if(o=t(r),!o.constant)throw xo("constexpr","Expected constant expression for `{0}`, but saw `{1}`.",n,r);return o(e)}return i}function Bn(t,e,n,r,i,o,a,s){var u=Ln(s,t,"ngTrueValue",n.ngTrueValue,!0),c=Ln(s,t,"ngFalseValue",n.ngFalseValue,!1),l=function(t){r.$setViewValue(e[0].checked,t&&t.type)};e.on("click",l),r.$render=function(){e[0].checked=r.$viewValue},r.$isEmpty=function(t){return t===!1},r.$formatters.push(function(t){return I(t,u)}),r.$parsers.push(function(t){return t?u:c})}function zn(t,e){return t="ngClass"+t,["$animate",function(n){function r(t,e){var n=[];t:for(var r=0;r<t.length;r++){for(var i=t[r],o=0;o<e.length;o++)if(i==e[o])continue t;n.push(i)}return n}function i(t){if($r(t))return t;if(w(t))return t.split(" ");if(y(t)){var e=[];return o(t,function(t,n){t&&(e=e.concat(n.split(" ")))}),e}return t}return{restrict:"AC",link:function(a,s,u){function c(t){var e=f(t,1);u.$addClass(e)}function l(t){var e=f(t,-1);u.$removeClass(e)}function f(t,e){var n=s.data("$classCounts")||{},r=[];return o(t,function(t){(e>0||n[t])&&(n[t]=(n[t]||0)+e,n[t]===+(e>0)&&r.push(t))}),s.data("$classCounts",n),r.join(" ")}function h(t,e){var i=r(e,t),o=r(t,e);i=f(i,1),o=f(o,-1),i&&i.length&&n.addClass(s,i),o&&o.length&&n.removeClass(s,o)}function $(t){if(e===!0||a.$index%2===e){var n=i(t||[]);if(p){if(!I(t,p)){var r=i(p);h(r,n)}}else c(n)}p=_(t)}var p;a.$watch(u[t],$,!0),u.$observe("class",function(e){$(a.$eval(u[t]))}),"ngClass"!==t&&a.$watch("$index",function(n,r){var o=1&n;if(o!==(1&r)){var s=i(a.$eval(u[t]));o===e?c(s):l(s)}})}}}]}function Gn(t){function e(t,e,u){e===n?r("$pending",t,u):i("$pending",t,u),M(e)?e?(f(s.$error,t,u),l(s.$$success,t,u)):(l(s.$error,t,u),f(s.$$success,t,u)):(f(s.$error,t,u),f(s.$$success,t,u)),s.$pending?(o(bo,!0),s.$valid=s.$invalid=n,a("",null)):(o(bo,!1),s.$valid=Wn(s.$error),s.$invalid=!s.$valid,a("",s.$valid));var c;c=s.$pending&&s.$pending[t]?n:s.$error[t]?!1:s.$$success[t]?!0:null,a(t,c),h.$setValidity(t,c,s)}function r(t,e,n){s[t]||(s[t]={}),l(s[t],e,n)}function i(t,e,r){s[t]&&f(s[t],e,r),Wn(s[t])&&(s[t]=n)}function o(t,e){e&&!c[t]?($.addClass(u,t),c[t]=!0):!e&&c[t]&&($.removeClass(u,t),c[t]=!1)}function a(t,e){t=t?"-"+nt(t,"-"):"",o(po+t,e===!0),o(vo+t,e===!1)}var s=t.ctrl,u=t.$element,c={},l=t.set,f=t.unset,h=t.parentForm,$=t.$animate;c[vo]=!(c[po]=u.hasClass(po)),s.$setValidity=e}function Wn(t){if(t)for(var e in t)return!1;return!0}var Yn=/^\/(.+)\/([a-z]*)$/,Jn="validity",Zn=function(t){return w(t)?t.toLowerCase():t},Kn=Object.prototype.hasOwnProperty,Xn=function(t){return w(t)?t.toUpperCase():t},Qn=function(t){return w(t)?t.replace(/[A-Z]/g,function(t){return String.fromCharCode(32|t.charCodeAt(0))}):t},tr=function(t){return w(t)?t.replace(/[a-z]/g,function(t){return String.fromCharCode(-33&t.charCodeAt(0))}):t};"i"!=="I".toLowerCase()&&(Zn=Qn,Xn=tr);var er,nr,rr,ir,or=[].slice,ar=[].splice,sr=[].push,ur=Object.prototype.toString,cr=r("ng"),lr=t.angular||(t.angular={}),fr=0;er=e.documentMode,p.$inject=[],d.$inject=[];var hr,$r=Array.isArray,pr=function(t){return w(t)?t.trim():t},dr=function(t){return t.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},vr=function(){if(g(vr.isActive_))return vr.isActive_;var t=!(!e.querySelector("[ng-csp]")&&!e.querySelector("[data-ng-csp]"));if(!t)try{new Function("")}catch(n){t=!0}return vr.isActive_=t},mr=["ng-","data-ng-","ng:","x-ng-"],gr=/[A-Z]/g,yr=!1,wr=1,br=2,xr=3,Sr=8,Cr=9,Ar=11,Er={full:"1.3.20",major:1,minor:3,dot:20,codeName:"shallow-translucence"};wt.expando="ng339";var kr=wt.cache={},Or=1,Tr=function(t,e,n){t.addEventListener(e,n,!1)},Mr=function(t,e,n){t.removeEventListener(e,n,!1)};wt._data=function(t){return this.cache[t[this.expando]]||{}};var Nr=/([\:\-\_]+(.))/g,Vr=/^moz([A-Z])/,Dr={mouseleave:"mouseout",mouseenter:"mouseover"},jr=r("jqLite"),Rr=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,Pr=/<|&#?\w+;/,_r=/<([\w:]+)/,Ir=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,qr={option:[1,'<select multiple="multiple">',"</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};qr.optgroup=qr.option,qr.tbody=qr.tfoot=qr.colgroup=qr.caption=qr.thead,qr.th=qr.td;var Ur=wt.prototype={ready:function(n){function r(){i||(i=!0,n())}var i=!1;"complete"===e.readyState?setTimeout(r):(this.on("DOMContentLoaded",r),wt(t).on("load",r))},toString:function(){var t=[];return o(this,function(e){t.push(""+e)}),"["+t.join(", ")+"]"},eq:function(t){return nr(t>=0?this[t]:this[this.length+t])},length:0,push:sr,sort:[].sort,splice:[].splice},Fr={};o("multiple,selected,checked,disabled,readOnly,required,open".split(","),function(t){Fr[Zn(t)]=t});var Hr={};o("input,select,option,textarea,button,form,details".split(","),function(t){Hr[t]=!0});var Lr={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};o({data:Et,removeData:Ct},function(t,e){wt[e]=t}),o({data:Et,inheritedData:Vt,scope:function(t){return nr.data(t,"$scope")||Vt(t.parentNode||t,["$isolateScope","$scope"])},isolateScope:function(t){return nr.data(t,"$isolateScope")||nr.data(t,"$isolateScopeNoTemplate")},controller:Nt,injector:function(t){return Vt(t,"$injector")},removeAttr:function(t,e){t.removeAttribute(e)},hasClass:kt,css:function(t,e,n){return e=dt(e),g(n)?void(t.style[e]=n):t.style[e]},attr:function(t,e,r){var i=t.nodeType;if(i!==xr&&i!==br&&i!==Sr){var o=Zn(e);if(Fr[o]){if(!g(r))return t[e]||(t.attributes.getNamedItem(e)||p).specified?o:n;r?(t[e]=!0,t.setAttribute(e,o)):(t[e]=!1,t.removeAttribute(o))}else if(g(r))t.setAttribute(e,r);else if(t.getAttribute){var a=t.getAttribute(e,2);return null===a?n:a}}},prop:function(t,e,n){return g(n)?void(t[e]=n):t[e]},text:function(){function t(t,e){if(m(e)){var n=t.nodeType;return n===wr||n===xr?t.textContent:""}t.textContent=e}return t.$dv="",t}(),val:function(t,e){if(m(e)){if(t.multiple&&"select"===j(t)){var n=[];return o(t.options,function(t){t.selected&&n.push(t.value||t.text)}),0===n.length?null:n}return t.value}t.value=e},html:function(t,e){return m(e)?t.innerHTML:(xt(t,!0),void(t.innerHTML=e))},empty:Dt},function(t,e){wt.prototype[e]=function(e,r){var i,o,a=this.length;if(t!==Dt&&(2==t.length&&t!==kt&&t!==Nt?e:r)===n){if(y(e)){for(i=0;a>i;i++)if(t===Et)t(this[i],e);else for(o in e)t(this[i],o,e[o]);return this}for(var s=t.$dv,u=s===n?Math.min(a,1):a,c=0;u>c;c++){var l=t(this[c],e,r);s=s?s+l:l}return s}for(i=0;a>i;i++)t(this[i],e,r);return this}}),o({removeData:Ct,on:function Jo(t,e,n,r){if(g(r))throw jr("onargs","jqLite#on() does not support the `selector` or `eventData` parameters");if(mt(t)){var i=At(t,!0),o=i.events,a=i.handle;a||(a=i.handle=It(t,o));for(var s=e.indexOf(" ")>=0?e.split(" "):[e],u=s.length;u--;){e=s[u];var c=o[e];c||(o[e]=[],"mouseenter"===e||"mouseleave"===e?Jo(t,Dr[e],function(t){var n=this,r=t.relatedTarget;(!r||r!==n&&!n.contains(r))&&a(t,e)}):"$destroy"!==e&&Tr(t,e,a),c=o[e]),c.push(n)}}},off:St,one:function(t,e,n){t=nr(t),t.on(e,function r(){t.off(e,n),t.off(e,r)}),t.on(e,n)},replaceWith:function(t,e){var n,r=t.parentNode;xt(t),o(new wt(e),function(e){n?r.insertBefore(e,n.nextSibling):r.replaceChild(e,t),n=e})},children:function(t){var e=[];return o(t.childNodes,function(t){t.nodeType===wr&&e.push(t)}),e},contents:function(t){return t.contentDocument||t.childNodes||[]},append:function(t,e){var n=t.nodeType;if(n===wr||n===Ar){e=new wt(e);for(var r=0,i=e.length;i>r;r++){var o=e[r];t.appendChild(o)}}},prepend:function(t,e){if(t.nodeType===wr){var n=t.firstChild;o(new wt(e),function(e){t.insertBefore(e,n)})}},wrap:function(t,e){e=nr(e).eq(0).clone()[0];var n=t.parentNode;n&&n.replaceChild(e,t),e.appendChild(t)},remove:jt,detach:function(t){jt(t,!0)},after:function(t,e){var n=t,r=t.parentNode;e=new wt(e);for(var i=0,o=e.length;o>i;i++){var a=e[i];r.insertBefore(a,n.nextSibling),n=a}},addClass:Tt,removeClass:Ot,toggleClass:function(t,e,n){e&&o(e.split(" "),function(e){var r=n;m(r)&&(r=!kt(t,e)),(r?Tt:Ot)(t,e)})},parent:function(t){var e=t.parentNode;return e&&e.nodeType!==Ar?e:null},next:function(t){return t.nextElementSibling},find:function(t,e){return t.getElementsByTagName?t.getElementsByTagName(e):[]},clone:bt,triggerHandler:function(t,e,n){var r,i,a,s=e.type||e,u=At(t),c=u&&u.events,l=c&&c[s];l&&(r={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return this.defaultPrevented===!0},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return this.immediatePropagationStopped===!0},stopPropagation:p,type:s,target:t},e.type&&(r=f(r,e)),i=_(l),a=n?[r].concat(n):[r],o(i,function(e){r.isImmediatePropagationStopped()||e.apply(t,a)}))}},function(t,e){wt.prototype[e]=function(e,n,r){for(var i,o=0,a=this.length;a>o;o++)m(i)?(i=t(this[o],e,n,r),g(i)&&(i=nr(i))):Mt(i,t(this[o],e,n,r));return g(i)?i:this},wt.prototype.bind=wt.prototype.on,wt.prototype.unbind=wt.prototype.off}),Ft.prototype={put:function(t,e){this[Ut(t,this.nextUid)]=e},get:function(t){return this[Ut(t,this.nextUid)]},remove:function(t){var e=this[t=Ut(t,this.nextUid)];return delete this[t],e}};var Br=/^function\s*[^\(]*\(\s*([^\)]*)\)/m,zr=/,/,Gr=/^\s*(_?)(\S+?)\1\s*$/,Wr=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,Yr=r("$injector");Bt.$$annotate=Lt;var Jr=r("$animate"),Zr=["$provide",function(t){this.$$selectors={},this.register=function(e,n){var r=e+"-animation";if(e&&"."!=e.charAt(0))throw Jr("notcsel","Expecting class selector starting with '.' got '{0}'.",e);this.$$selectors[e.substr(1)]=r,t.factory(r,n)},this.classNameFilter=function(t){return 1===arguments.length&&(this.$$classNameFilter=t instanceof RegExp?t:null),this.$$classNameFilter},this.$get=["$$q","$$asyncCallback","$rootScope",function(t,e,n){function r(e){var r,i=t.defer();return i.promise.$$cancelFn=function(){r&&r()},n.$$postDigest(function(){r=e(function(){i.resolve()})}),i.promise}function i(t,e){var n=[],r=[],i=ct();return o((t.attr("class")||"").split(/\s+/),function(t){i[t]=!0}),o(e,function(t,e){var o=i[e];t===!1&&o?r.push(e):t!==!0||o||n.push(e)}),n.length+r.length>0&&[n.length?n:null,r.length?r:null]}function a(t,e,n){for(var r=0,i=e.length;i>r;++r){var o=e[r];t[o]=n}}function s(){return c||(c=t.defer(),e(function(){c.resolve(),c=null})),c.promise}function u(t,e){if(lr.isObject(e)){var n=f(e.from||{},e.to||{});t.css(n)}}var c;return{animate:function(t,e,n){return u(t,{from:e,to:n}),s()},enter:function(t,e,n,r){return u(t,r),n?n.after(t):e.prepend(t),s()},leave:function(t,e){return u(t,e),t.remove(),s()},move:function(t,e,n,r){return this.enter(t,e,n,r)},addClass:function(t,e,n){return this.setClass(t,e,[],n)},$$addClassImmediately:function(t,e,n){return t=nr(t),e=w(e)?e:$r(e)?e.join(" "):"",o(t,function(t){Tt(t,e)}),u(t,n),s()},removeClass:function(t,e,n){return this.setClass(t,[],e,n);
|
8
|
-
},$$removeClassImmediately:function(t,e,n){return t=nr(t),e=w(e)?e:$r(e)?e.join(" "):"",o(t,function(t){Ot(t,e)}),u(t,n),s()},setClass:function(t,e,n,o){var s=this,u="$$animateClasses",c=!1;t=nr(t);var l=t.data(u);l?o&&l.options&&(l.options=lr.extend(l.options||{},o)):(l={classes:{},options:o},c=!0);var f=l.classes;return e=$r(e)?e:e.split(" "),n=$r(n)?n:n.split(" "),a(f,e,!0),a(f,n,!1),c&&(l.promise=r(function(e){var n=t.data(u);if(t.removeData(u),n){var r=i(t,n.classes);r&&s.$$setClassImmediately(t,r[0],r[1],n.options)}e()}),t.data(u,l)),l.promise},$$setClassImmediately:function(t,e,n,r){return e&&this.$$addClassImmediately(t,e),n&&this.$$removeClassImmediately(t,n),u(t,r),s()},enabled:p,cancel:p}}]}],Kr=r("$compile");Kt.$inject=["$provide","$$sanitizeUriProvider"];var Xr=/^((?:x|data)[\:\-_])/i,Qr=r("$controller"),ti="application/json",ei={"Content-Type":ti+";charset=utf-8"},ni=/^\[|^\{(?!\{)/,ri={"[":/]$/,"{":/}$/},ii=/^\)\]\}',?\n/,oi=r("$interpolate"),ai=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,si={http:80,https:443,ftp:21},ui=r("$location"),ci={$$html5:!1,$$replace:!1,absUrl:Oe("$$absUrl"),url:function(t){if(m(t))return this.$$url;var e=ai.exec(t);return(e[1]||""===t)&&this.path(decodeURIComponent(e[1])),(e[2]||e[1]||""===t)&&this.search(e[3]||""),this.hash(e[5]||""),this},protocol:Oe("$$protocol"),host:Oe("$$host"),port:Oe("$$port"),path:Te("$$path",function(t){return t=null!==t?t.toString():"","/"==t.charAt(0)?t:"/"+t}),search:function(t,e){switch(arguments.length){case 0:return this.$$search;case 1:if(w(t)||b(t))t=t.toString(),this.$$search=W(t);else{if(!y(t))throw ui("isrcharg","The first argument of the `$location#search()` call must be a string or an object.");t=P(t,{}),o(t,function(e,n){null==e&&delete t[n]}),this.$$search=t}break;default:m(e)||null===e?delete this.$$search[t]:this.$$search[t]=e}return this.$$compose(),this},hash:Te("$$hash",function(t){return null!==t?t.toString():""}),replace:function(){return this.$$replace=!0,this}};o([ke,Ee,Ae],function(t){t.prototype=Object.create(ci),t.prototype.state=function(e){if(!arguments.length)return this.$$state;if(t!==Ae||!this.$$html5)throw ui("nostate","History API state support is available only in HTML5 mode and only in browsers supporting HTML5 History API");return this.$$state=m(e)?null:e,this}});var li=r("$parse"),fi=Function.prototype.call,hi=Function.prototype.apply,$i=Function.prototype.bind,pi=ct();o({"null":function(){return null},"true":function(){return!0},"false":function(){return!1},undefined:function(){}},function(t,e){t.constant=t.literal=t.sharedGetter=!0,pi[e]=t}),pi["this"]=function(t){return t},pi["this"].sharedGetter=!0;var di=f(ct(),{"+":function(t,e,r,i){return r=r(t,e),i=i(t,e),g(r)?g(i)?r+i:r:g(i)?i:n},"-":function(t,e,n,r){return n=n(t,e),r=r(t,e),(g(n)?n:0)-(g(r)?r:0)},"*":function(t,e,n,r){return n(t,e)*r(t,e)},"/":function(t,e,n,r){return n(t,e)/r(t,e)},"%":function(t,e,n,r){return n(t,e)%r(t,e)},"===":function(t,e,n,r){return n(t,e)===r(t,e)},"!==":function(t,e,n,r){return n(t,e)!==r(t,e)},"==":function(t,e,n,r){return n(t,e)==r(t,e)},"!=":function(t,e,n,r){return n(t,e)!=r(t,e)},"<":function(t,e,n,r){return n(t,e)<r(t,e)},">":function(t,e,n,r){return n(t,e)>r(t,e)},"<=":function(t,e,n,r){return n(t,e)<=r(t,e)},">=":function(t,e,n,r){return n(t,e)>=r(t,e)},"&&":function(t,e,n,r){return n(t,e)&&r(t,e)},"||":function(t,e,n,r){return n(t,e)||r(t,e)},"!":function(t,e,n){return!n(t,e)},"=":!0,"|":!0}),vi={n:"\n",f:"\f",r:"\r",t:" ",v:"","'":"'",'"':'"'},mi=function(t){this.options=t};mi.prototype={constructor:mi,lex:function(t){for(this.text=t,this.index=0,this.tokens=[];this.index<this.text.length;){var e=this.text.charAt(this.index);if('"'===e||"'"===e)this.readString(e);else if(this.isNumber(e)||"."===e&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdent(e))this.readIdent();else if(this.is(e,"(){}[].,;:?"))this.tokens.push({index:this.index,text:e}),this.index++;else if(this.isWhitespace(e))this.index++;else{var n=e+this.peek(),r=n+this.peek(2),i=di[e],o=di[n],a=di[r];if(i||o||a){var s=a?r:o?n:e;this.tokens.push({index:this.index,text:s,operator:!0}),this.index+=s.length}else this.throwError("Unexpected next character ",this.index,this.index+1)}}return this.tokens},is:function(t,e){return-1!==e.indexOf(t)},peek:function(t){var e=t||1;return this.index+e<this.text.length?this.text.charAt(this.index+e):!1},isNumber:function(t){return t>="0"&&"9">=t&&"string"==typeof t},isWhitespace:function(t){return" "===t||"\r"===t||" "===t||"\n"===t||""===t||" "===t},isIdent:function(t){return t>="a"&&"z">=t||t>="A"&&"Z">=t||"_"===t||"$"===t},isExpOperator:function(t){return"-"===t||"+"===t||this.isNumber(t)},throwError:function(t,e,n){n=n||this.index;var r=g(e)?"s "+e+"-"+this.index+" ["+this.text.substring(e,n)+"]":" "+n;throw li("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",t,r,this.text)},readNumber:function(){for(var t="",e=this.index;this.index<this.text.length;){var n=Zn(this.text.charAt(this.index));if("."==n||this.isNumber(n))t+=n;else{var r=this.peek();if("e"==n&&this.isExpOperator(r))t+=n;else if(this.isExpOperator(n)&&r&&this.isNumber(r)&&"e"==t.charAt(t.length-1))t+=n;else{if(!this.isExpOperator(n)||r&&this.isNumber(r)||"e"!=t.charAt(t.length-1))break;this.throwError("Invalid exponent")}}this.index++}this.tokens.push({index:e,text:t,constant:!0,value:Number(t)})},readIdent:function(){for(var t=this.index;this.index<this.text.length;){var e=this.text.charAt(this.index);if(!this.isIdent(e)&&!this.isNumber(e))break;this.index++}this.tokens.push({index:t,text:this.text.slice(t,this.index),identifier:!0})},readString:function(t){var e=this.index;this.index++;for(var n="",r=t,i=!1;this.index<this.text.length;){var o=this.text.charAt(this.index);if(r+=o,i){if("u"===o){var a=this.text.substring(this.index+1,this.index+5);a.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+a+"]"),this.index+=4,n+=String.fromCharCode(parseInt(a,16))}else{var s=vi[o];n+=s||o}i=!1}else if("\\"===o)i=!0;else{if(o===t)return this.index++,void this.tokens.push({index:e,text:r,constant:!0,value:n});n+=o}this.index++}this.throwError("Unterminated quote",e)}};var gi=function(t,e,n){this.lexer=t,this.$filter=e,this.options=n};gi.ZERO=f(function(){return 0},{sharedGetter:!0,constant:!0}),gi.prototype={constructor:gi,parse:function(t){this.text=t,this.tokens=this.lexer.lex(t);var e=this.statements();return 0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]),e.literal=!!e.literal,e.constant=!!e.constant,e},primary:function(){var t;this.expect("(")?(t=this.filterChain(),this.consume(")")):this.expect("[")?t=this.arrayDeclaration():this.expect("{")?t=this.object():this.peek().identifier&&this.peek().text in pi?t=pi[this.consume().text]:this.peek().identifier?t=this.identifier():this.peek().constant?t=this.constant():this.throwError("not a primary expression",this.peek());for(var e,n;e=this.expect("(","[",".");)"("===e.text?(t=this.functionCall(t,n),n=null):"["===e.text?(n=t,t=this.objectIndex(t)):"."===e.text?(n=t,t=this.fieldAccess(t)):this.throwError("IMPOSSIBLE");return t},throwError:function(t,e){throw li("syntax","Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].",e.text,t,e.index+1,this.text,this.text.substring(e.index))},peekToken:function(){if(0===this.tokens.length)throw li("ueoe","Unexpected end of expression: {0}",this.text);return this.tokens[0]},peek:function(t,e,n,r){return this.peekAhead(0,t,e,n,r)},peekAhead:function(t,e,n,r,i){if(this.tokens.length>t){var o=this.tokens[t],a=o.text;if(a===e||a===n||a===r||a===i||!e&&!n&&!r&&!i)return o}return!1},expect:function(t,e,n,r){var i=this.peek(t,e,n,r);return i?(this.tokens.shift(),i):!1},consume:function(t){if(0===this.tokens.length)throw li("ueoe","Unexpected end of expression: {0}",this.text);var e=this.expect(t);return e||this.throwError("is unexpected, expecting ["+t+"]",this.peek()),e},unaryFn:function(t,e){var n=di[t];return f(function(t,r){return n(t,r,e)},{constant:e.constant,inputs:[e]})},binaryFn:function(t,e,n,r){var i=di[e];return f(function(e,r){return i(e,r,t,n)},{constant:t.constant&&n.constant,inputs:!r&&[t,n]})},identifier:function(){for(var t=this.consume().text;this.peek(".")&&this.peekAhead(1).identifier&&!this.peekAhead(2,"(");)t+=this.consume().text+this.consume().text;return Fe(t,this.options,this.text)},constant:function(){var t=this.consume().value;return f(function(){return t},{constant:!0,literal:!0})},statements:function(){for(var t=[];;)if(this.tokens.length>0&&!this.peek("}",")",";","]")&&t.push(this.filterChain()),!this.expect(";"))return 1===t.length?t[0]:function(e,n){for(var r,i=0,o=t.length;o>i;i++)r=t[i](e,n);return r}},filterChain:function(){for(var t,e=this.expression();t=this.expect("|");)e=this.filter(e);return e},filter:function(t){var e,r,i=this.$filter(this.consume().text);if(this.peek(":"))for(e=[],r=[];this.expect(":");)e.push(this.expression());var o=[t].concat(e||[]);return f(function(o,a){var s=t(o,a);if(r){r[0]=s;for(var u=e.length;u--;)r[u+1]=e[u](o,a);return i.apply(n,r)}return i(s)},{constant:!i.$stateful&&o.every(Pe),inputs:!i.$stateful&&o})},expression:function(){return this.assignment()},assignment:function(){var t,e,n=this.ternary();return(e=this.expect("="))?(n.assign||this.throwError("implies assignment but ["+this.text.substring(0,e.index)+"] can not be assigned to",e),t=this.ternary(),f(function(e,r){return n.assign(e,t(e,r),r)},{inputs:[n,t]})):n},ternary:function(){var t,e,n=this.logicalOR();if((e=this.expect("?"))&&(t=this.assignment(),this.consume(":"))){var r=this.assignment();return f(function(e,i){return n(e,i)?t(e,i):r(e,i)},{constant:n.constant&&t.constant&&r.constant})}return n},logicalOR:function(){for(var t,e=this.logicalAND();t=this.expect("||");)e=this.binaryFn(e,t.text,this.logicalAND(),!0);return e},logicalAND:function(){for(var t,e=this.equality();t=this.expect("&&");)e=this.binaryFn(e,t.text,this.equality(),!0);return e},equality:function(){for(var t,e=this.relational();t=this.expect("==","!=","===","!==");)e=this.binaryFn(e,t.text,this.relational());return e},relational:function(){for(var t,e=this.additive();t=this.expect("<",">","<=",">=");)e=this.binaryFn(e,t.text,this.additive());return e},additive:function(){for(var t,e=this.multiplicative();t=this.expect("+","-");)e=this.binaryFn(e,t.text,this.multiplicative());return e},multiplicative:function(){for(var t,e=this.unary();t=this.expect("*","/","%");)e=this.binaryFn(e,t.text,this.unary());return e},unary:function(){var t;return this.expect("+")?this.primary():(t=this.expect("-"))?this.binaryFn(gi.ZERO,t.text,this.unary()):(t=this.expect("!"))?this.unaryFn(t.text,this.unary()):this.primary()},fieldAccess:function(t){var e=this.identifier();return f(function(r,i,o){var a=o||t(r,i);return null==a?n:e(a)},{assign:function(n,r,i){var o=t(n,i);return o||t.assign(n,o={},i),e.assign(o,r)}})},objectIndex:function(t){var e=this.text,r=this.expression();return this.consume("]"),f(function(i,o){var a,s=t(i,o),u=De(r(i,o),e);return Ve(u,e),s?a=je(s[u],e):n},{assign:function(n,i,o){var a=Ve(De(r(n,o),e),e),s=je(t(n,o),e);return s||t.assign(n,s={},o),s[a]=i}})},functionCall:function(t,e){var r=[];if(")"!==this.peekToken().text)do r.push(this.expression());while(this.expect(","));this.consume(")");var i=this.text,o=r.length?[]:null;return function(a,s){var u=e?e(a,s):g(e)?n:a,c=t(a,s,u)||p;if(o)for(var l=r.length;l--;)o[l]=je(r[l](a,s),i);je(u,i),Re(c,i);var f=c.apply?c.apply(u,o):c(o[0],o[1],o[2],o[3],o[4]);return o&&(o.length=0),je(f,i)}},arrayDeclaration:function(){var t=[];if("]"!==this.peekToken().text)do{if(this.peek("]"))break;t.push(this.expression())}while(this.expect(","));return this.consume("]"),f(function(e,n){for(var r=[],i=0,o=t.length;o>i;i++)r.push(t[i](e,n));return r},{literal:!0,constant:t.every(Pe),inputs:t})},object:function(){var t=[],e=[];if("}"!==this.peekToken().text)do{if(this.peek("}"))break;var n=this.consume();n.constant?t.push(n.value):n.identifier?t.push(n.text):this.throwError("invalid key",n),this.consume(":"),e.push(this.expression())}while(this.expect(","));return this.consume("}"),f(function(n,r){for(var i={},o=0,a=e.length;a>o;o++)i[t[o]]=e[o](n,r);return i},{literal:!0,constant:e.every(Pe),inputs:e})}};var yi=ct(),wi=ct(),bi=Object.prototype.valueOf,xi=r("$sce"),Si={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},Kr=r("$compile"),Ci=e.createElement("a"),Ai=on(t.location.href);un.$inject=["$provide"],hn.$inject=["$locale"],$n.$inject=["$locale"];var Ei=".",ki={yyyy:vn("FullYear",4),yy:vn("FullYear",2,0,!0),y:vn("FullYear",1),MMMM:mn("Month"),MMM:mn("Month",!0),MM:vn("Month",2,1),M:vn("Month",1,1),dd:vn("Date",2),d:vn("Date",1),HH:vn("Hours",2),H:vn("Hours",1),hh:vn("Hours",2,-12),h:vn("Hours",1,-12),mm:vn("Minutes",2),m:vn("Minutes",1),ss:vn("Seconds",2),s:vn("Seconds",1),sss:vn("Milliseconds",3),EEEE:mn("Day"),EEE:mn("Day",!0),a:xn,Z:gn,ww:bn(2),w:bn(1),G:Sn,GG:Sn,GGG:Sn,GGGG:Cn},Oi=/((?:[^yMdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,Ti=/^\-?\d+$/;An.$inject=["$locale"];var Mi=v(Zn),Ni=v(Xn);On.$inject=["$parse"];var Vi=v({restrict:"E",compile:function(t,e){return e.href||e.xlinkHref||e.name?void 0:function(t,e){if("a"===e[0].nodeName.toLowerCase()){var n="[object SVGAnimatedString]"===ur.call(e.prop("href"))?"xlink:href":"href";e.on("click",function(t){e.attr(n)||t.preventDefault()})}}}}),Di={};o(Fr,function(t,e){if("multiple"!=t){var n=Xt("ng-"+e);Di[n]=function(){return{restrict:"A",priority:100,link:function(t,r,i){t.$watch(i[n],function(t){i.$set(e,!!t)})}}}}}),o(Lr,function(t,e){Di[e]=function(){return{priority:100,link:function(t,n,r){if("ngPattern"===e&&"/"==r.ngPattern.charAt(0)){var i=r.ngPattern.match(Yn);if(i)return void r.$set("ngPattern",new RegExp(i[1],i[2]))}t.$watch(r[e],function(t){r.$set(e,t)})}}}}),o(["src","srcset","href"],function(t){var e=Xt("ng-"+t);Di[e]=function(){return{priority:99,link:function(n,r,i){var o=t,a=t;"href"===t&&"[object SVGAnimatedString]"===ur.call(r.prop("href"))&&(a="xlinkHref",i.$attr[a]="xlink:href",o=null),i.$observe(e,function(e){return e?(i.$set(a,e),void(er&&o&&r.prop(o,i[a]))):void("href"===t&&i.$set(a,null))})}}}});var ji={$addControl:p,$$renameControl:Mn,$removeControl:p,$setValidity:p,$setDirty:p,$setPristine:p,$setSubmitted:p},Ri="ng-submitted";Nn.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var Pi=function(t){return["$timeout",function(e){var r={name:"form",restrict:t?"EAC":"E",controller:Nn,compile:function(r,i){r.addClass(mo).addClass(po);var o=i.name?"name":t&&i.ngForm?"ngForm":!1;return{pre:function(t,r,i,a){if(!("action"in i)){var s=function(e){t.$apply(function(){a.$commitViewValue(),a.$setSubmitted()}),e.preventDefault()};Tr(r[0],"submit",s),r.on("$destroy",function(){e(function(){Mr(r[0],"submit",s)},0,!1)})}var u=a.$$parentForm;o&&(_e(t,null,a.$name,a,a.$name),i.$observe(o,function(e){a.$name!==e&&(_e(t,null,a.$name,n,a.$name),u.$$renameControl(a,e),_e(t,null,a.$name,a,a.$name))})),r.on("$destroy",function(){u.$removeControl(a),o&&_e(t,null,i[o],n,a.$name),f(a,ji)})}}}};return r}]},_i=Pi(),Ii=Pi(!0),qi=/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/,Ui=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,Fi=/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,Hi=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,Li=/^(\d{4})-(\d{2})-(\d{2})$/,Bi=/^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,zi=/^(\d{4})-W(\d\d)$/,Gi=/^(\d{4})-(\d\d)$/,Wi=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Yi={text:Dn,date:_n("date",Li,Pn(Li,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":_n("datetimelocal",Bi,Pn(Bi,["yyyy","MM","dd","HH","mm","ss","sss"]),"yyyy-MM-ddTHH:mm:ss.sss"),time:_n("time",Wi,Pn(Wi,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:_n("week",zi,Rn,"yyyy-Www"),month:_n("month",Gi,Pn(Gi,["yyyy","MM"]),"yyyy-MM"),number:qn,url:Un,email:Fn,radio:Hn,checkbox:Bn,hidden:p,button:p,submit:p,reset:p,file:p},Ji=["$browser","$sniffer","$filter","$parse",function(t,e,n,r){return{restrict:"E",require:["?ngModel"],link:{pre:function(i,o,a,s){s[0]&&(Yi[Zn(a.type)]||Yi.text)(i,o,a,s[0],e,t,n,r)}}}}],Zi=/^(true|false|\d+)$/,Ki=function(){return{restrict:"A",priority:100,compile:function(t,e){return Zi.test(e.ngValue)?function(t,e,n){n.$set("value",t.$eval(n.ngValue))}:function(t,e,n){t.$watch(n.ngValue,function(t){n.$set("value",t)})}}}},Xi=["$compile",function(t){return{restrict:"AC",compile:function(e){return t.$$addBindingClass(e),function(e,r,i){t.$$addBindingInfo(r,i.ngBind),r=r[0],e.$watch(i.ngBind,function(t){r.textContent=t===n?"":t})}}}}],Qi=["$interpolate","$compile",function(t,e){return{compile:function(r){return e.$$addBindingClass(r),function(r,i,o){var a=t(i.attr(o.$attr.ngBindTemplate));e.$$addBindingInfo(i,a.expressions),i=i[0],o.$observe("ngBindTemplate",function(t){i.textContent=t===n?"":t})}}}}],to=["$sce","$parse","$compile",function(t,e,n){return{restrict:"A",compile:function(r,i){var o=e(i.ngBindHtml),a=e(i.ngBindHtml,function(t){return(t||"").toString()});return n.$$addBindingClass(r),function(e,r,i){n.$$addBindingInfo(r,i.ngBindHtml),e.$watch(a,function(){r.html(t.getTrustedHtml(o(e))||"")})}}}}],eo=v({restrict:"A",require:"ngModel",link:function(t,e,n,r){r.$viewChangeListeners.push(function(){t.$eval(n.ngChange)})}}),no=zn("",!0),ro=zn("Odd",0),io=zn("Even",1),oo=Tn({compile:function(t,e){e.$set("ngCloak",n),t.removeClass("ng-cloak")}}),ao=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],so={},uo={blur:!0,focus:!0};o("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(t){var e=Xt("ng-"+t);so[e]=["$parse","$rootScope",function(n,r){return{restrict:"A",compile:function(i,o){var a=n(o[e],null,!0);return function(e,n){n.on(t,function(n){var i=function(){a(e,{$event:n})};uo[t]&&r.$$phase?e.$evalAsync(i):e.$apply(i)})}}}}]});var co=["$animate",function(t){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(n,r,i,o,a){var s,u,c;n.$watch(i.ngIf,function(n){n?u||a(function(n,o){u=o,n[n.length++]=e.createComment(" end ngIf: "+i.ngIf+" "),s={clone:n},t.enter(n,r.parent(),r)}):(c&&(c.remove(),c=null),u&&(u.$destroy(),u=null),s&&(c=ut(s.clone),t.leave(c).then(function(){c=null}),s=null))})}}}],lo=["$templateRequest","$anchorScroll","$animate",function(t,e,n){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:lr.noop,compile:function(r,i){var o=i.ngInclude||i.src,a=i.onload||"",s=i.autoscroll;return function(r,i,u,c,l){var f,h,$,p=0,d=function(){h&&(h.remove(),h=null),f&&(f.$destroy(),f=null),$&&(n.leave($).then(function(){h=null}),h=$,$=null)};r.$watch(o,function(o){var u=function(){!g(s)||s&&!r.$eval(s)||e()},h=++p;o?(t(o,!0).then(function(t){if(h===p){var e=r.$new();c.template=t;var s=l(e,function(t){d(),n.enter(t,null,i).then(u)});f=e,$=s,f.$emit("$includeContentLoaded",o),r.$eval(a)}},function(){h===p&&(d(),r.$emit("$includeContentError",o))}),r.$emit("$includeContentRequested",o)):(d(),c.template=null)})}}}}],fo=["$compile",function(t){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(n,r,i,o){return/SVG/.test(r[0].toString())?(r.empty(),void t(gt(o.template,e).childNodes)(n,function(t){r.append(t)},{futureParentElement:r})):(r.html(o.template),void t(r.contents())(n))}}}],ho=Tn({priority:450,compile:function(){return{pre:function(t,e,n){t.$eval(n.ngInit)}}}}),$o=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(t,e,r,i){var a=e.attr(r.$attr.ngList)||", ",s="false"!==r.ngTrim,u=s?pr(a):a,c=function(t){if(!m(t)){var e=[];return t&&o(t.split(u),function(t){t&&e.push(s?pr(t):t)}),e}};i.$parsers.push(c),i.$formatters.push(function(t){return $r(t)?t.join(a):n}),i.$isEmpty=function(t){return!t||!t.length}}}},po="ng-valid",vo="ng-invalid",mo="ng-pristine",go="ng-dirty",yo="ng-untouched",wo="ng-touched",bo="ng-pending",xo=r("ngModel"),So=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(t,e,r,i,a,s,u,c,l,f){this.$viewValue=Number.NaN,this.$modelValue=Number.NaN,this.$$rawModelValue=n,this.$validators={},this.$asyncValidators={},this.$parsers=[],this.$formatters=[],this.$viewChangeListeners=[],this.$untouched=!0,this.$touched=!1,this.$pristine=!0,this.$dirty=!1,this.$valid=!0,this.$invalid=!1,this.$error={},this.$$success={},this.$pending=n,this.$name=f(r.name||"",!1)(t);var h,$=a(r.ngModel),d=$.assign,v=$,y=d,w=null,x=this;this.$$setOptions=function(t){if(x.$options=t,t&&t.getterSetter){var e=a(r.ngModel+"()"),n=a(r.ngModel+"($$$p)");v=function(t){var n=$(t);return S(n)&&(n=e(t)),n},y=function(t,e){S($(t))?n(t,{$$$p:x.$modelValue}):d(t,x.$modelValue)}}else if(!$.assign)throw xo("nonassign","Expression '{0}' is non-assignable. Element: {1}",r.ngModel,z(i))},this.$render=p,this.$isEmpty=function(t){return m(t)||""===t||null===t||t!==t};var C=i.inheritedData("$formController")||ji,A=0;Gn({ctrl:this,$element:i,set:function(t,e){t[e]=!0},unset:function(t,e){delete t[e]},parentForm:C,$animate:s}),this.$setPristine=function(){x.$dirty=!1,x.$pristine=!0,s.removeClass(i,go),s.addClass(i,mo)},this.$setDirty=function(){x.$dirty=!0,x.$pristine=!1,s.removeClass(i,mo),s.addClass(i,go),C.$setDirty()},this.$setUntouched=function(){x.$touched=!1,x.$untouched=!0,s.setClass(i,yo,wo)},this.$setTouched=function(){x.$touched=!0,x.$untouched=!1,s.setClass(i,wo,yo)},this.$rollbackViewValue=function(){u.cancel(w),x.$viewValue=x.$$lastCommittedViewValue,x.$render()},this.$validate=function(){if(!b(x.$modelValue)||!isNaN(x.$modelValue)){var t=x.$$lastCommittedViewValue,e=x.$$rawModelValue,r=x.$valid,i=x.$modelValue,o=x.$options&&x.$options.allowInvalid;x.$$runValidators(e,t,function(t){o||r===t||(x.$modelValue=t?e:n,x.$modelValue!==i&&x.$$writeModelToScope())})}},this.$$runValidators=function(t,e,r){function i(){var t=x.$$parserName||"parse";return h!==n?(h||(o(x.$validators,function(t,e){u(e,null)}),o(x.$asyncValidators,function(t,e){u(e,null)})),u(t,h),h):(u(t,null),!0)}function a(){var n=!0;return o(x.$validators,function(r,i){var o=r(t,e);n=n&&o,u(i,o)}),n?!0:(o(x.$asyncValidators,function(t,e){u(e,null)}),!1)}function s(){var r=[],i=!0;o(x.$asyncValidators,function(o,a){var s=o(t,e);if(!N(s))throw xo("$asyncValidators","Expected asynchronous validator to return a promise but got '{0}' instead.",s);u(a,n),r.push(s.then(function(){u(a,!0)},function(t){i=!1,u(a,!1)}))}),r.length?l.all(r).then(function(){c(i)},p):c(!0)}function u(t,e){f===A&&x.$setValidity(t,e)}function c(t){f===A&&r(t)}A++;var f=A;return i()&&a()?void s():void c(!1)},this.$commitViewValue=function(){var t=x.$viewValue;u.cancel(w),(x.$$lastCommittedViewValue!==t||""===t&&x.$$hasNativeValidators)&&(x.$$lastCommittedViewValue=t,x.$pristine&&this.$setDirty(),this.$$parseAndValidate())},this.$$parseAndValidate=function(){function e(){x.$modelValue!==a&&x.$$writeModelToScope()}var r=x.$$lastCommittedViewValue,i=r;if(h=m(i)?n:!0)for(var o=0;o<x.$parsers.length;o++)if(i=x.$parsers[o](i),m(i)){h=!1;break}b(x.$modelValue)&&isNaN(x.$modelValue)&&(x.$modelValue=v(t));var a=x.$modelValue,s=x.$options&&x.$options.allowInvalid;x.$$rawModelValue=i,s&&(x.$modelValue=i,e()),x.$$runValidators(i,x.$$lastCommittedViewValue,function(t){s||(x.$modelValue=t?i:n,e())})},this.$$writeModelToScope=function(){y(t,x.$modelValue),o(x.$viewChangeListeners,function(t){try{t()}catch(n){e(n)}})},this.$setViewValue=function(t,e){x.$viewValue=t,(!x.$options||x.$options.updateOnDefault)&&x.$$debounceViewValueCommit(e)},this.$$debounceViewValueCommit=function(e){var n,r=0,i=x.$options;i&&g(i.debounce)&&(n=i.debounce,b(n)?r=n:b(n[e])?r=n[e]:b(n["default"])&&(r=n["default"])),u.cancel(w),r?w=u(function(){x.$commitViewValue()},r):c.$$phase?x.$commitViewValue():t.$apply(function(){x.$commitViewValue()})},t.$watch(function(){var e=v(t);if(e!==x.$modelValue&&(x.$modelValue===x.$modelValue||e===e)){x.$modelValue=x.$$rawModelValue=e,h=n;for(var r=x.$formatters,i=r.length,o=e;i--;)o=r[i](o);x.$viewValue!==o&&(x.$viewValue=x.$$lastCommittedViewValue=o,x.$render(),x.$$runValidators(e,o,p))}return e})}],Co=["$rootScope",function(t){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:So,priority:1,compile:function(e){return e.addClass(mo).addClass(yo).addClass(po),{pre:function(t,e,n,r){var i=r[0],o=r[1]||ji;i.$$setOptions(r[2]&&r[2].$options),o.$addControl(i),n.$observe("name",function(t){i.$name!==t&&o.$$renameControl(i,t)}),t.$on("$destroy",function(){o.$removeControl(i)})},post:function(e,n,r,i){var o=i[0];o.$options&&o.$options.updateOn&&n.on(o.$options.updateOn,function(t){o.$$debounceViewValueCommit(t&&t.type)}),n.on("blur",function(n){o.$touched||(t.$$phase?e.$evalAsync(o.$setTouched):e.$apply(o.$setTouched))})}}}}}],Ao=/(\s+|^)default(\s+|$)/,Eo=function(){return{restrict:"A",controller:["$scope","$attrs",function(t,e){var r=this;this.$options=t.$eval(e.ngModelOptions),this.$options.updateOn!==n?(this.$options.updateOnDefault=!1,this.$options.updateOn=pr(this.$options.updateOn.replace(Ao,function(){return r.$options.updateOnDefault=!0," "}))):this.$options.updateOnDefault=!0}]}},ko=Tn({terminal:!0,priority:1e3}),Oo=["$locale","$interpolate",function(t,e){var n=/{}/g,r=/^when(Minus)?(.+)$/;return{restrict:"EA",link:function(i,a,s){function u(t){a.text(t||"")}var c,l=s.count,f=s.$attr.when&&a.attr(s.$attr.when),h=s.offset||0,$=i.$eval(f)||{},p={},d=e.startSymbol(),v=e.endSymbol(),m=d+l+"-"+h+v,g=lr.noop;o(s,function(t,e){var n=r.exec(e);if(n){var i=(n[1]?"-":"")+Zn(n[2]);$[i]=a.attr(s.$attr[e])}}),o($,function(t,r){p[r]=e(t.replace(n,m))}),i.$watch(l,function(e){var n=parseFloat(e),r=isNaN(n);r||n in $||(n=t.pluralCat(n-h)),n===c||r&&isNaN(c)||(g(),g=i.$watch(p[n],u),c=n)})}}}],To=["$parse","$animate",function(t,a){var s="$$NG_REMOVED",u=r("ngRepeat"),c=function(t,e,n,r,i,o,a){t[n]=r,i&&(t[i]=o),t.$index=e,t.$first=0===e,t.$last=e===a-1,t.$middle=!(t.$first||t.$last),t.$odd=!(t.$even=0===(1&e))},l=function(t){return t.clone[0]},f=function(t){return t.clone[t.clone.length-1]};return{restrict:"A",multiElement:!0,transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,compile:function(r,h){var $=h.ngRepeat,p=e.createComment(" end ngRepeat: "+$+" "),d=$.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!d)throw u("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",$);var v=d[1],m=d[2],g=d[3],y=d[4];if(d=v.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/),!d)throw u("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",v);var w=d[3]||d[1],b=d[2];if(g&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(g)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(g)))throw u("badident","alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",g);var x,S,C,A,E={$id:Ut};return y?x=t(y):(C=function(t,e){return Ut(e)},A=function(t){return t}),function(t,e,r,h,d){x&&(S=function(e,n,r){return b&&(E[b]=e),E[w]=n,E.$index=r,x(t,E)});var v=ct();t.$watchCollection(m,function(r){var h,m,y,x,E,k,O,T,M,N,V,D,j=e[0],R=ct();if(g&&(t[g]=r),i(r))M=r,T=S||C;else{T=S||A,M=[];for(var P in r)r.hasOwnProperty(P)&&"$"!=P.charAt(0)&&M.push(P);M.sort()}for(x=M.length,V=new Array(x),h=0;x>h;h++)if(E=r===M?h:M[h],k=r[E],O=T(E,k,h),v[O])N=v[O],delete v[O],R[O]=N,V[h]=N;else{if(R[O])throw o(V,function(t){t&&t.scope&&(v[t.id]=t)}),u("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",$,O,k);V[h]={id:O,scope:n,clone:n},R[O]=!0}for(var _ in v){if(N=v[_],D=ut(N.clone),a.leave(D),D[0].parentNode)for(h=0,m=D.length;m>h;h++)D[h][s]=!0;N.scope.$destroy()}for(h=0;x>h;h++)if(E=r===M?h:M[h],k=r[E],N=V[h],N.scope){y=j;do y=y.nextSibling;while(y&&y[s]);l(N)!=y&&a.move(ut(N.clone),null,nr(j)),j=f(N),c(N.scope,h,w,k,b,E,x)}else d(function(t,e){N.scope=e;var n=p.cloneNode(!1);t[t.length++]=n,a.enter(t,null,nr(j)),j=n,N.clone=t,R[N.id]=N,c(N.scope,h,w,k,b,E,x)});v=R})}}}}],Mo="ng-hide",No="ng-hide-animate",Vo=["$animate",function(t){return{restrict:"A",multiElement:!0,link:function(e,n,r){e.$watch(r.ngShow,function(e){t[e?"removeClass":"addClass"](n,Mo,{tempClasses:No})})}}}],Do=["$animate",function(t){return{restrict:"A",multiElement:!0,link:function(e,n,r){e.$watch(r.ngHide,function(e){t[e?"addClass":"removeClass"](n,Mo,{tempClasses:No})})}}}],jo=Tn(function(t,e,n){t.$watch(n.ngStyle,function(t,n){n&&t!==n&&o(n,function(t,n){e.css(n,"")}),t&&e.css(t)},!0)}),Ro=["$animate",function(t){return{restrict:"EA",require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(n,r,i,a){var s=i.ngSwitch||i.on,u=[],c=[],l=[],f=[],h=function(t,e){return function(){t.splice(e,1)}};n.$watch(s,function(n){var r,i;for(r=0,i=l.length;i>r;++r)t.cancel(l[r]);for(l.length=0,r=0,i=f.length;i>r;++r){var s=ut(c[r].clone);f[r].$destroy();var $=l[r]=t.leave(s);$.then(h(l,r))}c.length=0,f.length=0,(u=a.cases["!"+n]||a.cases["?"])&&o(u,function(n){n.transclude(function(r,i){f.push(i);var o=n.element;r[r.length++]=e.createComment(" end ngSwitchWhen: ");var a={clone:r};c.push(a),t.enter(r,o.parent(),o)})})})}}}],Po=Tn({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(t,e,n,r,i){r.cases["!"+n.ngSwitchWhen]=r.cases["!"+n.ngSwitchWhen]||[],r.cases["!"+n.ngSwitchWhen].push({transclude:i,element:e})}}),_o=Tn({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(t,e,n,r,i){r.cases["?"]=r.cases["?"]||[],r.cases["?"].push({transclude:i,element:e})}}),Io=Tn({restrict:"EAC",link:function(t,e,n,i,o){if(!o)throw r("ngTransclude")("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",z(e));o(function(t){e.empty(),e.append(t)})}}),qo=["$templateCache",function(t){return{restrict:"E",terminal:!0,compile:function(e,n){if("text/ng-template"==n.type){var r=n.id,i=e[0].text;t.put(r,i)}}}}],Uo=r("ngOptions"),Fo=v({restrict:"A",terminal:!0}),Ho=["$compile","$parse",function(t,r){var i=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,s={$setViewValue:p};return{restrict:"E",require:["select","?ngModel"],controller:["$element","$scope","$attrs",function(t,e,n){var r,i,o=this,a={},u=s;o.databound=n.ngModel,o.init=function(t,e,n){u=t,r=e,i=n},o.addOption=function(e,n){at(e,'"option value"'),a[e]=!0,u.$viewValue==e&&(t.val(e),i.parent()&&i.remove()),n&&n[0].hasAttribute("selected")&&(n[0].selected=!0)},o.removeOption=function(t){this.hasOption(t)&&(delete a[t],u.$viewValue===t&&this.renderUnknownOption(t))},o.renderUnknownOption=function(e){var n="? "+Ut(e)+" ?";i.val(n),t.prepend(i),t.val(n),i.prop("selected",!0)},o.hasOption=function(t){return a.hasOwnProperty(t)},e.$on("$destroy",function(){o.renderUnknownOption=p})}],link:function(s,u,c,l){function f(t,e,n,r){n.$render=function(){var t=n.$viewValue;r.hasOption(t)?(C.parent()&&C.remove(),e.val(t),""===t&&p.prop("selected",!0)):null==t&&p?e.val(""):r.renderUnknownOption(t)},e.on("change",function(){t.$apply(function(){C.parent()&&C.remove(),n.$setViewValue(e.val())})})}function h(t,e,n){var r;n.$render=function(){var t=new Ft(n.$viewValue);o(e.find("option"),function(e){e.selected=g(t.get(e.value))})},t.$watch(function(){I(r,n.$viewValue)||(r=_(n.$viewValue),n.$render())}),e.on("change",function(){t.$apply(function(){var t=[];o(e.find("option"),function(e){
|
9
|
-
e.selected&&t.push(e.value)}),n.$setViewValue(t)})})}function $(e,s,u){function c(t,n,r){return I[k]=r,M&&(I[M]=n),t(e,I)}function l(){e.$apply(function(){var t,n=D(e)||[];if(m)t=[],o(s.val(),function(e){e=R?P[e]:e,t.push(f(e,n[e]))});else{var r=R?P[s.val()]:s.val();t=f(r,n[r])}u.$setViewValue(t),C()})}function f(t,e){if("?"===t)return n;if(""===t)return null;var r=T?T:V;return c(r,t,e)}function h(){var t,n=D(e);if(n&&$r(n)){t=new Array(n.length);for(var r=0,i=n.length;i>r;r++)t[r]=c(E,r,n[r]);return t}if(n){t={};for(var o in n)n.hasOwnProperty(o)&&(t[o]=c(E,o,n[o]))}return t}function $(t){var e;if(m)if(R&&$r(t)){e=new Ft([]);for(var n=0;n<t.length;n++)e.put(c(R,null,t[n]),!0)}else e=new Ft(t);else R&&(t=c(R,null,t));return function(n,r){var i;return i=R?R:T?T:V,m?g(e.remove(c(i,n,r))):t===c(i,n,r)}}function p(){b||(e.$$postDigest(C),b=!0)}function v(t,e,n){t[e]=t[e]||0,t[e]+=n?1:-1}function C(){b=!1;var t,n,r,i,l,f,h,p,y,C,A,k,O,T,V,j,q,U={"":[]},F=[""],H=u.$viewValue,L=D(e)||[],B=M?a(L):L,z={},G=$(H),W=!1;for(P={},k=0;C=B.length,C>k;k++)h=k,M&&(h=B[k],"$"===h.charAt(0))||(p=L[h],t=c(N,h,p)||"",(n=U[t])||(n=U[t]=[],F.push(t)),O=G(h,p),W=W||O,j=c(E,h,p),j=g(j)?j:"",q=R?R(e,I):M?B[k]:k,R&&(P[q]=h),n.push({id:q,label:j,selected:O}));for(m||(w||null===H?U[""].unshift({id:"",label:"",selected:!W}):W||U[""].unshift({id:"?",label:"",selected:!0})),A=0,y=F.length;y>A;A++){for(t=F[A],n=U[t],_.length<=A?(i={element:S.clone().attr("label",t),label:n.label},l=[i],_.push(l),s.append(i.element)):(l=_[A],i=l[0],i.label!=t&&i.element.attr("label",i.label=t)),T=null,k=0,C=n.length;C>k;k++)r=n[k],(f=l[k+1])?(T=f.element,f.label!==r.label&&(v(z,f.label,!1),v(z,r.label,!0),T.text(f.label=r.label),T.prop("label",f.label)),f.id!==r.id&&T.val(f.id=r.id),T[0].selected!==r.selected&&(T.prop("selected",f.selected=r.selected),er&&T.prop("selected",f.selected))):(""===r.id&&w?V=w:(V=x.clone()).val(r.id).prop("selected",r.selected).attr("selected",r.selected).prop("label",r.label).text(r.label),l.push(f={element:V,label:r.label,id:r.id,selected:r.selected}),v(z,r.label,!0),T?T.after(V):i.element.append(V),T=V);for(k++;l.length>k;)r=l.pop(),v(z,r.label,!1),r.element.remove()}for(;_.length>A;){for(n=_.pop(),k=1;k<n.length;++k)v(z,n[k].label,!1);n[0].element.remove()}o(z,function(t,e){t>0?d.addOption(e):0>t&&d.removeOption(e)})}var A;if(!(A=y.match(i)))throw Uo("iexp","Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}",y,z(s));var E=r(A[2]||A[1]),k=A[4]||A[6],O=/ as /.test(A[0])&&A[1],T=O?r(O):null,M=A[5],N=r(A[3]||""),V=r(A[2]?A[1]:k),D=r(A[7]),j=A[8],R=j?r(A[8]):null,P={},_=[[{element:s,label:""}]],I={};w&&(t(w)(e),w.removeClass("ng-scope"),w.remove()),s.empty(),s.on("change",l),u.$render=C,e.$watchCollection(D,p),e.$watchCollection(h,p),m&&e.$watchCollection(function(){return u.$modelValue},p)}if(l[1]){for(var p,d=l[0],v=l[1],m=c.multiple,y=c.ngOptions,w=!1,b=!1,x=nr(e.createElement("option")),S=nr(e.createElement("optgroup")),C=x.clone(),A=0,E=u.children(),k=E.length;k>A;A++)if(""===E[A].value){p=w=E.eq(A);break}d.init(v,w,C),m&&(v.$isEmpty=function(t){return!t||0===t.length}),y?$(s,u,v):m?h(s,u,v):f(s,u,v,d)}}}}],Lo=["$interpolate",function(t){var e={addOption:p,removeOption:p};return{restrict:"E",priority:100,compile:function(n,r){if(m(r.value)){var i=t(n.text(),!0);i||r.$set("value",n.text())}return function(t,n,r){var o="$selectController",a=n.parent(),s=a.data(o)||a.parent().data(o);s&&s.databound||(s=e),i?t.$watch(i,function(t,e){r.$set("value",t),e!==t&&s.removeOption(e),s.addOption(t,n)}):s.addOption(r.value,n),n.on("$destroy",function(){s.removeOption(r.value)})}}}}],Bo=v({restrict:"E",terminal:!1}),zo=function(){return{restrict:"A",require:"?ngModel",link:function(t,e,n,r){r&&(n.required=!0,r.$validators.required=function(t,e){return!n.required||!r.$isEmpty(e)},n.$observe("required",function(){r.$validate()}))}}},Go=function(){return{restrict:"A",require:"?ngModel",link:function(t,e,i,o){if(o){var a,s=i.ngPattern||i.pattern;i.$observe("pattern",function(t){if(w(t)&&t.length>0&&(t=new RegExp("^"+t+"$")),t&&!t.test)throw r("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",s,t,z(e));a=t||n,o.$validate()}),o.$validators.pattern=function(t,e){return o.$isEmpty(e)||m(a)||a.test(e)}}}}},Wo=function(){return{restrict:"A",require:"?ngModel",link:function(t,e,n,r){if(r){var i=-1;n.$observe("maxlength",function(t){var e=h(t);i=isNaN(e)?-1:e,r.$validate()}),r.$validators.maxlength=function(t,e){return 0>i||r.$isEmpty(e)||e.length<=i}}}}},Yo=function(){return{restrict:"A",require:"?ngModel",link:function(t,e,n,r){if(r){var i=0;n.$observe("minlength",function(t){i=h(t)||0,r.$validate()}),r.$validators.minlength=function(t,e){return r.$isEmpty(e)||e.length>=i}}}}};return t.angular.bootstrap?void console.log("WARNING: Tried to load angular more than once."):(rt(),$t(lr),void nr(e).ready(function(){X(e,Q)}))}(window,document),!window.angular.$$csp()&&window.angular.element(document.head).prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}</style>');
|
7
|
+
"use strict";function hasOwnProperty(r,e){return Object.prototype.hasOwnProperty.call(r,e)}module.exports=function(r,e,t,n){e=e||"&",t=t||"=";var o={};if("string"!=typeof r||0===r.length)return o;var a=/\+/g;r=r.split(e);var s=1e3;n&&"number"==typeof n.maxKeys&&(s=n.maxKeys);var p=r.length;s>0&&p>s&&(p=s);for(var y=0;p>y;++y){var u,c,i,l,f=r[y].replace(a,"%20"),v=f.indexOf(t);v>=0?(u=f.substr(0,v),c=f.substr(v+1)):(u=f,c=""),i=decodeURIComponent(u),l=decodeURIComponent(c),hasOwnProperty(o,i)?isArray(o[i])?o[i].push(l):o[i]=[o[i],l]:o[i]=l}return o};var isArray=Array.isArray||function(r){return"[object Array]"===Object.prototype.toString.call(r)};
|
10
8
|
|
11
9
|
},{}],3:[function(require,module,exports){
|
12
|
-
|
10
|
+
"use strict";function map(r,e){if(r.map)return r.map(e);for(var t=[],n=0;n<r.length;n++)t.push(e(r[n],n));return t}var stringifyPrimitive=function(r){switch(typeof r){case"string":return r;case"boolean":return r?"true":"false";case"number":return isFinite(r)?r:"";default:return""}};module.exports=function(r,e,t,n){return e=e||"&",t=t||"=",null===r&&(r=void 0),"object"==typeof r?map(objectKeys(r),function(n){var i=encodeURIComponent(stringifyPrimitive(n))+t;return isArray(r[n])?map(r[n],function(r){return i+encodeURIComponent(stringifyPrimitive(r))}).join(e):i+encodeURIComponent(stringifyPrimitive(r[n]))}).join(e):n?encodeURIComponent(stringifyPrimitive(n))+t+encodeURIComponent(stringifyPrimitive(r)):""};var isArray=Array.isArray||function(r){return"[object Array]"===Object.prototype.toString.call(r)},objectKeys=Object.keys||function(r){var e=[];for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&e.push(t);return e};
|
13
11
|
|
14
|
-
},{
|
15
|
-
!function(){var t=function(e){var n=new t.Index;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),e&&e.call(n,n),n};t.version="0.5.9",t.utils={},t.utils.warn=function(t){return function(e){t.console&&console.warn&&console.warn(e)}}(this),t.EventEmitter=function(){this.events={}},t.EventEmitter.prototype.addListener=function(){var t=Array.prototype.slice.call(arguments),e=t.pop(),n=t;if("function"!=typeof e)throw new TypeError("last argument must be a function");n.forEach(function(t){this.hasHandler(t)||(this.events[t]=[]),this.events[t].push(e)},this)},t.EventEmitter.prototype.removeListener=function(t,e){if(this.hasHandler(t)){var n=this.events[t].indexOf(e);this.events[t].splice(n,1),this.events[t].length||delete this.events[t]}},t.EventEmitter.prototype.emit=function(t){if(this.hasHandler(t)){var e=Array.prototype.slice.call(arguments,1);this.events[t].forEach(function(t){t.apply(void 0,e)})}},t.EventEmitter.prototype.hasHandler=function(t){return t in this.events},t.tokenizer=function(t){return arguments.length&&null!=t&&void 0!=t?Array.isArray(t)?t.map(function(t){return t.toLowerCase()}):t.toString().trim().toLowerCase().split(/[\s\-]+/):[]},t.Pipeline=function(){this._stack=[]},t.Pipeline.registeredFunctions={},t.Pipeline.registerFunction=function(e,n){n in this.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[e.label]=e},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(e){var i=t.Pipeline.registeredFunctions[e];if(!i)throw new Error("Cannot load un-registered function: "+e);n.add(i)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(e){t.Pipeline.warnIfFunctionNotRegistered(e),this._stack.push(e)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var i=this._stack.indexOf(e);if(-1==i)throw new Error("Cannot find existingFn");i+=1,this._stack.splice(i,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var i=this._stack.indexOf(e);if(-1==i)throw new Error("Cannot find existingFn");this._stack.splice(i,0,n)},t.Pipeline.prototype.remove=function(t){var e=this._stack.indexOf(t);-1!=e&&this._stack.splice(e,1)},t.Pipeline.prototype.run=function(t){for(var e=[],n=t.length,i=this._stack.length,o=0;n>o;o++){for(var r=t[o],s=0;i>s&&(r=this._stack[s](r,o,t),void 0!==r);s++);void 0!==r&&e.push(r)}return e},t.Pipeline.prototype.reset=function(){this._stack=[]},t.Pipeline.prototype.toJSON=function(){return this._stack.map(function(e){return t.Pipeline.warnIfFunctionNotRegistered(e),e.label})},t.Vector=function(){this._magnitude=null,this.list=void 0,this.length=0},t.Vector.Node=function(t,e,n){this.idx=t,this.val=e,this.next=n},t.Vector.prototype.insert=function(e,n){this._magnitude=void 0;var i=this.list;if(!i)return this.list=new t.Vector.Node(e,n,i),this.length++;if(e<i.idx)return this.list=new t.Vector.Node(e,n,i),this.length++;for(var o=i,r=i.next;void 0!=r;){if(e<r.idx)return o.next=new t.Vector.Node(e,n,r),this.length++;o=r,r=r.next}return o.next=new t.Vector.Node(e,n,r),this.length++},t.Vector.prototype.magnitude=function(){if(this._magnitude)return this._magnitude;for(var t,e=this.list,n=0;e;)t=e.val,n+=t*t,e=e.next;return this._magnitude=Math.sqrt(n)},t.Vector.prototype.dot=function(t){for(var e=this.list,n=t.list,i=0;e&&n;)e.idx<n.idx?e=e.next:e.idx>n.idx?n=n.next:(i+=e.val*n.val,e=e.next,n=n.next);return i},t.Vector.prototype.similarity=function(t){return this.dot(t)/(this.magnitude()*t.magnitude())},t.SortedSet=function(){this.length=0,this.elements=[]},t.SortedSet.load=function(t){var e=new this;return e.elements=t,e.length=t.length,e},t.SortedSet.prototype.add=function(){var t,e;for(t=0;t<arguments.length;t++)e=arguments[t],~this.indexOf(e)||this.elements.splice(this.locationFor(e),0,e);this.length=this.elements.length},t.SortedSet.prototype.toArray=function(){return this.elements.slice()},t.SortedSet.prototype.map=function(t,e){return this.elements.map(t,e)},t.SortedSet.prototype.forEach=function(t,e){return this.elements.forEach(t,e)},t.SortedSet.prototype.indexOf=function(t){for(var e=0,n=this.elements.length,i=n-e,o=e+Math.floor(i/2),r=this.elements[o];i>1;){if(r===t)return o;t>r&&(e=o),r>t&&(n=o),i=n-e,o=e+Math.floor(i/2),r=this.elements[o]}return r===t?o:-1},t.SortedSet.prototype.locationFor=function(t){for(var e=0,n=this.elements.length,i=n-e,o=e+Math.floor(i/2),r=this.elements[o];i>1;)t>r&&(e=o),r>t&&(n=o),i=n-e,o=e+Math.floor(i/2),r=this.elements[o];return r>t?o:t>r?o+1:void 0},t.SortedSet.prototype.intersect=function(e){for(var n=new t.SortedSet,i=0,o=0,r=this.length,s=e.length,a=this.elements,h=e.elements;;){if(i>r-1||o>s-1)break;a[i]!==h[o]?a[i]<h[o]?i++:a[i]>h[o]&&o++:(n.add(a[i]),i++,o++)}return n},t.SortedSet.prototype.clone=function(){var e=new t.SortedSet;return e.elements=this.toArray(),e.length=e.elements.length,e},t.SortedSet.prototype.union=function(t){var e,n,i;return this.length>=t.length?(e=this,n=t):(e=t,n=this),i=e.clone(),i.add.apply(i,n.toArray()),i},t.SortedSet.prototype.toJSON=function(){return this.toArray()},t.Index=function(){this._fields=[],this._ref="id",this.pipeline=new t.Pipeline,this.documentStore=new t.Store,this.tokenStore=new t.TokenStore,this.corpusTokens=new t.SortedSet,this.eventEmitter=new t.EventEmitter,this._idfCache={},this.on("add","remove","update",function(){this._idfCache={}}.bind(this))},t.Index.prototype.on=function(){var t=Array.prototype.slice.call(arguments);return this.eventEmitter.addListener.apply(this.eventEmitter,t)},t.Index.prototype.off=function(t,e){return this.eventEmitter.removeListener(t,e)},t.Index.load=function(e){e.version!==t.version&&t.utils.warn("version mismatch: current "+t.version+" importing "+e.version);var n=new this;return n._fields=e.fields,n._ref=e.ref,n.documentStore=t.Store.load(e.documentStore),n.tokenStore=t.TokenStore.load(e.tokenStore),n.corpusTokens=t.SortedSet.load(e.corpusTokens),n.pipeline=t.Pipeline.load(e.pipeline),n},t.Index.prototype.field=function(t,e){var e=e||{},n={name:t,boost:e.boost||1};return this._fields.push(n),this},t.Index.prototype.ref=function(t){return this._ref=t,this},t.Index.prototype.add=function(e,n){var i={},o=new t.SortedSet,r=e[this._ref],n=void 0===n?!0:n;this._fields.forEach(function(n){var r=this.pipeline.run(t.tokenizer(e[n.name]));i[n.name]=r,t.SortedSet.prototype.add.apply(o,r)},this),this.documentStore.set(r,o),t.SortedSet.prototype.add.apply(this.corpusTokens,o.toArray());for(var s=0;s<o.length;s++){var a=o.elements[s],h=this._fields.reduce(function(t,e){var n=i[e.name].length;if(!n)return t;var o=i[e.name].filter(function(t){return t===a}).length;return t+o/n*e.boost},0);this.tokenStore.add(a,{ref:r,tf:h})}n&&this.eventEmitter.emit("add",e,this)},t.Index.prototype.remove=function(t,e){var n=t[this._ref],e=void 0===e?!0:e;if(this.documentStore.has(n)){var i=this.documentStore.get(n);this.documentStore.remove(n),i.forEach(function(t){this.tokenStore.remove(t,n)},this),e&&this.eventEmitter.emit("remove",t,this)}},t.Index.prototype.update=function(t,e){var e=void 0===e?!0:e;this.remove(t,!1),this.add(t,!1),e&&this.eventEmitter.emit("update",t,this)},t.Index.prototype.idf=function(t){var e="@"+t;if(Object.prototype.hasOwnProperty.call(this._idfCache,e))return this._idfCache[e];var n=this.tokenStore.count(t),i=1;return n>0&&(i=1+Math.log(this.tokenStore.length/n)),this._idfCache[e]=i},t.Index.prototype.search=function(e){var n=this.pipeline.run(t.tokenizer(e)),i=new t.Vector,o=[],r=this._fields.reduce(function(t,e){return t+e.boost},0),s=n.some(function(t){return this.tokenStore.has(t)},this);if(!s)return[];n.forEach(function(e,n,s){var a=1/s.length*this._fields.length*r,h=this,l=this.tokenStore.expand(e).reduce(function(n,o){var r=h.corpusTokens.indexOf(o),s=h.idf(o),l=1,u=new t.SortedSet;if(o!==e){var c=Math.max(3,o.length-e.length);l=1/Math.log(c)}return r>-1&&i.insert(r,a*s*l),Object.keys(h.tokenStore.get(o)).forEach(function(t){u.add(t)}),n.union(u)},new t.SortedSet);o.push(l)},this);var a=o.reduce(function(t,e){return t.intersect(e)});return a.map(function(t){return{ref:t,score:i.similarity(this.documentVector(t))}},this).sort(function(t,e){return e.score-t.score})},t.Index.prototype.documentVector=function(e){for(var n=this.documentStore.get(e),i=n.length,o=new t.Vector,r=0;i>r;r++){var s=n.elements[r],a=this.tokenStore.get(s)[e].tf,h=this.idf(s);o.insert(this.corpusTokens.indexOf(s),a*h)}return o},t.Index.prototype.toJSON=function(){return{version:t.version,fields:this._fields,ref:this._ref,documentStore:this.documentStore.toJSON(),tokenStore:this.tokenStore.toJSON(),corpusTokens:this.corpusTokens.toJSON(),pipeline:this.pipeline.toJSON()}},t.Index.prototype.use=function(t){var e=Array.prototype.slice.call(arguments,1);e.unshift(this),t.apply(this,e)},t.Store=function(){this.store={},this.length=0},t.Store.load=function(e){var n=new this;return n.length=e.length,n.store=Object.keys(e.store).reduce(function(n,i){return n[i]=t.SortedSet.load(e.store[i]),n},{}),n},t.Store.prototype.set=function(t,e){this.has(t)||this.length++,this.store[t]=e},t.Store.prototype.get=function(t){return this.store[t]},t.Store.prototype.has=function(t){return t in this.store},t.Store.prototype.remove=function(t){this.has(t)&&(delete this.store[t],this.length--)},t.Store.prototype.toJSON=function(){return{store:this.store,length:this.length}},t.stemmer=function(){var t={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},e={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},n="[^aeiou]",i="[aeiouy]",o=n+"[^aeiouy]*",r=i+"[aeiou]*",s="^("+o+")?"+r+o,a="^("+o+")?"+r+o+"("+r+")?$",h="^("+o+")?"+r+o+r+o,l="^("+o+")?"+i,u=new RegExp(s),c=new RegExp(h),p=new RegExp(a),f=new RegExp(l),d=/^(.+?)(ss|i)es$/,v=/^(.+?)([^s])s$/,m=/^(.+?)eed$/,g=/^(.+?)(ed|ing)$/,y=/.$/,S=/(at|bl|iz)$/,w=new RegExp("([^aeiouylsz])\\1$"),x=new RegExp("^"+o+i+"[^aeiouwxy]$"),k=/^(.+?[^aeiou])y$/,E=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,b=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,_=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,F=/^(.+?)(s|t)(ion)$/,O=/^(.+?)e$/,P=/ll$/,N=new RegExp("^"+o+i+"[^aeiouwxy]$"),T=function(n){var i,o,r,s,a,h,l;if(n.length<3)return n;if(r=n.substr(0,1),"y"==r&&(n=r.toUpperCase()+n.substr(1)),s=d,a=v,s.test(n)?n=n.replace(s,"$1$2"):a.test(n)&&(n=n.replace(a,"$1$2")),s=m,a=g,s.test(n)){var T=s.exec(n);s=u,s.test(T[1])&&(s=y,n=n.replace(s,""))}else if(a.test(n)){var T=a.exec(n);i=T[1],a=f,a.test(i)&&(n=i,a=S,h=w,l=x,a.test(n)?n+="e":h.test(n)?(s=y,n=n.replace(s,"")):l.test(n)&&(n+="e"))}if(s=k,s.test(n)){var T=s.exec(n);i=T[1],n=i+"i"}if(s=E,s.test(n)){var T=s.exec(n);i=T[1],o=T[2],s=u,s.test(i)&&(n=i+t[o])}if(s=b,s.test(n)){var T=s.exec(n);i=T[1],o=T[2],s=u,s.test(i)&&(n=i+e[o])}if(s=_,a=F,s.test(n)){var T=s.exec(n);i=T[1],s=c,s.test(i)&&(n=i)}else if(a.test(n)){var T=a.exec(n);i=T[1]+T[2],a=c,a.test(i)&&(n=i)}if(s=O,s.test(n)){var T=s.exec(n);i=T[1],s=c,a=p,h=N,(s.test(i)||a.test(i)&&!h.test(i))&&(n=i)}return s=P,a=c,s.test(n)&&a.test(n)&&(s=y,n=n.replace(s,"")),"y"==r&&(n=r.toLowerCase()+n.substr(1)),n};return T}(),t.Pipeline.registerFunction(t.stemmer,"stemmer"),t.stopWordFilter=function(e){return-1===t.stopWordFilter.stopWords.indexOf(e)?e:void 0},t.stopWordFilter.stopWords=new t.SortedSet,t.stopWordFilter.stopWords.length=119,t.stopWordFilter.stopWords.elements=["","a","able","about","across","after","all","almost","also","am","among","an","and","any","are","as","at","be","because","been","but","by","can","cannot","could","dear","did","do","does","either","else","ever","every","for","from","get","got","had","has","have","he","her","hers","him","his","how","however","i","if","in","into","is","it","its","just","least","let","like","likely","may","me","might","most","must","my","neither","no","nor","not","of","off","often","on","only","or","other","our","own","rather","said","say","says","she","should","since","so","some","than","that","the","their","them","then","there","these","they","this","tis","to","too","twas","us","wants","was","we","were","what","when","where","which","while","who","whom","why","will","with","would","yet","you","your"],t.Pipeline.registerFunction(t.stopWordFilter,"stopWordFilter"),t.trimmer=function(t){return t.replace(/^\W+/,"").replace(/\W+$/,"")},t.Pipeline.registerFunction(t.trimmer,"trimmer"),t.TokenStore=function(){this.root={docs:{}},this.length=0},t.TokenStore.load=function(t){var e=new this;return e.root=t.root,e.length=t.length,e},t.TokenStore.prototype.add=function(t,e,n){var n=n||this.root,i=t[0],o=t.slice(1);return i in n||(n[i]={docs:{}}),0===o.length?(n[i].docs[e.ref]=e,void(this.length+=1)):this.add(o,e,n[i])},t.TokenStore.prototype.has=function(t){if(!t)return!1;for(var e=this.root,n=0;n<t.length;n++){if(!e[t[n]])return!1;e=e[t[n]]}return!0},t.TokenStore.prototype.getNode=function(t){if(!t)return{};for(var e=this.root,n=0;n<t.length;n++){if(!e[t[n]])return{};e=e[t[n]]}return e},t.TokenStore.prototype.get=function(t,e){return this.getNode(t,e).docs||{}},t.TokenStore.prototype.count=function(t,e){return Object.keys(this.get(t,e)).length},t.TokenStore.prototype.remove=function(t,e){if(t){for(var n=this.root,i=0;i<t.length;i++){if(!(t[i]in n))return;n=n[t[i]]}delete n.docs[e]}},t.TokenStore.prototype.expand=function(t,e){var n=this.getNode(t),i=n.docs||{},e=e||[];return Object.keys(i).length&&e.push(t),Object.keys(n).forEach(function(n){"docs"!==n&&e.concat(this.expand(t+n,e))},this),e},t.TokenStore.prototype.toJSON=function(){return{root:this.root,length:this.length}},function(t,e){"function"==typeof define&&define.amd?define(e):"object"==typeof exports?module.exports=e():t.lunr=e()}(this,function(){return t})}();
|
12
|
+
},{}],4:[function(require,module,exports){
|
13
|
+
"use strict";exports.decode=exports.parse=require("./decode"),exports.encode=exports.stringify=require("./encode");
|
16
14
|
|
17
|
-
},{}],5:[function(require,module,exports){
|
18
|
-
|
19
|
-
|
15
|
+
},{"./decode":2,"./encode":3}],5:[function(require,module,exports){
|
16
|
+
function Url(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function urlParse(t,s,e){if(t&&isObject(t)&&t instanceof Url)return t;var h=new Url;return h.parse(t,s,e),h}function urlFormat(t){return isString(t)&&(t=urlParse(t)),t instanceof Url?t.format():Url.prototype.format.call(t)}function urlResolve(t,s){return urlParse(t,!1,!0).resolve(s)}function urlResolveObject(t,s){return t?urlParse(t,!1,!0).resolveObject(s):s}function isString(t){return"string"==typeof t}function isObject(t){return"object"==typeof t&&null!==t}function isNull(t){return null===t}function isNullOrUndefined(t){return null==t}var punycode=require("punycode");exports.parse=urlParse,exports.resolve=urlResolve,exports.resolveObject=urlResolveObject,exports.format=urlFormat,exports.Url=Url;var protocolPattern=/^([a-z0-9.+-]+:)/i,portPattern=/:[0-9]*$/,delims=["<",">",'"',"`"," ","\r","\n"," "],unwise=["{","}","|","\\","^","`"].concat(delims),autoEscape=["'"].concat(unwise),nonHostChars=["%","/","?",";","#"].concat(autoEscape),hostEndingChars=["/","?","#"],hostnameMaxLen=255,hostnamePartPattern=/^[a-z0-9A-Z_-]{0,63}$/,hostnamePartStart=/^([a-z0-9A-Z_-]{0,63})(.*)$/,unsafeProtocol={javascript:!0,"javascript:":!0},hostlessProtocol={javascript:!0,"javascript:":!0},slashedProtocol={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},querystring=require("querystring");Url.prototype.parse=function(t,s,e){if(!isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var h=t;h=h.trim();var r=protocolPattern.exec(h);if(r){r=r[0];var o=r.toLowerCase();this.protocol=o,h=h.substr(r.length)}if(e||r||h.match(/^\/\/[^@\/]+@[^@\/]+/)){var a="//"===h.substr(0,2);!a||r&&hostlessProtocol[r]||(h=h.substr(2),this.slashes=!0)}if(!hostlessProtocol[r]&&(a||r&&!slashedProtocol[r])){for(var n=-1,i=0;i<hostEndingChars.length;i++){var l=h.indexOf(hostEndingChars[i]);-1!==l&&(-1===n||n>l)&&(n=l)}var c,u;u=-1===n?h.lastIndexOf("@"):h.lastIndexOf("@",n),-1!==u&&(c=h.slice(0,u),h=h.slice(u+1),this.auth=decodeURIComponent(c)),n=-1;for(var i=0;i<nonHostChars.length;i++){var l=h.indexOf(nonHostChars[i]);-1!==l&&(-1===n||n>l)&&(n=l)}-1===n&&(n=h.length),this.host=h.slice(0,n),h=h.slice(n),this.parseHost(),this.hostname=this.hostname||"";var p="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!p)for(var f=this.hostname.split(/\./),i=0,m=f.length;m>i;i++){var v=f[i];if(v&&!v.match(hostnamePartPattern)){for(var g="",y=0,d=v.length;d>y;y++)g+=v.charCodeAt(y)>127?"x":v[y];if(!g.match(hostnamePartPattern)){var P=f.slice(0,i),b=f.slice(i+1),j=v.match(hostnamePartStart);j&&(P.push(j[1]),b.unshift(j[2])),b.length&&(h="/"+b.join(".")+h),this.hostname=P.join(".");break}}}if(this.hostname.length>hostnameMaxLen?this.hostname="":this.hostname=this.hostname.toLowerCase(),!p){for(var O=this.hostname.split("."),q=[],i=0;i<O.length;++i){var x=O[i];q.push(x.match(/[^A-Za-z0-9_-]/)?"xn--"+punycode.encode(x):x)}this.hostname=q.join(".")}var U=this.port?":"+this.port:"",C=this.hostname||"";this.host=C+U,this.href+=this.host,p&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==h[0]&&(h="/"+h))}if(!unsafeProtocol[o])for(var i=0,m=autoEscape.length;m>i;i++){var A=autoEscape[i],E=encodeURIComponent(A);E===A&&(E=escape(A)),h=h.split(A).join(E)}var w=h.indexOf("#");-1!==w&&(this.hash=h.substr(w),h=h.slice(0,w));var R=h.indexOf("?");if(-1!==R?(this.search=h.substr(R),this.query=h.substr(R+1),s&&(this.query=querystring.parse(this.query)),h=h.slice(0,R)):s&&(this.search="",this.query={}),h&&(this.pathname=h),slashedProtocol[o]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var U=this.pathname||"",x=this.search||"";this.path=U+x}return this.href=this.format(),this},Url.prototype.format=function(){var t=this.auth||"";t&&(t=encodeURIComponent(t),t=t.replace(/%3A/i,":"),t+="@");var s=this.protocol||"",e=this.pathname||"",h=this.hash||"",r=!1,o="";this.host?r=t+this.host:this.hostname&&(r=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(r+=":"+this.port)),this.query&&isObject(this.query)&&Object.keys(this.query).length&&(o=querystring.stringify(this.query));var a=this.search||o&&"?"+o||"";return s&&":"!==s.substr(-1)&&(s+=":"),this.slashes||(!s||slashedProtocol[s])&&r!==!1?(r="//"+(r||""),e&&"/"!==e.charAt(0)&&(e="/"+e)):r||(r=""),h&&"#"!==h.charAt(0)&&(h="#"+h),a&&"?"!==a.charAt(0)&&(a="?"+a),e=e.replace(/[?#]/g,function(t){return encodeURIComponent(t)}),a=a.replace("#","%23"),s+r+e+a+h},Url.prototype.resolve=function(t){return this.resolveObject(urlParse(t,!1,!0)).format()},Url.prototype.resolveObject=function(t){if(isString(t)){var s=new Url;s.parse(t,!1,!0),t=s}var e=new Url;if(Object.keys(this).forEach(function(t){e[t]=this[t]},this),e.hash=t.hash,""===t.href)return e.href=e.format(),e;if(t.slashes&&!t.protocol)return Object.keys(t).forEach(function(s){"protocol"!==s&&(e[s]=t[s])}),slashedProtocol[e.protocol]&&e.hostname&&!e.pathname&&(e.path=e.pathname="/"),e.href=e.format(),e;if(t.protocol&&t.protocol!==e.protocol){if(!slashedProtocol[t.protocol])return Object.keys(t).forEach(function(s){e[s]=t[s]}),e.href=e.format(),e;if(e.protocol=t.protocol,t.host||hostlessProtocol[t.protocol])e.pathname=t.pathname;else{for(var h=(t.pathname||"").split("/");h.length&&!(t.host=h.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==h[0]&&h.unshift(""),h.length<2&&h.unshift(""),e.pathname=h.join("/")}if(e.search=t.search,e.query=t.query,e.host=t.host||"",e.auth=t.auth,e.hostname=t.hostname||t.host,e.port=t.port,e.pathname||e.search){var r=e.pathname||"",o=e.search||"";e.path=r+o}return e.slashes=e.slashes||t.slashes,e.href=e.format(),e}var a=e.pathname&&"/"===e.pathname.charAt(0),n=t.host||t.pathname&&"/"===t.pathname.charAt(0),i=n||a||e.host&&t.pathname,l=i,c=e.pathname&&e.pathname.split("/")||[],h=t.pathname&&t.pathname.split("/")||[],u=e.protocol&&!slashedProtocol[e.protocol];if(u&&(e.hostname="",e.port=null,e.host&&(""===c[0]?c[0]=e.host:c.unshift(e.host)),e.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===h[0]?h[0]=t.host:h.unshift(t.host)),t.host=null),i=i&&(""===h[0]||""===c[0])),n)e.host=t.host||""===t.host?t.host:e.host,e.hostname=t.hostname||""===t.hostname?t.hostname:e.hostname,e.search=t.search,e.query=t.query,c=h;else if(h.length)c||(c=[]),c.pop(),c=c.concat(h),e.search=t.search,e.query=t.query;else if(!isNullOrUndefined(t.search)){if(u){e.hostname=e.host=c.shift();var p=e.host&&e.host.indexOf("@")>0?e.host.split("@"):!1;p&&(e.auth=p.shift(),e.host=e.hostname=p.shift())}return e.search=t.search,e.query=t.query,isNull(e.pathname)&&isNull(e.search)||(e.path=(e.pathname?e.pathname:"")+(e.search?e.search:"")),e.href=e.format(),e}if(!c.length)return e.pathname=null,e.search?e.path="/"+e.search:e.path=null,e.href=e.format(),e;for(var f=c.slice(-1)[0],m=(e.host||t.host)&&("."===f||".."===f)||""===f,v=0,g=c.length;g>=0;g--)f=c[g],"."==f?c.splice(g,1):".."===f?(c.splice(g,1),v++):v&&(c.splice(g,1),v--);if(!i&&!l)for(;v--;v)c.unshift("..");!i||""===c[0]||c[0]&&"/"===c[0].charAt(0)||c.unshift(""),m&&"/"!==c.join("/").substr(-1)&&c.push("");var y=""===c[0]||c[0]&&"/"===c[0].charAt(0);if(u){e.hostname=e.host=y?"":c.length?c.shift():"";var p=e.host&&e.host.indexOf("@")>0?e.host.split("@"):!1;p&&(e.auth=p.shift(),e.host=e.hostname=p.shift())}return i=i||e.host&&c.length,i&&!y&&c.unshift(""),c.length?e.pathname=c.join("/"):(e.pathname=null,e.path=null),isNull(e.pathname)&&isNull(e.search)||(e.path=(e.pathname?e.pathname:"")+(e.search?e.search:"")),e.auth=t.auth||e.auth,e.slashes=e.slashes||t.slashes,e.href=e.format(),e},Url.prototype.parseHost=function(){var t=this.host,s=portPattern.exec(t);s&&(s=s[0],":"!==s&&(this.port=s.substr(1)),t=t.substr(0,t.length-s.length)),t&&(this.hostname=t)};
|
17
|
+
|
18
|
+
},{"punycode":1,"querystring":4}],6:[function(require,module,exports){
|
19
|
+
!function(){var t=function(e){var n=new t.Index;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),e&&e.call(n,n),n};t.version="0.6.0",t.utils={},t.utils.warn=function(t){return function(e){t.console&&console.warn&&console.warn(e)}}(this),t.utils.asString=function(t){return void 0===t||null===t?"":t.toString()},t.EventEmitter=function(){this.events={}},t.EventEmitter.prototype.addListener=function(){var t=Array.prototype.slice.call(arguments),e=t.pop(),n=t;if("function"!=typeof e)throw new TypeError("last argument must be a function");n.forEach(function(t){this.hasHandler(t)||(this.events[t]=[]),this.events[t].push(e)},this)},t.EventEmitter.prototype.removeListener=function(t,e){if(this.hasHandler(t)){var n=this.events[t].indexOf(e);this.events[t].splice(n,1),this.events[t].length||delete this.events[t]}},t.EventEmitter.prototype.emit=function(t){if(this.hasHandler(t)){var e=Array.prototype.slice.call(arguments,1);this.events[t].forEach(function(t){t.apply(void 0,e)})}},t.EventEmitter.prototype.hasHandler=function(t){return t in this.events},t.tokenizer=function(e){return arguments.length&&null!=e&&void 0!=e?Array.isArray(e)?e.map(function(e){return t.utils.asString(e).toLowerCase()}):e.toString().trim().toLowerCase().split(t.tokenizer.seperator):[]},t.tokenizer.seperator=/[\s\-]+/,t.Pipeline=function(){this._stack=[]},t.Pipeline.registeredFunctions={},t.Pipeline.registerFunction=function(e,n){n in this.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[e.label]=e},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(e){var i=t.Pipeline.registeredFunctions[e];if(!i)throw new Error("Cannot load un-registered function: "+e);n.add(i)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(e){t.Pipeline.warnIfFunctionNotRegistered(e),this._stack.push(e)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var i=this._stack.indexOf(e);if(-1==i)throw new Error("Cannot find existingFn");i+=1,this._stack.splice(i,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var i=this._stack.indexOf(e);if(-1==i)throw new Error("Cannot find existingFn");this._stack.splice(i,0,n)},t.Pipeline.prototype.remove=function(t){var e=this._stack.indexOf(t);-1!=e&&this._stack.splice(e,1)},t.Pipeline.prototype.run=function(t){for(var e=[],n=t.length,i=this._stack.length,r=0;n>r;r++){for(var o=t[r],s=0;i>s&&(o=this._stack[s](o,r,t),void 0!==o&&""!==o);s++);void 0!==o&&""!==o&&e.push(o)}return e},t.Pipeline.prototype.reset=function(){this._stack=[]},t.Pipeline.prototype.toJSON=function(){return this._stack.map(function(e){return t.Pipeline.warnIfFunctionNotRegistered(e),e.label})},t.Vector=function(){this._magnitude=null,this.list=void 0,this.length=0},t.Vector.Node=function(t,e,n){this.idx=t,this.val=e,this.next=n},t.Vector.prototype.insert=function(e,n){this._magnitude=void 0;var i=this.list;if(!i)return this.list=new t.Vector.Node(e,n,i),this.length++;if(e<i.idx)return this.list=new t.Vector.Node(e,n,i),this.length++;for(var r=i,o=i.next;void 0!=o;){if(e<o.idx)return r.next=new t.Vector.Node(e,n,o),this.length++;r=o,o=o.next}return r.next=new t.Vector.Node(e,n,o),this.length++},t.Vector.prototype.magnitude=function(){if(this._magnitude)return this._magnitude;for(var t,e=this.list,n=0;e;)t=e.val,n+=t*t,e=e.next;return this._magnitude=Math.sqrt(n)},t.Vector.prototype.dot=function(t){for(var e=this.list,n=t.list,i=0;e&&n;)e.idx<n.idx?e=e.next:e.idx>n.idx?n=n.next:(i+=e.val*n.val,e=e.next,n=n.next);return i},t.Vector.prototype.similarity=function(t){return this.dot(t)/(this.magnitude()*t.magnitude())},t.SortedSet=function(){this.length=0,this.elements=[]},t.SortedSet.load=function(t){var e=new this;return e.elements=t,e.length=t.length,e},t.SortedSet.prototype.add=function(){var t,e;for(t=0;t<arguments.length;t++)e=arguments[t],~this.indexOf(e)||this.elements.splice(this.locationFor(e),0,e);this.length=this.elements.length},t.SortedSet.prototype.toArray=function(){return this.elements.slice()},t.SortedSet.prototype.map=function(t,e){return this.elements.map(t,e)},t.SortedSet.prototype.forEach=function(t,e){return this.elements.forEach(t,e)},t.SortedSet.prototype.indexOf=function(t){for(var e=0,n=this.elements.length,i=n-e,r=e+Math.floor(i/2),o=this.elements[r];i>1;){if(o===t)return r;t>o&&(e=r),o>t&&(n=r),i=n-e,r=e+Math.floor(i/2),o=this.elements[r]}return o===t?r:-1},t.SortedSet.prototype.locationFor=function(t){for(var e=0,n=this.elements.length,i=n-e,r=e+Math.floor(i/2),o=this.elements[r];i>1;)t>o&&(e=r),o>t&&(n=r),i=n-e,r=e+Math.floor(i/2),o=this.elements[r];return o>t?r:t>o?r+1:void 0},t.SortedSet.prototype.intersect=function(e){for(var n=new t.SortedSet,i=0,r=0,o=this.length,s=e.length,a=this.elements,h=e.elements;;){if(i>o-1||r>s-1)break;a[i]!==h[r]?a[i]<h[r]?i++:a[i]>h[r]&&r++:(n.add(a[i]),i++,r++)}return n},t.SortedSet.prototype.clone=function(){var e=new t.SortedSet;return e.elements=this.toArray(),e.length=e.elements.length,e},t.SortedSet.prototype.union=function(t){var e,n,i;return this.length>=t.length?(e=this,n=t):(e=t,n=this),i=e.clone(),i.add.apply(i,n.toArray()),i},t.SortedSet.prototype.toJSON=function(){return this.toArray()},t.Index=function(){this._fields=[],this._ref="id",this.pipeline=new t.Pipeline,this.documentStore=new t.Store,this.tokenStore=new t.TokenStore,this.corpusTokens=new t.SortedSet,this.eventEmitter=new t.EventEmitter,this._idfCache={},this.on("add","remove","update",function(){this._idfCache={}}.bind(this))},t.Index.prototype.on=function(){var t=Array.prototype.slice.call(arguments);return this.eventEmitter.addListener.apply(this.eventEmitter,t)},t.Index.prototype.off=function(t,e){return this.eventEmitter.removeListener(t,e)},t.Index.load=function(e){e.version!==t.version&&t.utils.warn("version mismatch: current "+t.version+" importing "+e.version);var n=new this;return n._fields=e.fields,n._ref=e.ref,n.documentStore=t.Store.load(e.documentStore),n.tokenStore=t.TokenStore.load(e.tokenStore),n.corpusTokens=t.SortedSet.load(e.corpusTokens),n.pipeline=t.Pipeline.load(e.pipeline),n},t.Index.prototype.field=function(t,e){var e=e||{},n={name:t,boost:e.boost||1};return this._fields.push(n),this},t.Index.prototype.ref=function(t){return this._ref=t,this},t.Index.prototype.add=function(e,n){var i={},r=new t.SortedSet,o=e[this._ref],n=void 0===n?!0:n;this._fields.forEach(function(n){var o=this.pipeline.run(t.tokenizer(e[n.name]));i[n.name]=o,t.SortedSet.prototype.add.apply(r,o)},this),this.documentStore.set(o,r),t.SortedSet.prototype.add.apply(this.corpusTokens,r.toArray());for(var s=0;s<r.length;s++){var a=r.elements[s],h=this._fields.reduce(function(t,e){var n=i[e.name].length;if(!n)return t;var r=i[e.name].filter(function(t){return t===a}).length;return t+r/n*e.boost},0);this.tokenStore.add(a,{ref:o,tf:h})}n&&this.eventEmitter.emit("add",e,this)},t.Index.prototype.remove=function(t,e){var n=t[this._ref],e=void 0===e?!0:e;if(this.documentStore.has(n)){var i=this.documentStore.get(n);this.documentStore.remove(n),i.forEach(function(t){this.tokenStore.remove(t,n)},this),e&&this.eventEmitter.emit("remove",t,this)}},t.Index.prototype.update=function(t,e){var e=void 0===e?!0:e;this.remove(t,!1),this.add(t,!1),e&&this.eventEmitter.emit("update",t,this)},t.Index.prototype.idf=function(t){var e="@"+t;if(Object.prototype.hasOwnProperty.call(this._idfCache,e))return this._idfCache[e];var n=this.tokenStore.count(t),i=1;return n>0&&(i=1+Math.log(this.documentStore.length/n)),this._idfCache[e]=i},t.Index.prototype.search=function(e){var n=this.pipeline.run(t.tokenizer(e)),i=new t.Vector,r=[],o=this._fields.reduce(function(t,e){return t+e.boost},0),s=n.some(function(t){return this.tokenStore.has(t)},this);if(!s)return[];n.forEach(function(e,n,s){var a=1/s.length*this._fields.length*o,h=this,u=this.tokenStore.expand(e).reduce(function(n,r){var o=h.corpusTokens.indexOf(r),s=h.idf(r),u=1,l=new t.SortedSet;if(r!==e){var c=Math.max(3,r.length-e.length);u=1/Math.log(c)}o>-1&&i.insert(o,a*s*u);for(var f=h.tokenStore.get(r),p=Object.keys(f),d=p.length,v=0;d>v;v++)l.add(f[p[v]].ref);return n.union(l)},new t.SortedSet);r.push(u)},this);var a=r.reduce(function(t,e){return t.intersect(e)});return a.map(function(t){return{ref:t,score:i.similarity(this.documentVector(t))}},this).sort(function(t,e){return e.score-t.score})},t.Index.prototype.documentVector=function(e){for(var n=this.documentStore.get(e),i=n.length,r=new t.Vector,o=0;i>o;o++){var s=n.elements[o],a=this.tokenStore.get(s)[e].tf,h=this.idf(s);r.insert(this.corpusTokens.indexOf(s),a*h)}return r},t.Index.prototype.toJSON=function(){return{version:t.version,fields:this._fields,ref:this._ref,documentStore:this.documentStore.toJSON(),tokenStore:this.tokenStore.toJSON(),corpusTokens:this.corpusTokens.toJSON(),pipeline:this.pipeline.toJSON()}},t.Index.prototype.use=function(t){var e=Array.prototype.slice.call(arguments,1);e.unshift(this),t.apply(this,e)},t.Store=function(){this.store={},this.length=0},t.Store.load=function(e){var n=new this;return n.length=e.length,n.store=Object.keys(e.store).reduce(function(n,i){return n[i]=t.SortedSet.load(e.store[i]),n},{}),n},t.Store.prototype.set=function(t,e){this.has(t)||this.length++,this.store[t]=e},t.Store.prototype.get=function(t){return this.store[t]},t.Store.prototype.has=function(t){return t in this.store},t.Store.prototype.remove=function(t){this.has(t)&&(delete this.store[t],this.length--)},t.Store.prototype.toJSON=function(){return{store:this.store,length:this.length}},t.stemmer=function(){var t={ational:"ate",tional:"tion",enci:"ence",anci:"ance",izer:"ize",bli:"ble",alli:"al",entli:"ent",eli:"e",ousli:"ous",ization:"ize",ation:"ate",ator:"ate",alism:"al",iveness:"ive",fulness:"ful",ousness:"ous",aliti:"al",iviti:"ive",biliti:"ble",logi:"log"},e={icate:"ic",ative:"",alize:"al",iciti:"ic",ical:"ic",ful:"",ness:""},n="[^aeiou]",i="[aeiouy]",r=n+"[^aeiouy]*",o=i+"[aeiou]*",s="^("+r+")?"+o+r,a="^("+r+")?"+o+r+"("+o+")?$",h="^("+r+")?"+o+r+o+r,u="^("+r+")?"+i,l=new RegExp(s),c=new RegExp(h),f=new RegExp(a),p=new RegExp(u),d=/^(.+?)(ss|i)es$/,v=/^(.+?)([^s])s$/,m=/^(.+?)eed$/,g=/^(.+?)(ed|ing)$/,y=/.$/,S=/(at|bl|iz)$/,w=new RegExp("([^aeiouylsz])\\1$"),x=new RegExp("^"+r+i+"[^aeiouwxy]$"),k=/^(.+?[^aeiou])y$/,b=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,E=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,_=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,F=/^(.+?)(s|t)(ion)$/,O=/^(.+?)e$/,P=/ll$/,N=new RegExp("^"+r+i+"[^aeiouwxy]$"),T=function(n){var i,r,o,s,a,h,u;if(n.length<3)return n;if(o=n.substr(0,1),"y"==o&&(n=o.toUpperCase()+n.substr(1)),s=d,a=v,s.test(n)?n=n.replace(s,"$1$2"):a.test(n)&&(n=n.replace(a,"$1$2")),s=m,a=g,s.test(n)){var T=s.exec(n);s=l,s.test(T[1])&&(s=y,n=n.replace(s,""))}else if(a.test(n)){var T=a.exec(n);i=T[1],a=p,a.test(i)&&(n=i,a=S,h=w,u=x,a.test(n)?n+="e":h.test(n)?(s=y,n=n.replace(s,"")):u.test(n)&&(n+="e"))}if(s=k,s.test(n)){var T=s.exec(n);i=T[1],n=i+"i"}if(s=b,s.test(n)){var T=s.exec(n);i=T[1],r=T[2],s=l,s.test(i)&&(n=i+t[r])}if(s=E,s.test(n)){var T=s.exec(n);i=T[1],r=T[2],s=l,s.test(i)&&(n=i+e[r])}if(s=_,a=F,s.test(n)){var T=s.exec(n);i=T[1],s=c,s.test(i)&&(n=i)}else if(a.test(n)){var T=a.exec(n);i=T[1]+T[2],a=c,a.test(i)&&(n=i)}if(s=O,s.test(n)){var T=s.exec(n);i=T[1],s=c,a=f,h=N,(s.test(i)||a.test(i)&&!h.test(i))&&(n=i)}return s=P,a=c,s.test(n)&&a.test(n)&&(s=y,n=n.replace(s,"")),"y"==o&&(n=o.toLowerCase()+n.substr(1)),n};return T}(),t.Pipeline.registerFunction(t.stemmer,"stemmer"),t.generateStopWordFilter=function(t){var e=t.reduce(function(t,e){return t[e]=e,t},{});return function(t){return t&&e[t]!==t?t:void 0}},t.stopWordFilter=t.generateStopWordFilter(["a","able","about","across","after","all","almost","also","am","among","an","and","any","are","as","at","be","because","been","but","by","can","cannot","could","dear","did","do","does","either","else","ever","every","for","from","get","got","had","has","have","he","her","hers","him","his","how","however","i","if","in","into","is","it","its","just","least","let","like","likely","may","me","might","most","must","my","neither","no","nor","not","of","off","often","on","only","or","other","our","own","rather","said","say","says","she","should","since","so","some","than","that","the","their","them","then","there","these","they","this","tis","to","too","twas","us","wants","was","we","were","what","when","where","which","while","who","whom","why","will","with","would","yet","you","your"]),t.Pipeline.registerFunction(t.stopWordFilter,"stopWordFilter"),t.trimmer=function(t){return t.replace(/^\W+/,"").replace(/\W+$/,"")},t.Pipeline.registerFunction(t.trimmer,"trimmer"),t.TokenStore=function(){this.root={docs:{}},this.length=0},t.TokenStore.load=function(t){var e=new this;return e.root=t.root,e.length=t.length,e},t.TokenStore.prototype.add=function(t,e,n){var n=n||this.root,i=t.charAt(0),r=t.slice(1);return i in n||(n[i]={docs:{}}),0===r.length?(n[i].docs[e.ref]=e,void(this.length+=1)):this.add(r,e,n[i])},t.TokenStore.prototype.has=function(t){if(!t)return!1;for(var e=this.root,n=0;n<t.length;n++){if(!e[t.charAt(n)])return!1;e=e[t.charAt(n)]}return!0},t.TokenStore.prototype.getNode=function(t){if(!t)return{};for(var e=this.root,n=0;n<t.length;n++){if(!e[t.charAt(n)])return{};e=e[t.charAt(n)]}return e},t.TokenStore.prototype.get=function(t,e){return this.getNode(t,e).docs||{}},t.TokenStore.prototype.count=function(t,e){return Object.keys(this.get(t,e)).length},t.TokenStore.prototype.remove=function(t,e){if(t){for(var n=this.root,i=0;i<t.length;i++){if(!(t.charAt(i)in n))return;n=n[t.charAt(i)]}delete n.docs[e]}},t.TokenStore.prototype.expand=function(t,e){var n=this.getNode(t),i=n.docs||{},e=e||[];return Object.keys(i).length&&e.push(t),Object.keys(n).forEach(function(n){"docs"!==n&&e.concat(this.expand(t+n,e))},this),e},t.TokenStore.prototype.toJSON=function(){return{root:this.root,length:this.length}},function(t,e){"function"==typeof define&&define.amd?define(e):"object"==typeof exports?module.exports=e():t.lunr=e()}(this,function(){return t})}();
|
20
|
+
|
21
|
+
},{}],7:[function(require,module,exports){
|
22
|
+
"use strict";function fetchIndex(e){return new Promise(function(n,r){var t=new XMLHttpRequest,o=e+"/search-index.json";t.addEventListener("load",function(){var e;try{e=JSON.parse(this.responseText),n({urlToDoc:e.urlToDoc,index:lunr.Index.load(e.index)})}catch(t){r(new Error("failed to parse "+o))}}),t.open("GET",o),t.send()})}function parseSearchQuery(e){return querystring.parse(url.parse(e).query).q}function getResults(e,n){var r=n.index.search(e);return r.forEach(function(e){var r=n.urlToDoc[e.ref];Object.keys(r).forEach(function(n){e[n]=r[n]})}),r}function writeResults(e,n,r,t,o){e&&(r.value=e),o.forEach(function(e,r){var o=n.createElement("li"),u=n.createElement("a"),i=n.createTextNode(e.title);u.appendChild(i),u.title=e.title,u.href=e.url,o.appendChild(u),t.appendChild(o),u.tabindex=r,0===r&&u.focus()})}function SearchUi(e,n){var r=function(e){return 191===e},t=function(e){return"input"===e.tagName.toLowerCase()},o=function(){n.focus()},u=function(n){r(n.keyCode)&&!t(e.activeElement)&&(n.stopPropagation(),n.preventDefault(),o())};this.enableGlobalShortcut=function(){e.body.onkeydown=u}}var lunr=require("lunr"),querystring=require("querystring"),url=require("url"),SEARCH_INPUT_ID="search-input",SEARCH_RESULTS_ID="search-results";module.exports=function(){var e=window.document,n=e.getElementById(SEARCH_INPUT_ID),r=new SearchUi(e,n),t=e.getElementById(SEARCH_RESULTS_ID);return r.enableGlobalShortcut(),t?fetchIndex(window.SEARCH_BASEURL).then(function(r){var o=parseSearchQuery(window.location.href),u=getResults(o,r);writeResults(o,e,n,t,u)})["catch"](function(e){console.error(e)}):void 0}();
|
23
|
+
},{"lunr":6,"querystring":4,"url":5}]},{},[7]);
|
Binary file
|
data/assets/js/search.js
CHANGED
@@ -1,96 +1,122 @@
|
|
1
|
+
/* jshint node: true */
|
2
|
+
|
1
3
|
'use strict';
|
2
4
|
|
3
|
-
var angular = require('angular');
|
4
5
|
var lunr = require('lunr');
|
5
|
-
var
|
6
|
-
var
|
6
|
+
var querystring = require('querystring');
|
7
|
+
var url = require('url');
|
7
8
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
9
|
+
var SEARCH_INPUT_ID = 'search-input';
|
10
|
+
var SEARCH_RESULTS_ID = 'search-results';
|
11
|
+
|
12
|
+
function fetchIndex(baseUrl) {
|
13
|
+
return new Promise(function(resolve, reject) {
|
14
|
+
var req = new XMLHttpRequest(),
|
15
|
+
indexUrl = baseUrl + '/search-index.json';
|
16
|
+
|
17
|
+
req.addEventListener('load', function() {
|
18
|
+
var rawJson;
|
13
19
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
20
|
+
try {
|
21
|
+
rawJson = JSON.parse(this.responseText);
|
22
|
+
resolve({
|
23
|
+
urlToDoc: rawJson.urlToDoc,
|
24
|
+
index: lunr.Index.load(rawJson.index)
|
25
|
+
});
|
26
|
+
} catch (err) {
|
27
|
+
reject(new Error('failed to parse ' + indexUrl));
|
28
|
+
}
|
29
|
+
});
|
30
|
+
req.open('GET', indexUrl);
|
31
|
+
req.send();
|
19
32
|
});
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
33
|
+
}
|
34
|
+
|
35
|
+
function parseSearchQuery(queryUrl) {
|
36
|
+
return querystring.parse(url.parse(queryUrl).query).q;
|
37
|
+
}
|
38
|
+
|
39
|
+
function getResults(query, searchIndex) {
|
40
|
+
var results = searchIndex.index.search(query);
|
41
|
+
|
42
|
+
results.forEach(function(result) {
|
43
|
+
var urlAndTitle = searchIndex.urlToDoc[result.ref];
|
44
|
+
|
45
|
+
Object.keys(urlAndTitle).forEach(function(key) {
|
46
|
+
result[key] = urlAndTitle[key];
|
31
47
|
});
|
32
|
-
|
33
|
-
|
34
|
-
}
|
48
|
+
});
|
49
|
+
return results;
|
50
|
+
}
|
51
|
+
|
52
|
+
function writeResults(searchQuery, doc, searchBox, resultsList, results) {
|
53
|
+
if (searchQuery) {
|
54
|
+
searchBox.value = searchQuery;
|
55
|
+
}
|
56
|
+
results.forEach(function(result, index) {
|
57
|
+
var item = doc.createElement('li'),
|
58
|
+
link = doc.createElement('a'),
|
59
|
+
text = doc.createTextNode(result.title);
|
60
|
+
|
61
|
+
link.appendChild(text);
|
62
|
+
link.title = result.title;
|
63
|
+
link.href = result.url;
|
64
|
+
item.appendChild(link);
|
65
|
+
resultsList.appendChild(item);
|
66
|
+
|
67
|
+
link.tabindex = index;
|
68
|
+
if (index === 0) {
|
69
|
+
link.focus();
|
70
|
+
}
|
71
|
+
});
|
72
|
+
}
|
35
73
|
|
36
74
|
// based on https://github.com/angular/angular.js/blob/54ddca537/docs/app/src/search.js#L198-L206
|
37
|
-
|
75
|
+
function SearchUi(doc, inputElement) {
|
38
76
|
var isForwardSlash = function(keyCode) {
|
39
77
|
return keyCode === 191;
|
40
78
|
};
|
41
79
|
|
42
80
|
var isInput = function(el) {
|
43
|
-
|
44
|
-
return tagName === 'input';
|
81
|
+
return el.tagName.toLowerCase() === 'input';
|
45
82
|
};
|
46
83
|
|
47
84
|
var giveSearchFocus = function() {
|
48
|
-
|
49
|
-
input.focus();
|
85
|
+
inputElement.focus();
|
50
86
|
};
|
51
87
|
|
52
88
|
var onKeyDown = function(event) {
|
53
|
-
if (isForwardSlash(event.keyCode) && !isInput(
|
89
|
+
if (isForwardSlash(event.keyCode) && !isInput(doc.activeElement)) {
|
54
90
|
event.stopPropagation();
|
55
91
|
event.preventDefault();
|
56
92
|
giveSearchFocus();
|
57
93
|
}
|
58
94
|
};
|
59
95
|
|
60
|
-
|
61
|
-
|
62
|
-
angular.element($document[0].body).on('keydown', onKeyDown);
|
63
|
-
},
|
64
|
-
|
65
|
-
getSelectedResult: function() {
|
66
|
-
// TODO find a less hacky way to retrieve this
|
67
|
-
var selectionScope = angular.element('.searchresultspopup').scope();
|
68
|
-
var resultIndex = selectionScope.selectedIndex;
|
69
|
-
return selectionScope.results[resultIndex];
|
70
|
-
}
|
96
|
+
this.enableGlobalShortcut = function() {
|
97
|
+
doc.body.onkeydown = onKeyDown;
|
71
98
|
};
|
72
|
-
}
|
99
|
+
}
|
100
|
+
|
101
|
+
module.exports = function() {
|
102
|
+
var doc = window.document,
|
103
|
+
inputElement = doc.getElementById(SEARCH_INPUT_ID),
|
104
|
+
searchUi = new SearchUi(doc, inputElement),
|
105
|
+
resultsElement = doc.getElementById(SEARCH_RESULTS_ID);
|
73
106
|
|
74
|
-
ngHub.controller('SearchController', ["$scope", "$q", "searchUi", "pagesSearch", function($scope, $q, searchUi, pagesSearch) {
|
75
107
|
searchUi.enableGlobalShortcut();
|
76
108
|
|
77
|
-
|
78
|
-
return
|
109
|
+
if (!resultsElement) {
|
110
|
+
return;
|
79
111
|
}
|
80
112
|
|
81
|
-
|
82
|
-
|
83
|
-
var
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
defer.resolve(results);
|
92
|
-
return defer.promise;
|
93
|
-
};
|
94
|
-
}]);
|
95
|
-
|
96
|
-
angular.bootstrap(document.documentElement, ["hubSearch"]);
|
113
|
+
return fetchIndex(window.SEARCH_BASEURL)
|
114
|
+
.then(function(searchIndex) {
|
115
|
+
var query = parseSearchQuery(window.location.href),
|
116
|
+
results = getResults(query, searchIndex);
|
117
|
+
writeResults(query, doc, inputElement, resultsElement, results);
|
118
|
+
})
|
119
|
+
.catch(function(error) {
|
120
|
+
console.error(error);
|
121
|
+
});
|
122
|
+
}();
|