file_name
stringlengths 3
137
| prefix
stringlengths 0
918k
| suffix
stringlengths 0
962k
| middle
stringlengths 0
812k
|
---|---|---|---|
bigip.py | """
A state module designed to enforce load-balancing configurations for F5 Big-IP entities.
:maturity: develop
:platform: f5_bigip_11.6
"""
import salt.utils.json
# set up virtual function
def __virtual__():
"""
Only load if the bigip exec module is available in __salt__
"""
if "bigip.list_transaction" in __salt__:
return "bigip"
return (False, "bigip module could not be loaded")
def _load_result(response, ret):
"""
format the results of listing functions
"""
# were we able to connect?
if response["code"] is None:
ret["comment"] = response["content"]
# forbidden?
elif response["code"] == 401:
ret["comment"] = "401 Forbidden: Authentication required!"
# Not found?
elif response["code"] == 404:
ret["comment"] = response["content"]["message"]
# 200?
elif response["code"] == 200:
ret["result"] = True
ret["comment"] = (
"Listing Current Configuration Only. "
"Not action or changes occurred during the execution of this state."
)
ret["changes"] = response["content"]
# something bad
else:
ret["comment"] = response["content"]["message"]
return ret
def _strip_key(dictionary, keyword):
"""
look for a certain key within a dictionary and nullify ti's contents, check within nested
dictionaries and lists as well. Certain attributes such as "generation" will change even
when there were no changes made to the entity.
"""
for key, value in dictionary.items():
if key == keyword:
dictionary[key] = None
elif isinstance(value, dict):
_strip_key(value, keyword)
elif isinstance(value, list):
for item in value:
if isinstance(item, dict):
_strip_key(item, keyword)
return dictionary
def _check_for_changes(entity_type, ret, existing, modified):
"""
take an existing entity and a modified entity and check for changes.
"""
ret["result"] = True
# were there any changes? generation always changes, remove it.
if isinstance(existing, dict) and isinstance(modified, dict):
if "generation" in modified["content"].keys():
del modified["content"]["generation"]
if "generation" in existing["content"].keys():
del existing["content"]["generation"]
if modified["content"] == existing["content"]:
ret[
"comment"
] = "{entity_type} is currently enforced to the desired state. No changes made.".format(
entity_type=entity_type
)
else:
ret["comment"] = (
"{entity_type} was enforced to the desired state. Note: Only parameters specified "
"were enforced. See changes for details.".format(
entity_type=entity_type
)
)
ret["changes"]["old"] = existing["content"]
ret["changes"]["new"] = modified["content"]
else:
if modified == existing:
ret[
"comment"
] = "{entity_type} is currently enforced to the desired state. No changes made.".format(
entity_type=entity_type
)
else:
ret["comment"] = (
"{entity_type} was enforced to the desired state. Note: Only parameters specified "
"were enforced. See changes for details.".format(
entity_type=entity_type
)
)
ret["changes"]["old"] = existing
ret["changes"]["new"] = modified
return ret
def _test_output(ret, action, params):
"""
For testing just output what the state will attempt to do without actually doing it.
"""
if action == "list":
ret[
"comment"
] += "The list action will just list an entity and will make no changes.\n"
elif action == "create" or action == "add":
ret[
"comment"
] += "The create action will attempt to create an entity if it does not already exist.\n"
elif action == "delete":
ret[
"comment"
] += "The delete action will attempt to delete an existing entity if it exists.\n"
elif action == "manage":
ret["comment"] += (
"The manage action will create a new entity if it does not exist. If it does exist, it will be enforced"
"to the desired state.\n"
)
elif action == "modify":
ret[
"comment"
] += "The modify action will attempt to modify an existing entity only if it exists.\n"
ret["comment"] += "An iControl REST Request will be made using the parameters:\n"
ret["comment"] += salt.utils.json.dumps(params, indent=4)
ret["changes"] = {}
# Return ``None`` when running with ``test=true``.
ret["result"] = None
return ret
def list_node(hostname, username, password, name):
"""
A function to connect to a bigip device and list a specific node.
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iControl REST password
name
The name of the node to list.
"""
ret = {"name": name, "changes": {}, "result": False, "comment": ""}
if __opts__["test"]:
return _test_output(
ret,
"list",
params={
"hostname": hostname,
"username": username,
"password": password,
"name": name,
},
)
response = __salt__["bigip.list_node"](hostname, username, password, name)
return _load_result(response, ret)
def create_node(hostname, username, password, name, address):
"""
Create a new node if it does not already exist.
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iControl REST password
name
The name of the node to create
address
The address of the node
"""
ret = {"name": name, "changes": {}, "result": False, "comment": ""}
if __opts__["test"]:
return _test_output(
ret,
"create",
params={
"hostname": hostname,
"username": username,
"password": password,
"name": name,
"address": address,
},
)
# is this node currently configured?
existing = __salt__["bigip.list_node"](hostname, username, password, name)
# if it exists
if existing["code"] == 200:
ret["result"] = True
ret["comment"] = "A node by this name currently exists. No change made."
# if it doesn't exist
elif existing["code"] == 404:
response = __salt__["bigip.create_node"](
hostname, username, password, name, address
)
ret["result"] = True
ret["changes"]["old"] = {}
ret["changes"]["new"] = response["content"]
ret["comment"] = "Node was successfully created."
# else something else was returned
else:
ret = _load_result(existing, ret)
return ret
def manage_node(
hostname,
username,
password,
name,
address,
connection_limit=None,
description=None,
dynamic_ratio=None,
logging=None,
monitor=None,
rate_limit=None,
ratio=None,
session=None,
node_state=None,
):
"""
Manages a node of a given bigip device. If the node does not exist it will be created, otherwise,
only the properties which are different than the existing will be updated.
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iControl REST password
name
The name of the node to manage.
address
The address of the node
connection_limit
[integer]
description
[string]
dynam
c_ratio: [integer]
logging
[enabled | disabled]
monitor
[[name] | none | default]
rate_limit
[integer]
ratio
[integer]
session
[user-enabled | user-disabled]
node_state (state)
[user-down | user-up ]
"""
ret = {"name": name, "changes": {}, "result": False, "comment": ""}
if __opts__["test"]:
return _test_output(
ret,
"manage",
params={
"hostname": hostname,
"username": username,
"password": password,
"name": name,
"address": address,
"connection_limit": connection_limit,
"description": description,
"dynamic_ratio": dynamic_ratio,
"logging": logging,
"monitor": monitor,
"rate_limit": rate_limit,
"ratio": ratio,
"session": session,
"state:": node_state,
},
)
# is this node currently configured?
existing = __salt__["bigip.list_node"](hostname, username, password, name)
# if it exists by name
if existing["code"] == 200:
# ensure the address is the same, we don't want to modify a different node than what
# we think we are managing
if existing["content"]["address"] != address:
ret["result"] = False
ret[
"comment"
] = "A node with this name exists but the address does not match."
modified = __salt__["bigip.modify_node"](
hostname=hostname,
username=username,
password=password,
name=name,
connection_limit=connection_limit,
description=description,
dynamic_ratio=dynamic_ratio,
logging=logging,
monitor=monitor,
rate_limit=rate_limit,
ratio=ratio,
session=session,
state=node_state,
)
# was the modification successful?
if modified["code"] == 200:
ret = _check_for_changes("Node", ret, existing, modified)
else:
ret = _load_result(modified, ret)
# not found, attempt to create it
elif existing["code"] == 404:
new = __salt__["bigip.create_node"](hostname, username, password, name, address)
# were we able to create it?
if new["code"] == 200:
# try modification
modified = __salt__["bigip.modify_node"](
hostname=hostname,
username=username,
password=password,
name=name,
connection_limit=connection_limit,
description=description,
dynamic_ratio=dynamic_ratio,
logging=logging,
monitor=monitor,
rate_limit=rate_limit,
ratio=ratio,
session=session,
state=node_state,
)
# was the modification successful?
if modified["code"] == 200:
ret["result"] = True
ret["comment"] = (
"Node was created and enforced to the desired state. Note: Only parameters specified "
"were enforced. See changes for details."
)
ret["changes"]["old"] = {}
ret["changes"]["new"] = modified["content"]
# roll it back
else:
deleted = __salt__["bigip.delete_node"](
hostname, username, password, name
)
# did we get rid of it?
if deleted["code"] == 200:
ret["comment"] = (
"Node was successfully created but an error occurred during modification. "
"The creation of the node has been rolled back. Message is as follows:\n"
"{message}".format(message=modified["content"]["message"])
)
# something bad happened
else:
ret["comment"] = (
"Node was successfully created but an error occurred during modification. "
"The creation of the node was not able to be rolled back. Message is as follows:"
"\n {message}\n{message_two}".format(
message=modified["content"]["message"],
message_two=deleted["content"]["message"],
)
)
# unable to create it
else:
ret = _load_result(new, ret)
# an error occurred
else:
ret = _load_result(existing, ret)
return ret
def modify_node(
hostname,
username,
password,
name,
connection_limit=None,
description=None,
dynamic_ratio=None,
logging=None,
monitor=None,
rate_limit=None,
ratio=None,
session=None,
node_state=None,
):
"""
Modify an existing node. Only a node which already exists will be modified and
only the parameters specified will be enforced.
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iControl REST password
name
The name of the node to modify
connection_limit
[integer]
description
[string]
dynamic_ratio
[integer]
logging
[enabled | disabled]
monitor
[[name] | none | default]
rate_limit
[integer]
ratio
[integer]
session
[user-enabled | user-disabled]
node_state (state)
[user-down | user-up ]
"""
ret = {"name": name, "changes": {}, "result": False, "comment": ""}
if __opts__["test"]:
return _test_output(
ret,
"modify",
params={
"hostname": hostname,
"username": username,
"password": password,
"name": name,
"connection_limit": connection_limit,
"description": description,
"dynamic_ratio": dynamic_ratio,
"logging": logging,
"monitor": monitor,
"rate_limit": rate_limit,
"ratio": ratio,
"session": session,
"state:": node_state,
},
)
# is this node currently configured?
existing = __salt__["bigip.list_node"](hostname, username, password, name)
# if it exists by name
if existing["code"] == 200:
modified = __salt__["bigip.modify_node"](
hostname=hostname,
username=username,
password=password,
name=name,
connection_limit=connection_limit,
description=description,
dynamic_ratio=dynamic_ratio,
logging=logging,
monitor=monitor,
rate_limit=rate_limit,
ratio=ratio,
session=session,
state=node_state,
)
# was the modification successful?
if modified["code"] == 200:
ret = _check_for_changes("Node", ret, existing, modified)
else:
ret = _load_result(modified, ret)
# not found, attempt to create it
elif existing["code"] == 404:
ret["comment"] = "A node with this name was not found."
# an error occurred
else:
ret = _load_result(existing, ret)
return ret
def delete_node(hostname, username, password, name):
"""
Delete an existing node.
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iControl REST password
name
The name of the node which will be deleted.
"""
ret = {"name": name, "changes": {}, "result": False, "comment": ""}
if __opts__["test"]:
return _test_output(
ret,
"delete",
params={
"hostname": hostname,
"username": username,
"password": password,
"name": name,
},
)
# is this node currently configured?
existing = __salt__["bigip.list_node"](hostname, username, password, name)
# if it exists by name
if existing["code"] == 200:
deleted = __salt__["bigip.delete_node"](hostname, username, password, name)
# did we get rid of it?
if deleted["code"] == 200:
ret["result"] = True
ret["comment"] = "Node was successfully deleted."
ret["changes"]["old"] = existing["content"]
ret["changes"]["new"] = {}
# something bad happened
else:
ret = _load_result(existing, ret)
# not found
elif existing["code"] == 404:
ret["result"] = True
ret["comment"] = "This node already does not exist. No changes made."
ret["changes"]["old"] = {}
ret["changes"]["new"] = {}
else:
ret = _load_result(existing, ret)
return ret
def list_pool(hostname, username, password, name):
"""
A function to connect to a bigip device and list a specific pool.
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iControl REST password
name
The name of the pool to list.
"""
ret = {"name": name, "changes": {}, "result": False, "comment": ""}
if __opts__["test"]:
return _test_output(
ret,
"list",
params={
"hostname": hostname,
"username": username,
"password": password,
"name": name,
},
)
response = __salt__["bigip.list_pool"](hostname, username, password, name)
return _load_result(response, ret)
def create_pool(
hostname,
username,
password,
name,
members=None,
allow_nat=None,
allow_snat=None,
description=None,
gateway_failsafe_device=None,
ignore_persisted_weight=None,
ip_tos_to_client=None,
ip_tos_to_server=None,
link_qos_to_client=None,
link_qos_to_server=None,
load_balancing_mode=None,
min_active_members=None,
min_up_members=None,
min_up_members_action=None,
min_up_members_checking=None,
monitor=None,
profiles=None,
queue_depth_limit=None,
queue_on_connection_limit=None,
queue_time_limit=None,
reselect_tries=None,
service_down_action=None,
slow_ramp_time=None,
):
"""
Create a new node if it does not already exist.
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iControl REST password
name
The name of the pool to create
members
List of members to be added to the pool
allow_nat
[yes | no]
allow_snat
[yes | no]
description
[string]
gateway_failsafe_device
[string]
ignore_persisted_weight
[enabled | disabled]
ip_tos_to_client
[pass-through | [integer]]
ip_tos_to_server
[pass-through | [integer]]
link_qos_to_client
[pass-through | [integer]]
link_qos_to_server
[pass-through | [integer]]
load_balancing_mode
[dynamic-ratio-member | dynamic-ratio-node |
fastest-app-response | fastest-node |
least-connections-members |
least-connections-node |
least-sessions |
observed-member | observed-node |
predictive-member | predictive-node |
ratio-least-connections-member |
ratio-least-connections-node |
ratio-member | ratio-node | ratio-session |
round-robin | weighted-least-connections-member |
weighted-least-connections-node]
min_active_members
[integer]
min_up_members
[integer]
min_up_members_action
[failover | reboot | restart-all]
min_up_members_checking
[enabled | disabled]
monitor
[name]
profiles
[none | profile_name]
queue_depth_limit
[integer]
queue_on_connection_limit
[enabled | disabled]
queue_time_limit
[integer]
reselect_tries
[integer]
service_down_action
[drop | none | reselect | reset]
slow_ramp_time
[integer]
"""
ret = {"name": name, "changes": {}, "result": False, "comment": ""}
if __opts__["test"]:
return _test_output(
ret,
"create",
params={
"hostname": hostname,
"username": username,
"password": password,
"name": name,
"members": members,
"allow_nat": allow_nat,
"allow_snat": allow_snat,
"description": description,
"gateway_failsafe_device": gateway_failsafe_device,
"ignore_persisted_weight": ignore_persisted_weight,
"ip_tos_client:": ip_tos_to_client,
"ip_tos_server": ip_tos_to_server,
"link_qos_to_client": link_qos_to_client,
"link_qos_to_server": link_qos_to_server,
"load_balancing_mode": load_balancing_mode,
"min_active_members": min_active_members,
"min_up_members": min_up_members,
"min_up_members_checking": min_up_members_checking,
"monitor": monitor,
"profiles": profiles,
"queue_depth_limit": queue_depth_limit,
"queue_on_connection_limit": queue_on_connection_limit,
"queue_time_limit": queue_time_limit,
"reselect_tries": reselect_tries,
"service_down_action": service_down_action,
"slow_ramp_time": slow_ramp_time,
},
)
# is this pool currently configured?
existing = __salt__["bigip.list_pool"](hostname, username, password, name)
# if it exists
if existing["code"] == 200:
ret["result"] = True
ret["comment"] = "A pool by this name currently exists. No change made."
# if it doesn't exist
elif existing["code"] == 404:
response = __salt__["bigip.create_pool"](
hostname=hostname,
username=username,
password=password,
name=name,
members=members,
allow_nat=allow_nat,
allow_snat=allow_snat,
description=description,
gateway_failsafe_device=gateway_failsafe_device,
ignore_persisted_weight=ignore_persisted_weight,
ip_tos_to_client=ip_tos_to_client,
ip_tos_to_server=ip_tos_to_server,
link_qos_to_client=link_qos_to_client,
link_qos_to_server=link_qos_to_server,
load_balancing_mode=load_balancing_mode,
min_active_members=min_active_members,
min_up_members=min_up_members,
min_up_members_action=min_up_members_action,
min_up_members_checking=min_up_members_checking,
monitor=monitor,
profiles=profiles,
queue_depth_limit=queue_depth_limit,
queue_on_connection_limit=queue_on_connection_limit,
queue_time_limit=queue_time_limit,
reselect_tries=reselect_tries,
service_down_action=service_down_action,
slow_ramp_time=slow_ramp_time,
)
if response["code"] == 200:
ret["result"] = True
ret["changes"]["old"] = {}
ret["changes"]["new"] = response["content"]
ret["comment"] = "Pool was successfully created."
else:
ret = _load_result(existing, ret)
# else something else was returned
else:
ret = _load_result(existing, ret)
return ret
def manage_pool(
hostname,
username,
password,
name,
allow_nat=None,
allow_snat=None,
description=None,
gateway_failsafe_device=None,
ignore_persisted_weight=None,
ip_tos_to_client=None,
ip_tos_to_server=None,
link_qos_to_client=None,
link_qos_to_server=None,
load_balancing_mode=None,
min_active_members=None,
min_up_members=None,
min_up_members_action=None,
min_up_members_checking=None,
monitor=None,
profiles=None,
queue_depth_limit=None,
queue_on_connection_limit=None,
queue_time_limit=None,
reselect_tries=None,
service_down_action=None,
slow_ramp_time=None,
):
"""
Create a new pool if it does not already exist. Pool members are managed separately. Only the
parameters specified are enforced.
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iControl REST password
name
The name of the pool to create
allow_nat
[yes | no]
allow_snat
[yes | no]
description
[string]
gateway_failsafe_device
[string]
ignore_persisted_weight
[enabled | disabled]
ip_tos_to_client
[pass-through | [integer]]
ip_tos_to_server
[pass-through | [integer]]
link_qos_to_client
[pass-through | [integer]]
link_qos_to_server
[pass-through | [integer]]
load_balancing_mode
[dynamic-ratio-member | dynamic-ratio-node |
fastest-app-response | fastest-node |
least-connections-members |
least-connections-node |
least-sessions |
observed-member | observed-node |
predictive-member | predictive-node |
ratio-least-connections-member |
ratio-least-connections-node |
ratio-member | ratio-node | ratio-session |
round-robin | weighted-least-connections-member |
weighted-least-connections-node]
min_active_members
[integer]
min_up_members
[integer]
min_up_members_action
[failover | reboot | restart-all]
min_up_members_checking
[enabled | disabled]
monitor
[name]
profiles
[none | profile_name]
queue_depth_limit
[integer]
queue_on_connection_limit
[enabled | disabled]
queue_time_limit
[integer]
reselect_tries
[integer]
service_down_action
[drop | none | reselect | reset]
slow_ramp_time
[integer]
"""
ret = {"name": name, "changes": {}, "result": False, "comment": ""}
if __opts__["test"]:
return _test_output(
ret,
"manage",
params={
"hostname": hostname,
"username": username,
"password": password,
"name": name,
"allow_nat": allow_nat,
"allow_snat": allow_snat,
"description": description,
"gateway_failsafe_device": gateway_failsafe_device,
"ignore_persisted_weight": ignore_persisted_weight,
"ip_tos_client:": ip_tos_to_client,
"ip_tos_server": ip_tos_to_server,
"link_qos_to_client": link_qos_to_client,
"link_qos_to_server": link_qos_to_server,
"load_balancing_mode": load_balancing_mode,
"min_active_members": min_active_members,
"min_up_members": min_up_members,
"min_up_members_checking": min_up_members_checking,
"monitor": monitor,
"profiles": profiles,
"queue_depth_limit": queue_depth_limit,
"queue_on_connection_limit": queue_on_connection_limit,
"queue_time_limit": queue_time_limit,
"reselect_tries": reselect_tries,
"service_down_action": service_down_action,
"slow_ramp_time": slow_ramp_time,
},
)
# is this pool currently configured?
existing = __salt__["bigip.list_pool"](hostname, username, password, name)
# if it exists
if existing["code"] == 200:
modified = __salt__["bigip.modify_pool"](
hostname=hostname,
username=username,
password=password,
name=name,
allow_nat=allow_nat,
allow_snat=allow_snat,
description=description,
gateway_failsafe_device=gateway_failsafe_device,
ignore_persisted_weight=ignore_persisted_weight,
ip_tos_to_client=ip_tos_to_client,
ip_tos_to_server=ip_tos_to_server,
link_qos_to_client=link_qos_to_client,
link_qos_to_server=link_qos_to_server,
load_balancing_mode=load_balancing_mode,
min_active_members=min_active_members,
min_up_members=min_up_members,
min_up_members_action=min_up_members_action,
min_up_members_checking=min_up_members_checking,
monitor=monitor,
profiles=profiles,
queue_depth_limit=queue_depth_limit,
queue_on_connection_limit=queue_on_connection_limit,
queue_time_limit=queue_time_limit,
reselect_tries=reselect_tries,
service_down_action=service_down_action,
slow_ramp_time=slow_ramp_time,
)
# was the modification successful?
if modified["code"] == 200:
# remove member listings and self-links
del existing["content"]["membersReference"]
del modified["content"]["membersReference"]
del existing["content"]["selfLink"]
del modified["content"]["selfLink"]
ret = _check_for_changes("Pool", ret, existing, modified)
else:
ret = _load_result(modified, ret)
# if it doesn't exist
elif existing["code"] == 404:
new = __salt__["bigip.create_pool"](
hostname=hostname,
username=username,
password=password,
name=name,
allow_nat=allow_nat,
allow_snat=allow_snat,
description=description,
gateway_failsafe_device=gateway_failsafe_device,
ignore_persisted_weight=ignore_persisted_weight,
ip_tos_to_client=ip_tos_to_client,
ip_tos_to_server=ip_tos_to_server,
link_qos_to_client=link_qos_to_client,
link_qos_to_server=link_qos_to_server,
load_balancing_mode=load_balancing_mode,
min_active_members=min_active_members,
min_up_members=min_up_members,
min_up_members_action=min_up_members_action,
min_up_members_checking=min_up_members_checking,
monitor=monitor,
profiles=profiles,
queue_depth_limit=queue_depth_limit,
queue_on_connection_limit=queue_on_connection_limit,
queue_time_limit=queue_time_limit,
reselect_tries=reselect_tries,
service_down_action=service_down_action,
slow_ramp_time=slow_ramp_time,
)
# were we able to create it?
if new["code"] == 200:
ret["result"] = True
ret["comment"] = (
"Pool was created and enforced to the desired state. Note: Only parameters specified "
"were enforced. See changes for details."
)
ret["changes"]["old"] = {}
ret["changes"]["new"] = new["content"]
# unable to create it
else:
ret = _load_result(new, ret)
# else something else was returned
else:
ret = _load_result(existing, ret)
return ret
def modify_pool(
hostname,
username,
password,
name,
allow_nat=None,
allow_snat=None,
description=None,
gateway_failsafe_device=None,
ignore_persisted_weight=None,
ip_tos_to_client=None,
ip_tos_to_server=None,
link_qos_to_client=None,
link_qos_to_server=None,
load_balancing_mode=None,
min_active_members=None,
min_up_members=None,
min_up_members_action=None,
min_up_members_checking=None,
monitor=None,
profiles=None,
queue_depth_limit=None,
queue_on_connection_limit=None,
queue_time_limit=None,
reselect_tries=None,
service_down_action=None,
slow_ramp_time=None,
):
"""
Modify an existing pool. Pool members are managed separately. Only the
parameters specified are enforced.
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iControl REST password
name
The name of the pool to create
allow_nat
[yes | no]
allow_snat
[yes | no]
description
[string]
gateway_failsafe_device
[string]
ignore_persisted_weight
[enabled | disabled]
ip_tos_to_client
[pass-through | [integer]]
ip_tos_to_server
[pass-through | [integer]]
link_qos_to_client
[pass-through | [integer]]
link_qos_to_server
[pass-through | [integer]]
load_balancing_mode
[dynamic-ratio-member | dynamic-ratio-node |
fastest-app-response | fastest-node |
least-connections-members |
least-connections-node |
least-sessions |
observed-member | observed-node |
predictive-member | predictive-node |
ratio-least-connections-member |
ratio-least-connections-node |
ratio-member | ratio-node | ratio-session |
round-robin | weighted-least-connections-member |
weighted-least-connections-node]
min_active_members
[integer]
min_up_members
[integer]
min_up_members_action
[failover | reboot | restart-all]
min_up_members_checking
[enabled | disabled]
monitor
[name]
profiles
[none | profile_name]
queue_depth_limit
[integer]
queue_on_connection_limit
[enabled | disabled]
queue_time_limit
[integer]
reselect_tries
[integer]
service_down_action
[drop | none | reselect | reset]
slow_ramp_time
[integer]
"""
ret = {"name": name, "changes": {}, "result": False, "comment": ""}
if __opts__["test"]:
return _test_output(
ret,
"modify",
params={
"hostname": hostname,
"username": username,
"password": password,
"name": name,
"allow_nat": allow_nat,
"allow_snat": allow_snat,
"description": description,
"gateway_failsafe_device": gateway_failsafe_device,
"ignore_persisted_weight": ignore_persisted_weight,
"ip_tos_client:": ip_tos_to_client,
"ip_tos_server": ip_tos_to_server,
"link_qos_to_client": link_qos_to_client,
"link_qos_to_server": link_qos_to_server,
"load_balancing_mode": load_balancing_mode,
"min_active_members": min_active_members,
"min_up_members": min_up_members,
"min_up_members_checking": min_up_members_checking,
"monitor": monitor,
"profiles": profiles,
"queue_depth_limit": queue_depth_limit,
"queue_on_connection_limit": queue_on_connection_limit,
"queue_time_limit": queue_time_limit,
"reselect_tries": reselect_tries,
"service_down_action": service_down_action,
"slow_ramp_time": slow_ramp_time,
},
)
# is this pool currently configured?
existing = __salt__["bigip.list_pool"](hostname, username, password, name)
# if it exists
if existing["code"] == 200:
modified = __salt__["bigip.modify_pool"](
hostname=hostname,
username=username,
password=password,
name=name,
allow_nat=allow_nat,
allow_snat=allow_snat,
description=description,
gateway_failsafe_device=gateway_failsafe_device,
ignore_persisted_weight=ignore_persisted_weight,
ip_tos_to_client=ip_tos_to_client,
ip_tos_to_server=ip_tos_to_server,
link_qos_to_client=link_qos_to_client,
link_qos_to_server=link_qos_to_server,
load_balancing_mode=load_balancing_mode,
min_active_members=min_active_members,
min_up_members=min_up_members,
min_up_members_action=min_up_members_action,
min_up_members_checking=min_up_members_checking,
monitor=monitor,
profiles=profiles,
queue_depth_limit=queue_depth_limit,
queue_on_connection_limit=queue_on_connection_limit,
queue_time_limit=queue_time_limit,
reselect_tries=reselect_tries,
service_down_action=service_down_action,
slow_ramp_time=slow_ramp_time,
)
# was the modification successful?
if modified["code"] == 200:
# remove member listings and self-links
del existing["content"]["membersReference"]
del modified["content"]["membersReference"]
del existing["content"]["selfLink"]
del modified["content"]["selfLink"]
ret = _check_for_changes("Pool", ret, existing, modified)
else:
ret = _load_result(modified, ret)
# if it doesn't exist
elif existing["code"] == 404:
ret["comment"] = "A pool with this name was not found."
# else something else was returned
else:
ret = _load_result(existing, ret)
return ret
def delete_pool(hostname, username, password, name):
"""
Delete an existing pool.
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iControl REST password
name
The name of the pool which will be deleted
"""
ret = {"name": name, "changes": {}, "result": False, "comment": ""}
if __opts__["test"]:
return _test_output(
ret,
"delete",
params={
"hostname": hostname,
"username": username,
"password": password,
"name": name,
},
)
# is this pool currently configured?
existing = __salt__["bigip.list_pool"](hostname, username, password, name)
# if it exists by name
if existing["code"] == 200:
deleted = __salt__["bigip.delete_pool"](hostname, username, password, name)
# did we get rid of it?
if deleted["code"] == 200:
ret["result"] = True
ret["comment"] = "Pool was successfully deleted."
ret["changes"]["old"] = existing["content"]
ret["changes"]["new"] = {}
# something bad happened
else:
ret = _load_result(deleted, ret)
# not found
elif existing["code"] == 404:
ret["result"] = True
ret["comment"] = "This pool already does not exist. No changes made."
ret["changes"]["old"] = {}
ret["changes"]["new"] = {}
else:
ret = _load_result(existing, ret)
return ret
def manage_pool_members(hostname, username, password, name, members):
"""
Manage the members of an existing pool. This function replaces all current pool members.
Only the parameters specified are enforced.
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iControl REST password
name
The name of the pool to modify
members
list of pool members to manage.
"""
ret = {"name": name, "changes": {}, "result": False, "comment": ""}
if __opts__["test"]:
return _test_output(
ret,
"manage",
params={
"hostname": hostname,
"username": username,
"password": password,
"name": name,
"members": members,
},
)
# is this pool currently configured?
existing = __salt__["bigip.list_pool"](hostname, username, password, name)
# if it exists
if existing["code"] == 200:
# what are the current members?
current_members = existing["content"]["membersReference"]["items"]
modified = __salt__["bigip.replace_pool_members"](
hostname, username, password, name, members
)
# was the modification successful?
if modified["code"] == 200:
# re-list the pool with new membership
new_listing = __salt__["bigip.list_pool"](
hostname, username, password, name
)
# just in case something happened...
if new_listing["code"] != 200:
ret = _load_result(new_listing, ret)
ret["comment"] = (
"modification of the pool was successful but an error occurred upon retrieving new"
" listing."
)
return ret
new_members = new_listing["content"]["membersReference"]["items"]
# remove generation keys and create new lists indexed by integers
for current_member in current_members:
del current_member["generation"]
for new_member in new_members:
del new_member["generation"]
# anything changed?
ret = _check_for_changes(
"Pool Membership", ret, current_members, new_members
)
else:
ret = _load_result(modified, ret)
# pool does not exists
elif existing["code"] == 404:
ret["comment"] = "A pool with this name was not found."
else:
ret = _load_result(existing, ret)
return ret
def add_pool_member(hostname, username, password, name, member):
"""
A function to connect to a bigip device and add a new member to an existing pool.
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iControl REST password
name
The name of the pool to modify
member
The member to add to the pool
"""
ret = {"name": name, "changes": {}, "result": False, "comment": ""}
if __opts__["test"]:
return _test_output(
ret,
"add",
params={
"hostname": hostname,
"username": username,
"password": password,
"name": name,
"members": member,
},
)
# is this pool member currently configured?
existing_pool = __salt__["bigip.list_pool"](hostname, username, password, name)
if existing_pool["code"] == 200:
# for some reason iControl REST doesn't support listing a single pool member.
# the response from GET for listing a member will return 200 even if it doesn't exists.
# because of this we have to do some rather "unnecessary" searching within a pool.
# what are the current members?
current_members = existing_pool["content"]["membersReference"]["items"]
# loop through them
exists = False
for current_member in current_members:
if current_member["name"] == member["name"]:
exists = True
break
if exists:
ret["result"] = True
ret[
"comment"
] = "Member: {name} already exists within this pool. No changes made.".format(
name=member["name"]
)
ret["changes"]["old"] = {}
ret["changes"]["new"] = {}
else:
new_member = __salt__["bigip.add_pool_member"](
hostname, username, password, name, member
)
if new_member["code"] == 200:
ret["result"] = True
ret[
"comment"
] = "Member: {name} has been successfully added to the pool.".format(
name=member["name"]
)
ret["changes"]["old"] = {}
# look up the member again...
pool_listing = __salt__["bigip.list_pool"](
hostname, username, password, name
)
if pool_listing["code"] != 200:
ret = _load_result(new_member, ret)
return ret
members = pool_listing["content"]["membersReference"]["items"]
# loop through them
for current_member in members:
if current_member["name"] == member["name"]:
added_member = current_member
break
ret["changes"]["new"] = added_member
# member wasn't added
else:
ret = _load_result(new_member, ret)
# pool does not exists
elif existing_pool["code"] == 404:
ret["comment"] = "A pool with this name was not found."
else:
ret = _load_result(existing_pool, ret)
return ret
def modify_pool_member(
hostname,
username,
password,
name,
member,
connection_limit=None,
description=None,
dynamic_ratio=None,
inherit_profile=None,
logging=None,
monitor=None,
priority_group=None,
profiles=None,
rate_limit=None,
ratio=None,
session=None,
member_state=None,
):
"""
A function to connect to a bigip device and modify a member of an existing pool.
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iControl REST password
name
The name of the pool to modify
member
The member modify
connection_limit
[integer]
description
[string]
dynamic_ratio
[integer]
inherit_profile
[enabled | disabled]
logging
[enabled | disabled]
monitor
[name]
priority_group
[integer]
profiles
[none | profile_name]
rate_limit
[integer]
ratio
[integer]
session
[user-enabled | user-disabled]
member_state (state)
[ user-up | user-down ]
"""
ret = {"name": name, "changes": {}, "result": False, "comment": ""}
if __opts__["test"]:
return _test_output(
ret,
"modify",
params={
"hostname": hostname,
"username": username,
"password": password,
"name": name,
"members": member,
},
)
# is this pool member currently configured?
existing_pool = __salt__["bigip.list_pool"](hostname, username, password, name)
if existing_pool["code"] == 200:
# for some reason iControl REST doesn't support listing a single pool member.
# the response from GET for listing a member will return 200 even if it doesn't exists.
# because of this we have to do some rather "unnecessary" searching within a pool.
# what are the current members?
current_members = existing_pool["content"]["membersReference"]["items"]
# loop through them
exists = False
for current_member in current_members:
if current_member["name"] == member:
exists = True
existing_member = current_member
break
if exists:
# modify the pool member
modified = __salt__["bigip.modify_pool_member"](
hostname=hostname,
username=username,
password=password,
name=name,
member=member,
connection_limit=connection_limit,
description=description,
dynamic_ratio=dynamic_ratio,
inherit_profile=inherit_profile,
logging=logging,
monitor=monitor,
priority_group=priority_group,
profiles=profiles,
rate_limit=rate_limit,
ratio=ratio,
session=session,
state=member_state,
)
# re-list the pool
new_pool = __salt__["bigip.list_pool"](hostname, username, password, name)
if modified["code"] == 200 and modified["code"] == 200:
# what are the new members?
new_members = new_pool["content"]["membersReference"]["items"]
# loop through them
for new_member in new_members:
if new_member["name"] == member:
modified_member = new_member
break
# check for changes
old = {"content": existing_member}
new = {"content": modified_member}
ret = _check_for_changes(
"Pool Member: {member}".format(member=member), ret, old, new
)
else:
ret = _load_result(modified, ret)
else:
ret[
"comment"
] = "Member: {name} does not exists within this pool. No changes made.".format(
name=member["name"]
)
# pool does not exists
elif existing_pool["code"] == 404:
ret["comment"] = "A pool with this name was not found."
else:
ret = _load_result(existing_pool, ret)
return ret
def delete_pool_member(hostname, username, password, name, member):
"""
Delete an existing pool member.
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iControl REST password
name
The name of the pool to be modified
member
The name of the member to delete from the pool
"""
ret = {"name": name, "changes": {}, "result": False, "comment": ""}
if __opts__["test"]:
return _test_output(
ret,
"delete",
params={
"hostname": hostname,
"username": username,
"password": password,
"name": name,
"members": member,
},
)
# is this pool currently configured?
existing = __salt__["bigip.list_pool"](hostname, username, password, name)
# if it exists by name
if existing["code"] == 200:
# what are the current members?
current_members = existing["content"]["membersReference"]["items"]
# loop through them
exists = False
for current_member in current_members:
if current_member["name"] == member:
exists = True
existing_member = current_member
break
if exists:
deleted = __salt__["bigip.delete_pool_member"](
hostname, username, password, name, member
)
# did we get rid of it?
if deleted["code"] == 200:
ret["result"] = True
ret[
"comment"
] = "Pool Member: {member} was successfully deleted.".format(
member=member
)
ret["changes"]["old"] = existing_member
ret["changes"]["new"] = {}
# something bad happened
else:
ret["result"] = True
ret["comment"] = "This pool member already does not exist. No changes made."
ret["changes"]["old"] = {}
ret["changes"]["new"] = {}
else:
ret = _load_result(existing, ret)
return ret
def list_virtual(hostname, username, password, name):
"""
A function to list a specific virtual.
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iControl REST password
name
The name of the virtual to list
"""
ret = {"name": name, "changes": {}, "result": False, "comment": ""}
if __opts__["test"]:
return _test_output(
ret,
"list",
params={
"hostname": hostname,
"username": username,
"password": password,
"name": name,
},
)
response = __salt__["bigip.list_virtual"](hostname, username, password, name)
return _load_result(response, ret)
def create_virtual(
hostname,
username,
password,
name,
destination,
pool=None,
address_status=None,
auto_lasthop=None,
bwc_policy=None,
cmp_enabled=None,
connection_limit=None,
dhcp_relay=None,
description=None,
fallback_persistence=None,
flow_eviction_policy=None,
gtm_score=None,
ip_forward=None,
ip_protocol=None,
internal=None,
twelve_forward=None,
last_hop_pool=None,
mask=None,
mirror=None,
nat64=None,
persist=None,
profiles=None,
policies=None,
rate_class=None,
rate_limit=None,
rate_limit_mode=None,
rate_limit_dst=None,
rate_limit_src=None,
rules=None,
related_rules=None,
reject=None,
source=None,
source_address_translation=None,
source_port=None,
virtual_state=None,
traffic_classes=None,
translate_address=None,
translate_port=None,
vlans=None,
):
"""
A function to connect to a bigip device and create a virtual server if it does not already exists.
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iControl REST password
name
The name of the virtual to create
destination
[ [virtual_address_name:port] | [ipv4:port] | [ipv6.port] ]
pool
[ [pool_name] | none]
address_status
[yes | no]
auto_lasthop
[default | enabled | disabled ]
bwc_policy
[none] | string]
cmp_enabled
[yes | no]
dhcp_relay
[yes | no}
connection_limit
[integer]
description
[string]
state
[disabled | enabled]
fallback_persistence
[none | [profile name] ]
flow_eviction_policy
[none | [eviction policy name] ]
gtm_score
[integer]
ip_forward
[yes | no]
ip_protocol
[any | protocol]
internal
[yes | no]
twelve_forward(12-forward)
[yes | no]
last_hop-pool
[ [pool_name] | none]
mask
{ [ipv4] | [ipv6] }
mirror
{ [disabled | enabled | none] }
nat64
[enabled | disabled]
persist
[list]
profiles
[none | default | list ]
policies
[none | default | list ]
rate_class
[name]
rate_limit
[integer]
rate_limit-mode
[destination | object | object-destination |
object-source | object-source-destination |
source | source-destination]
rate_limit-dst
[integer]
rate_limit-src
[integer]
rules
[none | list ]
related_rules
[none | list ]
reject
[yes | no]
source
{ [ipv4[/prefixlen]] | [ipv6[/prefixlen]] }
source_address_translation
[none | snat:pool_name | lsn | automap | dictionary ]
source_port
[change | preserve | preserve-strict]
state
[enabled | disabled]
traffic_classes
[none | default | list ]
translate_address
[enabled | disabled]
translate_port
[enabled | disabled]
vlans
[none | default | dictionary]
vlan_ids
[ list]
enabled
[ true | false ]
"""
ret = {"name": name, "changes": {}, "result": False, "comment": ""}
if __opts__["test"]:
return _test_output(
ret,
"create",
params={
"hostname": hostname,
"username": username,
"password": password,
"name": name,
"destination": destination,
"pool": pool,
"address_status": address_status,
"auto_lasthop": auto_lasthop,
"bwc_policy": bwc_policy,
"cmp_enabled": cmp_enabled,
"connection_limit": connection_limit,
"dhcp_relay": dhcp_relay,
"description": description,
"fallback_persistence": fallback_persistence,
"flow_eviction_policy": flow_eviction_policy,
"gtm_score": gtm_score,
"ip_forward": ip_forward,
"ip_protocol": ip_protocol,
"internal": internal,
"twelve_forward": twelve_forward,
"last_hop_pool": last_hop_pool,
"mask": mask,
"mirror": mirror,
"nat64": nat64,
"persist": persist,
"profiles": profiles,
"policies": policies,
"rate_class": rate_class,
"rate_limit": rate_limit,
"rate_limit_mode": rate_limit_mode,
"rate_limit_dst": rate_limit_dst,
"rate_limit_src": rate_limit_src,
"rules": rules,
"related_rules": related_rules,
"reject": reject,
"source": source,
"source_address_translation": source_address_translation,
"source_port": source_port,
"virtual_state": virtual_state,
"traffic_classes": traffic_classes,
"translate_address": translate_address,
"translate_port": translate_port,
"vlans": vlans,
},
)
existing = __salt__["bigip.list_virtual"](hostname, username, password, name)
# does this virtual exist?
if existing["code"] == 200:
ret["result"] = True
ret["comment"] = "A virtual by this name currently exists. No change made."
elif existing["code"] == 404:
# create it
virtual = __salt__["bigip.create_virtual"](
hostname=hostname,
username=username,
password=password,
name=name,
destination=destination,
description=description,
pool=pool,
address_status=address_status,
auto_lasthop=auto_lasthop,
bwc_policy=bwc_policy,
cmp_enabled=cmp_enabled,
connection_limit=connection_limit,
dhcp_relay=dhcp_relay,
fallback_persistence=fallback_persistence,
flow_eviction_policy=flow_eviction_policy,
gtm_score=gtm_score,
ip_forward=ip_forward,
ip_protocol=ip_protocol,
internal=internal,
twelve_forward=twelve_forward,
last_hop_pool=last_hop_pool,
mask=mask,
mirror=mirror,
nat64=nat64,
persist=persist,
profiles=profiles,
policies=policies,
rate_class=rate_class,
rate_limit=rate_limit,
rate_limit_mode=rate_limit_mode,
rate_limit_dst=rate_limit_dst,
rate_limit_src=rate_limit_src,
rules=rules,
related_rules=related_rules,
reject=reject,
source=source,
source_address_translation=source_address_translation,
source_port=source_port,
state=virtual_state,
traffic_classes=traffic_classes,
translate_address=translate_address,
translate_port=translate_port,
vlans=vlans,
)
if virtual["code"] == 200:
ret["result"] = True
ret["changes"]["old"] = {}
ret["changes"]["new"] = virtual["content"]
ret["comment"] = "Virtual was successfully created."
else:
ret = _load_result(existing, ret)
# else something else was returned
else:
ret = _load_result(existing, ret)
return ret
def manage_virtual(
hostname,
username,
password,
name,
destination,
pool=None,
address_status=None,
auto_lasthop=None,
bwc_policy=None,
cmp_enabled=None,
connection_limit=None,
dhcp_relay=None,
description=None,
fallback_persistence=None,
flow_eviction_policy=None,
gtm_score=None,
ip_forward=None,
ip_protocol=None,
internal=None,
twelve_forward=None,
last_hop_pool=None,
mask=None,
mirror=None,
nat64=None,
persist=None,
profiles=None,
policies=None,
rate_class=None,
rate_limit=None,
rate_limit_mode=None,
rate_limit_dst=None,
rate_limit_src=None,
rules=None,
related_rules=None,
reject=None,
source=None,
source_address_translation=None,
source_port=None,
virtual_state=None,
traffic_classes=None,
translate_address=None,
translate_port=None,
vlans=None,
):
"""
Manage a virtual server. If a virtual does not exists it will be created, otherwise only the
parameters specified will be enforced.
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iControl REST password
name
The name of the virtual to create
destination
[ [virtual_address_name:port] | [ipv4:port] | [ipv6.port] ]
pool | address_status
[yes | no]
auto_lasthop
[default | enabled | disabled ]
bwc_policy
[none] | string]
cmp_enabled
[yes | no]
dhcp_relay
[yes | no}
connection_limit
[integer]
description
[string]
state
[disabled | enabled]
fallback_persistence
[none | [profile name] ]
flow_eviction_policy
[none | [eviction policy name] ]
gtm_score
[integer]
ip_forward
[yes | no]
ip_protocol
[any | protocol]
internal
[yes | no]
twelve_forward(12-forward)
[yes | no]
last_hop-pool
[ [pool_name] | none]
mask
{ [ipv4] | [ipv6] }
mirror
{ [disabled | enabled | none] }
nat64
[enabled | disabled]
persist
[list]
profiles
[none | default | list ]
policies
[none | default | list ]
rate_class
[name]
rate_limit
[integer]
rate_limit-mode
[destination | object | object-destination |
object-source | object-source-destination |
source | source-destination]
rate_limit-dst
[integer]
rate_limit-src
[integer]
rules
[none | list ]
related_rules
[none | list ]
reject
[yes | no]
source
{ [ipv4[/prefixlen]] | [ipv6[/prefixlen]] }
source_address_translation
[none | snat:pool_name | lsn | automap | dictionary ]
source_port
[change | preserve | preserve-strict]
state
[enabled | disabled]
traffic_classes
[none | default | list ]
translate_address
[enabled | disabled]
translate_port
[enabled | disabled]
vlans
[none | default | dictionary]
vlan_ids
[ list]
enabled
[ true | false ]
"""
ret = {"name": name, "changes": {}, "result": False, "comment": ""}
if __opts__["test"]:
return _test_output(
ret,
"manage",
params={
"hostname": hostname,
"username": username,
"password": password,
"name": name,
"destination": destination,
"pool": pool,
"address_status": address_status,
"auto_lasthop": auto_lasthop,
"bwc_policy": bwc_policy,
"cmp_enabled": cmp_enabled,
"connection_limit": connection_limit,
"dhcp_relay": dhcp_relay,
"description": description,
"fallback_persistence": fallback_persistence,
"flow_eviction_policy": flow_eviction_policy,
"gtm_score": gtm_score,
"ip_forward": ip_forward,
"ip_protocol": ip_protocol,
"internal": internal,
"twelve_forward": twelve_forward,
"last_hop_pool": last_hop_pool,
"mask": mask,
"mirror": mirror,
"nat64": nat64,
"persist": persist,
"profiles": profiles,
"policies": policies,
"rate_class": rate_class,
"rate_limit": rate_limit,
"rate_limit_mode": rate_limit_mode,
"rate_limit_dst": rate_limit_dst,
"rate_limit_src": rate_limit_src,
"rules": rules,
"related_rules": related_rules,
"reject": reject,
"source": source,
"source_address_translation": source_address_translation,
"source_port": source_port,
"virtual_state": virtual_state,
"traffic_classes": traffic_classes,
"translate_address": translate_address,
"translate_port": translate_port,
"vlans": vlans,
},
)
existing = __salt__["bigip.list_virtual"](hostname, username, password, name)
# does this virtual exist?
if existing["code"] == 200:
# modify
modified = __salt__["bigip.modify_virtual"](
hostname=hostname,
username=username,
password=password,
name=name,
destination=destination,
description=description,
pool=pool,
address_status=address_status,
auto_lasthop=auto_lasthop,
bwc_policy=bwc_policy,
cmp_enabled=cmp_enabled,
connection_limit=connection_limit,
dhcp_relay=dhcp_relay,
fallback_persistence=fallback_persistence,
flow_eviction_policy=flow_eviction_policy,
gtm_score=gtm_score,
ip_forward=ip_forward,
ip_protocol=ip_protocol,
internal=internal,
twelve_forward=twelve_forward,
last_hop_pool=last_hop_pool,
mask=mask,
mirror=mirror,
nat64=nat64,
persist=persist,
profiles=profiles,
policies=policies,
rate_class=rate_class,
rate_limit=rate_limit,
rate_limit_mode=rate_limit_mode,
rate_limit_dst=rate_limit_dst,
rate_limit_src=rate_limit_src,
rules=rules,
related_rules=related_rules,
reject=reject,
source=source,
source_address_translation=source_address_translation,
source_port=source_port,
state=virtual_state,
traffic_classes=traffic_classes,
translate_address=translate_address,
translate_port=translate_port,
vlans=vlans,
)
# was the modification successful?
if modified["code"] == 200:
# relist it to compare
relisting = __salt__["bigip.list_virtual"](
hostname, username, password, name
)
if relisting["code"] == 200:
relisting = _strip_key(relisting, "generation")
existing = _strip_key(existing, "generation")
ret = _check_for_changes("Virtual", ret, existing, relisting)
else:
ret = _load_result(relisting, ret)
else:
ret = _load_result(modified, ret)
elif existing["code"] == 404:
# create it
virtual = __salt__["bigip.create_virtual"](
hostname=hostname,
username=username,
password=password,
name=name,
destination=destination,
description=description,
pool=pool,
address_status=address_status,
auto_lasthop=auto_lasthop,
bwc_policy=bwc_policy,
cmp_enabled=cmp_enabled,
connection_limit=connection_limit,
dhcp_relay=dhcp_relay,
fallback_persistence=fallback_persistence,
flow_eviction_policy=flow_eviction_policy,
gtm_score=gtm_score,
ip_forward=ip_forward,
ip_protocol=ip_protocol,
internal=internal,
twelve_forward=twelve_forward,
last_hop_pool=last_hop_pool,
mask=mask,
mirror=mirror,
nat64=nat64,
persist=persist,
profiles=profiles,
policies=policies,
rate_class=rate_class,
rate_limit=rate_limit,
rate_limit_mode=rate_limit_mode,
rate_limit_dst=rate_limit_dst,
rate_limit_src=rate_limit_src,
rules=rules,
related_rules=related_rules,
reject=reject,
source=source,
source_address_translation=source_address_translation,
source_port=source_port,
state=virtual_state,
traffic_classes=traffic_classes,
translate_address=translate_address,
translate_port=translate_port,
vlans=vlans,
)
# were we able to create it?
if virtual["code"] == 200:
ret["result"] = True
ret["changes"]["old"] = {}
ret["changes"]["new"] = virtual["content"]
ret[
"comment"
] = "Virtual was successfully created and enforced to the desired state."
else:
ret = _load_result(virtual, ret)
else:
ret = _load_result(existing, ret)
return ret
def modify_virtual(
hostname,
username,
password,
name,
destination,
pool=None,
address_status=None,
auto_lasthop=None,
bwc_policy=None,
cmp_enabled=None,
connection_limit=None,
dhcp_relay=None,
description=None,
fallback_persistence=None,
flow_eviction_policy=None,
gtm_score=None,
ip_forward=None,
ip_protocol=None,
internal=None,
twelve_forward=None,
last_hop_pool=None,
mask=None,
mirror=None,
nat64=None,
persist=None,
profiles=None,
policies=None,
rate_class=None,
rate_limit=None,
rate_limit_mode=None,
rate_limit_dst=None,
rate_limit_src=None,
rules=None,
related_rules=None,
reject=None,
source=None,
source_address_translation=None,
source_port=None,
virtual_state=None,
traffic_classes=None,
translate_address=None,
translate_port=None,
vlans=None,
):
"""
Modify an virtual server. modify an existing virtual. Only parameters specified will be enforced.
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iControl REST password
name
The name of the virtual to create
destination
[ [virtual_address_name:port] | [ipv4:port] | [ipv6.port] ]
pool
[ [pool_name] | none]
address_status
[yes | no]
auto_lasthop
[default | enabled | disabled ]
bwc_policy
[none] | string]
cmp_enabled
[yes | no]
dhcp_relay
[yes | no}
connection_limit
[integer]
description
[string]
state
[disabled | enabled]
fallback_persistence
[none | [profile name] ]
flow_eviction_policy
[none | [eviction policy name] ]
gtm_score
[integer]
ip_forward
[yes | no]
ip_protocol
[any | protocol]
internal
[yes | no]
twelve_forward(12-forward)
[yes | no]
last_hop-pool
[ [pool_name] | none]
mask
{ [ipv4] | [ipv6] }
mirror
{ [disabled | enabled | none] }
nat64
[enabled | disabled]
persist
[list]
profiles
[none | default | list ]
policies
[none | default | list ]
rate_class
[name]
rate_limit
[integer]
rate_limit-mode
[destination | object | object-destination |
object-source | object-source-destination |
source | source-destination]
rate_limit_dst
[integer]
rate_limit_src
[integer]
rules
[none | list ]
related_rules
[none | list ]
reject
[yes | no]
source
{ [ipv4[/prefixlen]] | [ipv6[/prefixlen]] }
source_address_translation
[none | snat:pool_name | lsn | automap | dictionary ]
source_port
[change | preserve | preserve-strict]
state
[enabled | disabled]
traffic_classes
[none | default | list ]
translate_address
[enabled | disabled]
translate_port
[enabled | disabled]
vlans
[none | default | dictionary ]
vlan_ids
[ list]
enabled
[ true | false ]
"""
ret = {"name": name, "changes": {}, "result": False, "comment": ""}
if __opts__["test"]:
return _test_output(
ret,
"modify",
params={
"hostname": hostname,
"username": username,
"password": password,
"name": name,
"destination": destination,
"pool": pool,
"address_status": address_status,
"auto_lasthop": auto_lasthop,
"bwc_policy": bwc_policy,
"cmp_enabled": cmp_enabled,
"connection_limit": connection_limit,
"dhcp_relay": dhcp_relay,
"description": description,
"fallback_persistence": fallback_persistence,
"flow_eviction_policy": flow_eviction_policy,
"gtm_score": gtm_score,
"ip_forward": ip_forward,
"ip_protocol": ip_protocol,
"internal": internal,
"twelve_forward": twelve_forward,
"last_hop_pool": last_hop_pool,
"mask": mask,
"mirror": mirror,
"nat64": nat64,
"persist": persist,
"profiles": profiles,
"policies": policies,
"rate_class": rate_class,
"rate_limit": rate_limit,
"rate_limit_mode": rate_limit_mode,
"rate_limit_dst": rate_limit_dst,
"rate_limit_src": rate_limit_src,
"rules": rules,
"related_rules": related_rules,
"reject": reject,
"source": source,
"source_address_translation": source_address_translation,
"source_port": source_port,
"virtual_state": virtual_state,
"traffic_classes": traffic_classes,
"translate_address": translate_address,
"translate_port": translate_port,
"vlans": vlans,
},
)
existing = __salt__["bigip.list_virtual"](hostname, username, password, name)
# does this virtual exist?
if existing["code"] == 200:
# modify
modified = __salt__["bigip.modify_virtual"](
hostname=hostname,
username=username,
password=password,
name=name,
destination=destination,
description=description,
pool=pool,
address_status=address_status,
auto_lasthop=auto_lasthop,
bwc_policy=bwc_policy,
cmp_enabled=cmp_enabled,
connection_limit=connection_limit,
dhcp_relay=dhcp_relay,
fallback_persistence=fallback_persistence,
flow_eviction_policy=flow_eviction_policy,
gtm_score=gtm_score,
ip_forward=ip_forward,
ip_protocol=ip_protocol,
internal=internal,
twelve_forward=twelve_forward,
last_hop_pool=last_hop_pool,
mask=mask,
mirror=mirror,
nat64=nat64,
persist=persist,
profiles=profiles,
policies=policies,
rate_class=rate_class,
rate_limit=rate_limit,
rate_limit_mode=rate_limit_mode,
rate_limit_dst=rate_limit_dst,
rate_limit_src=rate_limit_src,
rules=rules,
related_rules=related_rules,
reject=reject,
source=source,
source_address_translation=source_address_translation,
source_port=source_port,
state=virtual_state,
traffic_classes=traffic_classes,
translate_address=translate_address,
translate_port=translate_port,
vlans=vlans,
)
# was the modification successful?
if modified["code"] == 200:
# relist it to compare
relisting = __salt__["bigip.list_virtual"](
hostname, username, password, name
)
if relisting["code"] == 200:
relisting = _strip_key(relisting, "generation")
existing = _strip_key(existing, "generation")
ret = _check_for_changes("Virtual", ret, existing, relisting)
else:
ret = _load_result(relisting, ret)
else:
ret = _load_result(modified, ret)
elif existing["code"] == 404:
ret["comment"] = "A Virtual with this name was not found."
# else something else was returned
else:
ret = _load_result(existing, ret)
return ret
def delete_virtual(hostname, username, password, name):
"""
Delete an existing virtual.
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iControl REST password
name
The name of the virtual which will be deleted
"""
ret = {"name": name, "changes": {}, "result": False, "comment": ""}
if __opts__["test"]:
return _test_output(
ret,
"delete",
params={
"hostname": hostname,
"username": username,
"password": password,
"name": name,
},
)
# is this virtual currently configured?
existing = __salt__["bigip.list_virtual"](hostname, username, password, name)
# if it exists by name
if existing["code"] == 200:
deleted = __salt__["bigip.delete_virtual"](hostname, username, password, name)
# did we get rid of it?
if deleted["code"] == 200:
ret["result"] = True
ret["comment"] = "Virtual was successfully deleted."
ret["changes"]["old"] = existing["content"]
ret["changes"]["new"] = {}
# something bad happened
else:
ret = _load_result(deleted, ret)
# not found
elif existing["code"] == 404:
ret["result"] = True
ret["comment"] = "This virtual already does not exist. No changes made."
ret["changes"]["old"] = {}
ret["changes"]["new"] = {}
else:
ret = _load_result(existing, ret)
return ret
def list_monitor(hostname, username, password, monitor_type, name):
"""
A function to list an existing monitor.
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iControl REST password
monitor_type
The type of monitor to list
name
The name of the monitor to list
"""
ret = {"name": name, "changes": {}, "result": False, "comment": ""}
if __opts__["test"]:
return _test_output(
ret,
"list",
params={
"hostname": hostname,
"username": username,
"password": password,
"monitor_type": monitor_type,
"name": name,
},
)
response = __salt__["bigip.list_monitor"](
hostname, username, password, monitor_type, name
)
return _load_result(response, ret)
def create_monitor(hostname, username, password, monitor_type, name, **kwargs):
"""
A function to connect to a bigip device and create a monitor.
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iControl REST password
monitor_type
The type of monitor to create
name
The name of the monitor to create
kwargs
[ arg=val ] ...
Consult F5 BIGIP user guide for specific options for each monitor type.
Typically, tmsh arg names are used.
"""
ret = {"name": name, "changes": {}, "result": False, "comment": ""}
if __opts__["test"]:
params = {
"hostname": hostname,
"username": username,
"password": password,
"monitor_type": monitor_type,
"name": name,
}
for key, value in kwargs.items():
params[key] = value
return _test_output(ret, "create", params)
# is this monitor currently configured?
existing = __salt__["bigip.list_monitor"](
hostname, username, password, monitor_type, name
)
# if it exists
if existing["code"] == 200:
ret["result"] = True
ret["comment"] = "A monitor by this name currently exists. No change made."
# if it doesn't exist
elif existing["code"] == 404:
response = __salt__["bigip.create_monitor"](
hostname, username, password, monitor_type, name, **kwargs
)
if response["code"] == 200:
ret["result"] = True
ret["changes"]["old"] = {}
ret["changes"]["new"] = response["content"]
ret["comment"] = "Monitor was successfully created."
else:
ret = _load_result(response, ret)
# else something else was returned
else:
ret = _load_result(existing, ret)
return ret
def manage_monitor(hostname, username, password, monitor_type, name, **kwargs):
"""
Create a new monitor if a monitor of this type and name does not already exists. If it does exists, only
the parameters specified will be enforced.
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iControl REST password
monitor_type
The type of monitor to create
name
The name of the monitor to create
kwargs
[ arg=val ] ...
Consult F5 BIGIP user guide for specific options for each monitor type.
Typically, tmsh arg names are used.
"""
ret = {"name": name, "changes": {}, "result": False, "comment": ""}
if __opts__["test"]:
params = {
"hostname": hostname,
"username": username,
"password": password,
"monitor_type": monitor_type,
"name": name,
}
for key, value in kwargs.items():
params[key] = value
return _test_output(ret, "manage", params)
# is this monitor currently configured?
existing = __salt__["bigip.list_monitor"](
hostname, username, password, monitor_type, name
)
# if it exists
if existing["code"] == 200:
# modify the monitor
modified = __salt__["bigip.modify_monitor"](
hostname, username, password, monitor_type, name, **kwargs
)
# was the modification successful?
if modified["code"] == 200:
del existing["content"]["selfLink"]
del modified["content"]["selfLink"]
ret = _check_for_changes("Monitor", ret, existing, modified)
else:
ret = _load_result(modified, ret)
# if it doesn't exist
elif existing["code"] == 404:
response = __salt__["bigip.create_monitor"](
hostname, username, password, monitor_type, name, **kwargs
)
if response["code"] == 200:
ret["result"] = True
ret["changes"]["old"] = {}
ret["changes"]["new"] = response["content"]
ret["comment"] = "Monitor was successfully created."
else:
ret = _load_result(response, ret)
# else something else was returned
else:
ret = _load_result(existing, ret)
return ret
def modify_monitor(hostname, username, password, monitor_type, name, **kwargs):
"""
Modify an existing monitor. If it does exists, only
the parameters specified will be enforced.
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iControl REST password
monitor_type
The type of monitor to create
name
The name of the monitor to create
kwargs
[ arg=val ] ...
Consult F5 BIGIP user guide for specific options for each monitor type.
Typically, tmsh arg names are used.
"""
ret = {"name": name, "changes": {}, "result": False, "comment": ""}
if __opts__["test"]:
params = {
"hostname": hostname,
"username": username,
"password": password,
"monitor_type": monitor_type,
"name": name,
}
for key, value in kwargs.items():
params[key] = value
return _test_output(ret, "modify", params)
# is this monitor currently configured?
existing = __salt__["bigip.list_monitor"](
hostname, username, password, monitor_type, name
)
# if it exists
if existing["code"] == 200:
# modify the monitor
modified = __salt__["bigip.modify_monitor"](
hostname, username, password, monitor_type, name, **kwargs
)
# was the modification successful?
if modified["code"] == 200:
del existing["content"]["selfLink"]
del modified["content"]["selfLink"]
ret = _check_for_changes("Monitor", ret, existing, modified)
else:
ret = _load_result(modified, ret)
# if it doesn't exist
elif existing["code"] == 404:
ret["comment"] = "A Monitor with this name was not found."
# else something else was returned
else:
ret = _load_result(existing, ret)
return ret
def delete_monitor(hostname, username, password, monitor_type, name):
"""
Modify an existing monitor. If it does exists, only
the parameters specified will be enforced.
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iControl REST password
monitor_type
The type of monitor to create
name
The name of the monitor to create
kwargs
[ arg=val ] ...
Consult F5 BIGIP user guide for specific options for each monitor type.
Typically, tmsh arg names are used.
"""
ret = {"name": name, "changes": {}, "result": False, "comment": ""}
if __opts__["test"]:
return _test_output(
ret,
"delete",
params={
"hostname": hostname,
"username": username,
"password": password,
"monitor_type": monitor_type,
"name": name,
},
)
# is this profile currently configured?
existing = __salt__["bigip.list_monitor"](
hostname, username, password, monitor_type, name
)
# if it exists by name
if existing["code"] == 200:
deleted = __salt__["bigip.delete_monitor"](
hostname, username, password, monitor_type, name
)
# did we get rid of it?
if deleted["code"] == 200:
ret["result"] = True
ret["comment"] = "Monitor was successfully deleted."
ret["changes"]["old"] = existing["content"]
ret["changes"]["new"] = {}
# something bad happened
else:
ret = _load_result(deleted, ret)
# not found
elif existing["code"] == 404:
ret["result"] = True
ret["comment"] = "This Monitor already does not exist. No changes made."
ret["changes"]["old"] = {}
ret["changes"]["new"] = {}
else:
ret = _load_result(existing, ret)
return ret
def list_profile(hostname, username, password, profile_type, name):
"""
A function to list an existing profile.
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iControl REST password
profile_type
The type of profile to list
name
The name of the profile to list
"""
ret = {"name": name, "changes": {}, "result": False, "comment": ""}
if __opts__["test"]:
return _test_output(
ret,
"list",
params={
"hostname": hostname,
"username": username,
"password": password,
"profile_type": profile_type,
"name": name,
},
)
response = __salt__["bigip.list_profile"](
hostname, username, password, profile_type, name
)
return _load_result(response, ret)
def create_profile(hostname, username, password, profile_type, name, **kwargs):
r"""
A function to connect to a bigip device and create a profile.
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iControl REST password
profile_type
The type of profile to create
name
The name of the profile to create
kwargs
[ arg=val ] ...
Consult F5 BIGIP user guide for specific options for each profile type.
Typically, tmsh arg names are used.
Special Characters ``|``, ``,`` and ``:`` must be escaped using ``\`` when
used within strings.
"""
ret = {"name": name, "changes": {}, "result": False, "comment": ""}
if __opts__["test"]:
return _test_output(
ret,
"create",
params={
"hostname": hostname,
"username": username,
"password": password,
"profile_type": profile_type,
"name": name,
},
)
# is this profile currently configured?
existing = __salt__["bigip.list_profile"](
hostname, username, password, profile_type, name
)
# if it exists
if existing["code"] == 200:
ret["result"] = True
ret["comment"] = "A profile by this name currently exists. No change made."
# if it doesn't exist
elif existing["code"] == 404:
response = __salt__["bigip.create_profile"](
hostname, username, password, profile_type, name, **kwargs
)
if response["code"] == 200:
ret["result"] = True
ret["changes"]["old"] = {}
ret["changes"]["new"] = response["content"]
ret["comment"] = "Profile was successfully created."
else:
ret = _load_result(response, ret)
# else something else was returned
else:
ret = _load_result(existing, ret)
return ret
def manage_profile(hostname, username, password, profile_type, name, **kwargs):
"""
Create a new profile if a monitor of this type and name does not already exists. If it does exists, only
the parameters specified will be enforced.
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iControl REST password
profile_type
The type of profile to create
name
The name of the profile to create
kwargs
[ arg=val ] ...
Consult F5 BIGIP user guide for specific options for each profile type.
Typically, tmsh arg names are used.
"""
ret = {"name": name, "changes": {}, "result": False, "comment": ""}
if __opts__["test"]:
params = {
"hostname": hostname,
"username": username,
"password": password,
"profile_type": profile_type,
"name": name,
}
for key, value in kwargs.items():
params[key] = value
return _test_output(ret, "manage", params)
# is this profile currently configured?
existing = __salt__["bigip.list_profile"](
hostname, username, password, profile_type, name
)
# if it exists
if existing["code"] == 200:
# modify the profile
modified = __salt__["bigip.modify_profile"](
hostname, username, password, profile_type, name, **kwargs
)
# was the modification successful?
if modified["code"] == 200:
del existing["content"]["selfLink"]
del modified["content"]["selfLink"]
ret = _check_for_changes("Profile", ret, existing, modified)
else:
ret = _load_result(modified, ret)
# if it doesn't exist
elif existing["code"] == 404:
response = __salt__["bigip.create_profile"](
hostname, username, password, profile_type, name, **kwargs
)
if response["code"] == 200:
ret["result"] = True
ret["changes"]["old"] = {}
ret["changes"]["new"] = response["content"]
ret["comment"] = "Profile was successfully created."
else:
ret = _load_result(existing, ret)
# else something else was returned
else:
ret = _load_result(existing, ret)
return ret
def modify_profile(hostname, username, password, profile_type, name, **kwargs):
"""
Modify an existing profile. If it does exists, only
the parameters specified will be enforced.
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iControl REST password
profile_type
The type of profile to create
name
The name of the profile to create
kwargs
[ arg=val ] ...
Consult F5 BIGIP user guide for specific options for each monitor type.
Typically, tmsh arg names are used.
"""
ret = {"name": name, "changes": {}, "result": False, "comment": ""}
if __opts__["test"]:
params = {
"hostname": hostname,
"username": username,
"password": password,
"profile_type": profile_type,
"name": name,
}
for key, value in kwargs.items():
params[key] = value
return _test_output(ret, "modify", params)
# is this profile currently configured?
existing = __salt__["bigip.list_profile"](
hostname, username, password, profile_type, name
)
# if it exists
if existing["code"] == 200:
# modify the profile
modified = __salt__["bigip.modify_profile"](
hostname, username, password, profile_type, name, **kwargs
)
# was the modification successful?
if modified["code"] == 200:
del existing["content"]["selfLink"]
del modified["content"]["selfLink"]
ret = _check_for_changes("Profile", ret, existing, modified)
else:
ret = _load_result(modified, ret)
# if it doesn't exist
elif existing["code"] == 404:
ret["comment"] = "A Profile with this name was not found."
# else something else was returned
else:
ret = _load_result(existing, ret)
return ret
def delete_profile(hostname, username, password, profile_type, name):
"""
Modify an existing profile. If it does exists, only
the parameters specified will be enforced.
hostname
The host/address of the bigip device
username
The iControl REST username
password
The iControl REST password
profile_type
The type of profile to create
name
The name of the profile to create
kwargs
[ arg=val ] ...
Consult F5 BIGIP user guide for specific options for each profile type.
Typically, tmsh arg names are used.
"""
ret = {"name": name, "changes": {}, "result": False, "comment": ""}
if __opts__["test"]:
return _test_output(
ret,
"delete",
params={
"hostname": hostname,
"username": username,
"password": password,
"profile_type": profile_type,
"name": name,
},
)
# is this profile currently configured?
existing = __salt__["bigip.list_profile"](
hostname, username, password, profile_type, name
)
# if it exists by name
if existing["code"] == 200:
deleted = __salt__["bigip.delete_profile"](
hostname, username, password, profile_type, name
)
# did we get rid of it?
if deleted["code"] == 200:
ret["result"] = True
ret["comment"] = "Profile was successfully deleted."
ret["changes"]["old"] = existing["content"]
ret["changes"]["new"] = {}
# something bad happened
else:
ret = _load_result(deleted, ret)
# not found
elif existing["code"] == 404:
ret["result"] = True
ret["comment"] = "This Profile already does not exist. No changes made."
ret["changes"]["old"] = {}
ret["changes"]["new"] = {}
else:
ret = _load_result(existing, ret)
return ret | [ [pool_name] | none] |
test_direct_metric_tensor.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
.. py:currentmodule:: test_direct_metric_tensor
:synopsis: Tests for the module :py:mod:`direct_metric_tensor`
.. moduleauthor:: Hendrix Demers <[email protected]>
Tests for the module :py:mod:`direct_metric_tensor`.
"""
###############################################################################
# Copyright 2017 Hendrix Demers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
###############################################################################
# Standard library modules.
import unittest
# Third party modules.
# Local modules.
# Project modules.
import electrondiffraction.crystallography.direct_metric_tensor as direct_metric_tensor
# Globals and constants variables.
class Test_direct_metric_tensor(unittest.TestCase):
"""
TestCase class for the module `${moduleName}`.
"""
def setUp(self):
"""
Setup method.
"""
unittest.TestCase.setUp(self)
def tearDown(self):
"""
Teardown method.
"""
unittest.TestCase.tearDown(self)
def testSkeleton(self):
"""
First test to check if the testcase is working with the testing framework.
"""
#self.fail("Test if the testcase is working.")
self.assert_(True)
if __name__ == '__main__': # pragma: no cover
import nose
nose.runmodule() | |
dirhelper.go | package cmd
import (
"fmt"
"os"
"regexp"
"strings"
)
func createDirs(dirs []string) error {
for i, dir := range dirs {
err := os.MkdirAll(dir, filePermissions)
if err != nil {
if delErr := deleteDirs(dirs[:i]); delErr != nil {
err = fmt.Errorf(`error creating directory "%s": %s, unable to clean up: %s`, dirs[i], err.Error(), delErr.Error())
}
return err
}
}
return nil
}
func | (dirs []string) error {
for _, dir := range dirs {
if err := os.RemoveAll(dir); err != nil {
return err
}
}
return nil
}
func formatDirName(dir string) (string, error) {
if len(dir) == 0 {
return "", fmt.Errorf("Invalid directory %s", dir)
}
dir = strings.Trim(dir, " ")
re := regexp.MustCompile(`[^a-zA-Z0-9- ]`)
dir = re.ReplaceAllString(dir, "")
re = regexp.MustCompile(`[ ]+`)
dir = re.ReplaceAllString(dir, "-")
if len(dir) > 128 {
dir = dir[:128]
}
dir = strings.ToLower(dir)
return dir, nil
}
| deleteDirs |
26_fetch.js | // Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
// @ts-check
/// <reference path="../../core/lib.deno_core.d.ts" />
/// <reference path="../web/internal.d.ts" />
/// <reference path="../url/internal.d.ts" />
/// <reference path="../web/lib.deno_web.d.ts" />
/// <reference path="../web/06_streams_types.d.ts" />
/// <reference path="./internal.d.ts" />
/// <reference path="./lib.deno_fetch.d.ts" />
/// <reference lib="esnext" />
"use strict";
((window) => {
const core = window.Deno.core;
const webidl = window.__bootstrap.webidl;
const { errorReadableStream } = window.__bootstrap.streams;
const { InnerBody, extractBody } = window.__bootstrap.fetchBody;
const {
toInnerRequest,
toInnerResponse,
fromInnerResponse,
redirectStatus,
nullBodyStatus,
networkError,
abortedNetworkError,
} = window.__bootstrap.fetch;
const abortSignal = window.__bootstrap.abortSignal;
const { DOMException } = window.__bootstrap.domException;
const {
ArrayPrototypePush,
ArrayPrototypeSplice,
ArrayPrototypeFilter,
ArrayPrototypeIncludes,
Promise,
PromisePrototypeThen,
PromisePrototypeCatch,
StringPrototypeToLowerCase,
TypedArrayPrototypeSubarray,
TypeError,
Uint8Array,
} = window.__bootstrap.primordials;
const REQUEST_BODY_HEADER_NAMES = [
"content-encoding",
"content-language",
"content-location",
"content-type",
];
/**
* @param {{ method: string, url: string, headers: [string, string][], clientRid: number | null, hasBody: boolean }} args
* @param {Uint8Array | null} body
* @returns {{ requestRid: number, requestBodyRid: number | null }}
*/
function opFetch(args, body) {
return core.opSync("op_fetch", args, body);
}
/**
* @param {number} rid
* @returns {Promise<{ status: number, statusText: string, headers: [string, string][], url: string, responseRid: number }>}
*/
function opFetchSend(rid) {
return core.opAsync("op_fetch_send", rid);
}
/**
* @param {number} rid
* @param {Uint8Array} body
* @returns {Promise<void>}
*/
function opFetchRequestWrite(rid, body) {
return core.opAsync("op_fetch_request_write", rid, body);
}
/**
* @param {number} rid
* @param {Uint8Array} body
* @returns {Promise<number>}
*/
function opFetchResponseRead(rid, body) {
return core.opAsync("op_fetch_response_read", rid, body);
}
// A finalization registry to clean up underlying fetch resources that are GC'ed.
const RESOURCE_REGISTRY = new FinalizationRegistry((rid) => {
try {
core.close(rid);
} catch {
// might have already been closed
}
});
/**
* @param {number} responseBodyRid
* @param {AbortSignal} [terminator]
* @returns {ReadableStream<Uint8Array>}
*/
function createResponseBodyStream(responseBodyRid, terminator) {
function onAbort() {
if (readable) {
errorReadableStream(
readable,
new DOMException("Ongoing fetch was aborted.", "AbortError"),
);
}
try {
core.close(responseBodyRid);
} catch (_) {
// might have already been closed
}
}
// TODO(lucacasonato): clean up registration
terminator[abortSignal.add](onAbort);
const readable = new ReadableStream({
type: "bytes",
async pull(controller) {
try {
// This is the largest possible size for a single packet on a TLS
// stream.
const chunk = new Uint8Array(16 * 1024 + 256);
const read = await opFetchResponseRead(
responseBodyRid,
chunk,
);
if (read > 0) {
// We read some data. Enqueue it onto the stream.
controller.enqueue(TypedArrayPrototypeSubarray(chunk, 0, read));
} else {
RESOURCE_REGISTRY.unregister(readable);
// We have reached the end of the body, so we close the stream.
controller.close();
try {
core.close(responseBodyRid);
} catch (_) {
// might have already been closed
}
}
} catch (err) {
RESOURCE_REGISTRY.unregister(readable);
if (terminator.aborted) {
controller.error(
new DOMException("Ongoing fetch was aborted.", "AbortError"),
);
} else {
// There was an error while reading a chunk of the body, so we
// error.
controller.error(err);
}
try {
core.close(responseBodyRid);
} catch (_) {
// might have already been closed
}
}
},
cancel() {
if (!terminator.aborted) {
terminator[abortSignal.signalAbort]();
}
},
});
RESOURCE_REGISTRY.register(readable, responseBodyRid, readable);
return readable;
}
/**
* @param {InnerRequest} req
* @param {boolean} recursive
* @param {AbortSignal} terminator
* @returns {Promise<InnerResponse>}
*/
async function mainFetch(req, recursive, terminator) {
/** @type {ReadableStream<Uint8Array> | Uint8Array | null} */
let reqBody = null;
if (req.body !== null) {
if (req.body.streamOrStatic instanceof ReadableStream) {
if (req.body.length === null || req.body.source instanceof Blob) {
reqBody = req.body.stream;
} else {
const reader = req.body.stream.getReader();
const r1 = await reader.read();
if (r1.done) {
reqBody = new Uint8Array(0);
} else {
reqBody = r1.value;
const r2 = await reader.read();
if (!r2.done) throw new TypeError("Unreachable");
}
}
} else {
req.body.streamOrStatic.consumed = true;
reqBody = req.body.streamOrStatic.body;
}
}
const { requestRid, requestBodyRid, cancelHandleRid } = opFetch({
method: req.method,
url: req.currentUrl(),
headers: req.headerList,
clientRid: req.clientRid,
hasBody: reqBody !== null,
bodyLength: req.body?.length,
}, reqBody instanceof Uint8Array ? reqBody : null);
function onAbort() {
try {
core.close(cancelHandleRid);
} catch (_) {
// might have already been closed
}
try {
core.close(requestBodyRid);
} catch (_) {
// might have already been closed
}
}
terminator[abortSignal.add](onAbort);
if (requestBodyRid !== null) {
if (reqBody === null || !(reqBody instanceof ReadableStream)) {
throw new TypeError("Unreachable");
}
const reader = reqBody.getReader();
(async () => {
while (true) {
const { value, done } = await PromisePrototypeCatch(
reader.read(),
(err) => {
if (terminator.aborted) return { done: true, value: undefined };
throw err;
},
);
if (done) break;
if (!(value instanceof Uint8Array)) {
await reader.cancel("value not a Uint8Array");
break;
}
try {
await PromisePrototypeCatch(
opFetchRequestWrite(requestBodyRid, value),
(err) => {
if (terminator.aborted) return;
throw err;
},
);
if (terminator.aborted) break;
} catch (err) {
await reader.cancel(err);
break;
}
}
try {
core.close(requestBodyRid);
} catch (_) {
// might have already been closed
}
})();
}
let resp;
try {
resp = await PromisePrototypeCatch(opFetchSend(requestRid), (err) => {
if (terminator.aborted) return;
throw err;
});
} finally {
try {
core.close(cancelHandleRid);
} catch (_) {
// might have already been closed
}
}
if (terminator.aborted) return abortedNetworkError();
/** @type {InnerResponse} */
const response = {
headerList: resp.headers,
status: resp.status,
body: null,
statusMessage: resp.statusText,
type: "basic",
url() {
if (this.urlList.length == 0) return null;
return this.urlList[this.urlList.length - 1];
},
urlList: req.urlList,
};
if (redirectStatus(resp.status)) {
switch (req.redirectMode) {
case "error":
core.close(resp.responseRid);
return networkError(
"Encountered redirect while redirect mode is set to 'error'",
);
case "follow":
core.close(resp.responseRid);
return httpRedirectFetch(req, response, terminator);
case "manual":
break;
}
}
if (nullBodyStatus(response.status)) {
core.close(resp.responseRid);
} else {
if (req.method === "HEAD" || req.method === "CONNECT") {
response.body = null;
core.close(resp.responseRid);
} else {
response.body = new InnerBody(
createResponseBodyStream(resp.responseRid, terminator),
);
}
}
if (recursive) return response;
if (response.urlList.length === 0) {
response.urlList = [...req.urlList];
}
return response;
}
/**
* @param {InnerRequest} request
* @param {InnerResponse} response
* @returns {Promise<InnerResponse>}
*/
function httpRedirectFetch(request, response, terminator) {
const locationHeaders = ArrayPrototypeFilter(
response.headerList,
(entry) => entry[0] === "location",
);
if (locationHeaders.length === 0) {
return response;
}
const locationURL = new URL(
locationHeaders[0][1],
response.url() ?? undefined,
);
if (locationURL.hash === "") {
locationURL.hash = request.currentUrl().hash;
}
if (locationURL.protocol !== "https:" && locationURL.protocol !== "http:") {
return networkError("Can not redirect to a non HTTP(s) url");
}
if (request.redirectCount === 20) {
return networkError("Maximum number of redirects (20) reached");
}
request.redirectCount++;
if (
response.status !== 303 &&
request.body !== null &&
request.body.source === null
) {
return networkError(
"Can not redeliver a streaming request body after a redirect",
);
}
if (
((response.status === 301 || response.status === 302) &&
request.method === "POST") ||
(response.status === 303 &&
request.method !== "GET" &&
request.method !== "HEAD")
) {
request.method = "GET";
request.body = null;
for (let i = 0; i < request.headerList.length; i++) {
if (
ArrayPrototypeIncludes(
REQUEST_BODY_HEADER_NAMES,
request.headerList[i][0],
)
) {
ArrayPrototypeSplice(request.headerList, i, 1);
i--;
}
}
}
if (request.body !== null) {
const res = extractBody(request.body.source);
request.body = res.body;
}
ArrayPrototypePush(request.urlList, locationURL.href);
return mainFetch(request, true, terminator);
}
/**
* @param {RequestInfo} input
* @param {RequestInit} init
*/
function fetch(input, init = {}) {
// 1.
const p = new Promise((resolve, reject) => {
const prefix = "Failed to call 'fetch'";
webidl.requiredArguments(arguments.length, 1, { prefix });
input = webidl.converters["RequestInfo"](input, {
prefix,
context: "Argument 1",
});
init = webidl.converters["RequestInit"](init, {
prefix,
context: "Argument 2",
});
// 2.
const requestObject = new Request(input, init);
// 3.
const request = toInnerRequest(requestObject);
// 4.
if (requestObject.signal.aborted) {
reject(abortFetch(request, null));
return;
}
// 7.
let responseObject = null;
// 9.
let locallyAborted = false;
// 10.
function onabort() {
locallyAborted = true;
reject(abortFetch(request, responseObject));
}
requestObject.signal[abortSignal.add](onabort);
if (!requestObject.headers.has("accept")) {
ArrayPrototypePush(request.headerList, ["accept", "*/*"]);
}
// 12.
PromisePrototypeCatch(
PromisePrototypeThen(
mainFetch(request, false, requestObject.signal),
(response) => {
// 12.1.
if (locallyAborted) return;
// 12.2.
if (response.aborted) {
reject(request, responseObject);
requestObject.signal[abortSignal.remove](onabort);
return;
}
// 12.3.
if (response.type === "error") {
const err = new TypeError(
"Fetch failed: " + (response.error ?? "unknown error"),
);
reject(err);
requestObject.signal[abortSignal.remove](onabort);
return;
}
responseObject = fromInnerResponse(response, "immutable");
resolve(responseObject);
requestObject.signal[abortSignal.remove](onabort);
},
),
(err) => {
reject(err);
requestObject.signal[abortSignal.remove](onabort);
},
);
});
return p;
}
function | (request, responseObject) {
const error = new DOMException("Ongoing fetch was aborted.", "AbortError");
if (request.body !== null) request.body.cancel(error);
if (responseObject !== null) {
const response = toInnerResponse(responseObject);
if (response.body !== null) response.body.error(error);
}
return error;
}
/**
* Handle the Promise<Response> argument to the WebAssembly streaming
* APIs. This function should be registered through
* `Deno.core.setWasmStreamingCallback`.
*
* @param {any} source The source parameter that the WebAssembly
* streaming API was called with.
* @param {number} rid An rid that can be used with
* `Deno.core.wasmStreamingFeed`.
*/
function handleWasmStreaming(source, rid) {
// This implements part of
// https://webassembly.github.io/spec/web-api/#compile-a-potential-webassembly-response
(async () => {
try {
const res = webidl.converters["Response"](await source, {
prefix: "Failed to call 'WebAssembly.compileStreaming'",
context: "Argument 1",
});
// 2.3.
// The spec is ambiguous here, see
// https://github.com/WebAssembly/spec/issues/1138. The WPT tests
// expect the raw value of the Content-Type attribute lowercased.
if (
StringPrototypeToLowerCase(res.headers.get("Content-Type")) !==
"application/wasm"
) {
throw new TypeError("Invalid WebAssembly content type.");
}
// 2.5.
if (!res.ok) {
throw new TypeError(`HTTP status code ${res.status}`);
}
// 2.6.
// Rather than consuming the body as an ArrayBuffer, this passes each
// chunk to the feed as soon as it's available.
if (res.body !== null) {
const reader = res.body.getReader();
while (true) {
const { value: chunk, done } = await reader.read();
if (done) break;
Deno.core.wasmStreamingFeed(rid, "bytes", chunk);
}
}
// 2.7.
Deno.core.wasmStreamingFeed(rid, "finish");
} catch (err) {
// 2.8 and 3
Deno.core.wasmStreamingFeed(rid, "abort", err);
}
})();
}
window.__bootstrap.fetch ??= {};
window.__bootstrap.fetch.fetch = fetch;
window.__bootstrap.fetch.handleWasmStreaming = handleWasmStreaming;
})(this);
| abortFetch |
api_op_PutFile.go | // Code generated by smithy-go-codegen DO NOT EDIT.
package codecommit
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/codecommit/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Adds or updates a file in a branch in an AWS CodeCommit repository, and
// generates a commit for the addition in the specified branch.
func (c *Client) PutFile(ctx context.Context, params *PutFileInput, optFns ...func(*Options)) (*PutFileOutput, error) {
if params == nil {
params = &PutFileInput{}
}
result, metadata, err := c.invokeOperation(ctx, "PutFile", params, optFns, c.addOperationPutFileMiddlewares)
if err != nil {
return nil, err
}
out := result.(*PutFileOutput)
out.ResultMetadata = metadata
return out, nil
}
type PutFileInput struct {
// The name of the branch where you want to add or update the file. If this is an
// empty repository, this branch is created.
//
// This member is required.
BranchName *string
// The content of the file, in binary object format.
//
// This member is required.
FileContent []byte
// The name of the file you want to add or update, including the relative path to
// the file in the repository. If the path does not currently exist in the
// repository, the path is created as part of adding the file.
//
// This member is required.
FilePath *string
// The name of the repository where you want to add or update the file.
//
// This member is required.
RepositoryName *string
// A message about why this file was added or updated. Although it is optional, a
// message makes the commit history for your repository more useful.
CommitMessage *string
// An email address for the person adding or updating the file.
Email *string
// The file mode permissions of the blob. Valid file mode permissions are listed
// here.
FileMode types.FileModeTypeEnum
// The name of the person adding or updating the file. Although it is optional, a
// name makes the commit history for your repository more useful.
Name *string
// The full commit ID of the head commit in the branch where you want to add or
// update the file. If this is an empty repository, no commit ID is required. If
// this is not an empty repository, a commit ID is required. The commit ID must
// match the ID of the head commit at the time of the operation. Otherwise, an
// error occurs, and the file is not added or updated.
ParentCommitId *string
noSmithyDocumentSerde
}
type PutFileOutput struct {
// The ID of the blob, which is its SHA-1 pointer.
//
// This member is required.
BlobId *string
// The full SHA ID of the commit that contains this file change.
//
// This member is required.
CommitId *string
// The full SHA-1 pointer of the tree information for the commit that contains this
// file change.
//
// This member is required.
TreeId *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationPutFileMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsAwsjson11_serializeOpPutFile{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpPutFile{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpPutFileValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutFile(options.Region), middleware.Before); err != nil {
return err
}
if err = addRequestIDRetrieverMiddleware(stack); err != nil {
return err
}
if err = addResponseErrorMiddleware(stack); err != nil {
return err
}
if err = addRequestResponseLogging(stack, options); err != nil {
return err
}
return nil
}
func | (region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "codecommit",
OperationName: "PutFile",
}
}
| newServiceMetadataMiddleware_opPutFile |
InsurancePlan_Coverage.rs | #![allow(unused_imports, non_camel_case_types)]
use crate::models::r4b::CodeableConcept::CodeableConcept;
use crate::models::r4b::Extension::Extension;
use crate::models::r4b::InsurancePlan_Benefit::InsurancePlan_Benefit;
use crate::models::r4b::Reference::Reference;
use serde_json::json;
use serde_json::value::Value;
use std::borrow::Cow;
/// Details of a Health Insurance product/plan provided by an organization.
#[derive(Debug)]
pub struct InsurancePlan_Coverage<'a> {
pub(crate) value: Cow<'a, Value>,
}
impl InsurancePlan_Coverage<'_> {
pub fn new(value: &Value) -> InsurancePlan_Coverage {
InsurancePlan_Coverage {
value: Cow::Borrowed(value),
}
}
pub fn to_json(&self) -> Value |
/// Specific benefits under this type of coverage.
pub fn benefit(&self) -> Vec<InsurancePlan_Benefit> {
self.value
.get("benefit")
.unwrap()
.as_array()
.unwrap()
.into_iter()
.map(|e| InsurancePlan_Benefit {
value: Cow::Borrowed(e),
})
.collect::<Vec<_>>()
}
/// May be used to represent additional information that is not part of the basic
/// definition of the element. To make the use of extensions safe and manageable,
/// there is a strict set of governance applied to the definition and use of
/// extensions. Though any implementer can define an extension, there is a set of
/// requirements that SHALL be met as part of the definition of the extension.
pub fn extension(&self) -> Option<Vec<Extension>> {
if let Some(Value::Array(val)) = self.value.get("extension") {
return Some(
val.into_iter()
.map(|e| Extension {
value: Cow::Borrowed(e),
})
.collect::<Vec<_>>(),
);
}
return None;
}
/// Unique id for the element within a resource (for internal references). This may be
/// any string value that does not contain spaces.
pub fn id(&self) -> Option<&str> {
if let Some(Value::String(string)) = self.value.get("id") {
return Some(string);
}
return None;
}
/// May be used to represent additional information that is not part of the basic
/// definition of the element and that modifies the understanding of the element
/// in which it is contained and/or the understanding of the containing element's
/// descendants. Usually modifier elements provide negation or qualification. To make
/// the use of extensions safe and manageable, there is a strict set of governance
/// applied to the definition and use of extensions. Though any implementer can define
/// an extension, there is a set of requirements that SHALL be met as part of the
/// definition of the extension. Applications processing a resource are required to
/// check for modifier extensions. Modifier extensions SHALL NOT change the meaning
/// of any elements on Resource or DomainResource (including cannot change the meaning
/// of modifierExtension itself).
pub fn modifier_extension(&self) -> Option<Vec<Extension>> {
if let Some(Value::Array(val)) = self.value.get("modifierExtension") {
return Some(
val.into_iter()
.map(|e| Extension {
value: Cow::Borrowed(e),
})
.collect::<Vec<_>>(),
);
}
return None;
}
/// Reference to the network that providing the type of coverage.
pub fn network(&self) -> Option<Vec<Reference>> {
if let Some(Value::Array(val)) = self.value.get("network") {
return Some(
val.into_iter()
.map(|e| Reference {
value: Cow::Borrowed(e),
})
.collect::<Vec<_>>(),
);
}
return None;
}
/// Type of coverage (Medical; Dental; Mental Health; Substance Abuse; Vision; Drug;
/// Short Term; Long Term Care; Hospice; Home Health).
pub fn fhir_type(&self) -> CodeableConcept {
CodeableConcept {
value: Cow::Borrowed(&self.value["type"]),
}
}
pub fn validate(&self) -> bool {
if !self
.benefit()
.into_iter()
.map(|e| e.validate())
.all(|x| x == true)
{
return false;
}
if let Some(_val) = self.extension() {
if !_val.into_iter().map(|e| e.validate()).all(|x| x == true) {
return false;
}
}
if let Some(_val) = self.id() {}
if let Some(_val) = self.modifier_extension() {
if !_val.into_iter().map(|e| e.validate()).all(|x| x == true) {
return false;
}
}
if let Some(_val) = self.network() {
if !_val.into_iter().map(|e| e.validate()).all(|x| x == true) {
return false;
}
}
if !self.fhir_type().validate() {
return false;
}
return true;
}
}
#[derive(Debug)]
pub struct InsurancePlan_CoverageBuilder {
pub(crate) value: Value,
}
impl InsurancePlan_CoverageBuilder {
pub fn build(&self) -> InsurancePlan_Coverage {
InsurancePlan_Coverage {
value: Cow::Owned(self.value.clone()),
}
}
pub fn with(existing: InsurancePlan_Coverage) -> InsurancePlan_CoverageBuilder {
InsurancePlan_CoverageBuilder {
value: (*existing.value).clone(),
}
}
pub fn new(
benefit: Vec<InsurancePlan_Benefit>,
fhir_type: CodeableConcept,
) -> InsurancePlan_CoverageBuilder {
let mut __value: Value = json!({});
__value["benefit"] = json!(benefit.into_iter().map(|e| e.value).collect::<Vec<_>>());
__value["type"] = json!(fhir_type.value);
return InsurancePlan_CoverageBuilder { value: __value };
}
pub fn extension<'a>(
&'a mut self,
val: Vec<Extension>,
) -> &'a mut InsurancePlan_CoverageBuilder {
self.value["extension"] = json!(val.into_iter().map(|e| e.value).collect::<Vec<_>>());
return self;
}
pub fn id<'a>(&'a mut self, val: &str) -> &'a mut InsurancePlan_CoverageBuilder {
self.value["id"] = json!(val);
return self;
}
pub fn modifier_extension<'a>(
&'a mut self,
val: Vec<Extension>,
) -> &'a mut InsurancePlan_CoverageBuilder {
self.value["modifierExtension"] =
json!(val.into_iter().map(|e| e.value).collect::<Vec<_>>());
return self;
}
pub fn network<'a>(&'a mut self, val: Vec<Reference>) -> &'a mut InsurancePlan_CoverageBuilder {
self.value["network"] = json!(val.into_iter().map(|e| e.value).collect::<Vec<_>>());
return self;
}
}
| {
(*self.value).clone()
} |
test_mmtpa_adapter.py | from fastapi import FastAPI
from fastapi.testclient import TestClient
app = FastAPI()
@app.get("/api/v1/healthcheck")
async def read_main():
return "OK"
@app.post("/api/v1/query")
async def query():
return [{"event_date": "20210105"}]
client = TestClient(app)
def | ():
response = client.get("/api/v1/healthcheck")
assert response.status_code == 200
assert response.json() == "OK"
def test_query():
response = client.post(
"/api/v1/query",
json={
"type": "service_account",
"date": "20210105",
"projet_id": "test-project",
"private_key_id": "test",
"private_key": "testkey",
"client_email": "[email protected]",
"client_id": "test",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "ttps://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "test",
"client_x509_cert_url": "test"
}
)
assert response.status_code == 200
assert response.json() == [{"event_date": "20210105"}] | test_read_main |
eval_fromnote.py | from os.path import join,exists,realpath,dirname,basename
from os import makedirs,listdir, system
import numpy as np, _pickle as cPickle, editdistance, seaborn as sns
import matplotlib.pyplot as plt, pandas as pd, itertools, glob, h5py
from scipy.stats import entropy
from matplotlib.font_manager import FontProperties
from IPython.display import display
from collections import defaultdict
from IPython.display import display
# from itertools import izip
from scipy.stats import ranksums
import multiprocessing as mp
from PIL import Image
import inception_score
rundir = 'cifar10/'
e = 100
def | (improved_keras_dir, t_n_epoch):
score = []
for i in range(t_n_epoch-9, t_n_epoch):
print(i)
# scorefile = join(improved_keras_dir, 'epoch_{}.score'.format(i))
# if not exists(scorefile):
datafile = join(improved_keras_dir, 'epoch_{}.pkl'.format(i))
if not exists(datafile):
break
with open(datafile, 'rb') as f:
sample = cPickle.load(f)
print(len(list(sample)))
t_score = inception_score.get_inception_score(list(sample), 1)[0]
# with open(scorefile, 'w') as f:
# f.write('%f\n' % t_score)l
# else:
# with open(scorefile) as f:
# t_score = float(f.readline())
score.append(t_score)
return max(score)
expt2plot = ['optimAdam_ratio1']
for expt in expt2plot:
score = get_score(join(rundir, expt), e)
print(expt, score)
| get_score |
lib.rs | pub use platform::*;
pub type Handle = *const std::os::raw::c_void;
pub type Error = Box<dyn std::error::Error>;
#[cfg(unix)]
mod platform {
use super::{Error, Handle};
use std::ffi::{CStr, CString};
use std::os::raw::{c_char, c_int, c_void};
use std::path::Path;
pub const DYLIB_PREFIX: &str = "lib";
#[cfg(target_os = "linux")]
pub const DYLIB_EXTENSION: &str = "so";
#[cfg(target_os = "macos")]
pub const DYLIB_EXTENSION: &str = "dylib";
pub const DYLIB_SUBDIR: &str = "lib";
#[link(name = "dl")]
extern "C" {
fn dlopen(filename: *const c_char, flag: c_int) -> Handle;
fn dlclose(handle: Handle) -> c_int;
fn dlsym(handle: Handle, symbol: *const c_char) -> *const c_void;
fn dlerror() -> *const c_char;
}
const RTLD_LAZY: c_int = 0x00001;
const RTLD_GLOBAL: c_int = 0x00100;
pub unsafe fn load_library(path: &Path, global_symbols: bool) -> Result<Handle, Error> {
let cpath = CString::new(path.as_os_str().to_str().unwrap().as_bytes()).unwrap();
let flags = match global_symbols {
true => RTLD_LAZY | RTLD_GLOBAL,
false => RTLD_LAZY,
};
let handle = dlopen(cpath.as_ptr() as *const c_char, flags);
if handle.is_null() {
Err(format!("{:?}", CStr::from_ptr(dlerror())).into())
} else {
Ok(handle)
}
}
pub unsafe fn free_library(handle: Handle) -> Result<(), Error> {
if dlclose(handle) == 0 {
Ok(())
} else {
Err(format!("{:?}", CStr::from_ptr(dlerror())).into())
}
}
pub unsafe fn find_symbol(handle: Handle, name: &str) -> Result<*const c_void, Error> {
let cname = CString::new(name).unwrap();
let ptr = dlsym(handle, cname.as_ptr() as *const c_char);
if ptr.is_null() {
Err(format!("{:?}", CStr::from_ptr(dlerror())).into())
} else {
Ok(ptr)
}
}
}
#[cfg(windows)]
mod platform {
use super::{Error, Handle};
use std::env;
use std::ffi::{CString, OsStr, OsString};
use std::os::raw::{c_char, c_void};
use std::os::windows::ffi::*;
use std::path::Path;
pub const DYLIB_PREFIX: &str = "";
pub const DYLIB_EXTENSION: &str = "dll";
pub const DYLIB_SUBDIR: &str = "bin";
#[link(name = "kernel32")]
extern "system" {
fn LoadLibraryW(filename: *const u16) -> Handle;
fn FreeLibrary(handle: Handle) -> u32;
fn GetProcAddress(handle: Handle, symbol: *const c_char) -> *const c_void;
fn GetLastError() -> u32;
}
fn to_wstr(s: &OsStr) -> Vec<u16> {
s.encode_wide().chain(Some(0)).collect::<Vec<_>>()
}
pub fn add_library_directory(path: &Path) -> Result<(), Error> {
if !path.is_dir() {
return Err("Not a directory".into());
}
let mut os_path = OsString::from(path);
if let Some(val) = env::var_os("PATH") {
os_path.push(";");
os_path.push(val);
}
env::set_var("PATH", &os_path);
Ok(())
}
pub unsafe fn | (path: &Path, global_symbols: bool) -> Result<Handle, Error> {
if global_symbols {
if let Some(dir) = path.parent() {
add_library_directory(dir)?;
}
}
let handle = LoadLibraryW(to_wstr(path.as_os_str()).as_ptr());
if handle.is_null() {
Err(format!("Could not load {:?} (err={:08X})", path, GetLastError()).into())
} else {
Ok(handle)
}
}
pub unsafe fn free_library(handle: Handle) -> Result<(), Error> {
if FreeLibrary(handle) != 0 {
Ok(())
} else {
Err(format!("Could not free library (err={:08X})", GetLastError()).into())
}
}
pub unsafe fn find_symbol(handle: Handle, name: &str) -> Result<*const c_void, Error> {
let cname = CString::new(name).unwrap();
let ptr = GetProcAddress(handle, cname.as_ptr() as *const c_char);
if ptr.is_null() {
Err(format!("Could not find {} (err={:08X})", name, GetLastError()).into())
} else {
Ok(ptr)
}
}
}
| load_library |
test_security_api_key_header_optional.py | from typing import Optional
from fastapi import Depends, FastAPI, Security
from fastapi.security import APIKeyHeader
from fastapi.testclient import TestClient
from pydantic import BaseModel
app = FastAPI()
api_key = APIKeyHeader(name="key", auto_error=False)
class User(BaseModel):
username: str
def get_current_user(oauth_header: Optional[str] = Security(api_key)):
if oauth_header is None:
return None
user = User(username=oauth_header)
return user
@app.get("/users/me")
def read_current_user(current_user: Optional[User] = Depends(get_current_user)):
|
client = TestClient(app)
openapi_schema = {
"openapi": "3.0.2",
"info": {"title": "FastAPI", "version": "0.1.0"},
"paths": {
"/users/me": {
"get": {
"responses": {
"200": {
"description": "Successful Response",
"content": {"application/json": {"schema": {}}},
}
},
"summary": "Read Current User",
"operationId": "read_current_user_users_me_get",
"security": [{"APIKeyHeader": []}],
}
}
},
"components": {
"securitySchemes": {
"APIKeyHeader": {"type": "apiKey", "name": "key", "in": "header"}
}
},
}
def test_openapi_schema():
response = client.get("/openapi.json")
assert response.status_code == 200
assert response.json() == openapi_schema
def test_security_api_key():
response = client.get("/users/me", headers={"key": "secret"})
assert response.status_code == 200
assert response.json() == {"username": "secret"}
def test_security_api_key_no_key():
response = client.get("/users/me")
assert response.status_code == 200
assert response.json() == {"msg": "Create an account first"}
| if current_user is None:
return {"msg": "Create an account first"}
return current_user |
g.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# (c) Copyright 2003-2015 HP Development Company, L.P.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# Author: Don Welch
#
# NOTE: This module is safe for 'from g import *'
#
# Std Lib
import sys
import os
import os.path
from .sixext import PY3
from .sixext.moves import configparser
import locale
import pwd
import stat
import re
# Local
from .codes import *
from . import logger
from . import os_utils
from .sixext import to_unicode
if PY3:
QString = type("")
def cmp(a, b):
return (a > b) - (a < b)
# System wide logger
log = logger.Logger('', logger.Logger.LOG_LEVEL_INFO, logger.Logger.LOG_TO_CONSOLE)
log.set_level('info')
MINIMUM_PYQT_MAJOR_VER = 3
MINIMUM_PYQT_MINOR_VER = 14
MINIMUM_QT_MAJOR_VER = 3
MINIMUM_QT_MINOR_VER = 0
def to_bool(s, default=False):
if isinstance(s, str) and s:
if s[0].lower() in ['1', 't', 'y']:
return True
elif s[0].lower() in ['0', 'f', 'n']:
return False
elif isinstance(s, bool):
return s
return default
# System wide properties
class Properties(dict):
def __getattr__(self, attr):
if attr in list(self.keys()):
return self.__getitem__(attr)
else:
return ""
def __setattr__(self, attr, val):
self.__setitem__(attr, val)
prop = Properties()
class ConfigBase(object):
def __init__(self, filename):
self.filename = filename
self.conf = configparser.ConfigParser()
self.read()
def get(self, section, key, default=to_unicode('')):
try:
return self.conf.get(section, key)
except (configparser.NoOptionError, configparser.NoSectionError):
return default
def set(self, section, key, value):
if not self.conf.has_section(section):
self.conf.add_section(section)
self.conf.set(section, key, value)
self.write()
def sections(self):
return self.conf.sections()
def has_section(self, section):
return self.conf.has_section(section)
def options(self, section):
return self.conf.options(section)
keys = options
def read(self):
if self.filename is not None:
filename = self.filename
if filename.startswith("/root/"):
# Don't try opening a file in root's home directory.
log.error("attempted to read from '%s'" % self.filename)
return
try:
fp = open(self.filename, "r")
try:
self.conf.readfp(fp)
except configparser.MissingSectionHeaderError:
print("")
log.error("Found No Section in %s. Please set the http proxy for root and try again." % self.filename)
except (configparser.DuplicateOptionError):
log.warn("Found Duplicate Entery in %s" % self.filename)
self.CheckDuplicateEntries()
finally:
fp.close()
except (OSError, IOError, configparser.MissingSectionHeaderError):
log.debug("Unable to open file %s for reading." % self.filename)
def write(self):
if self.filename is not None:
filename = self.filename
if filename.startswith("/root/") or filename.startswith("/etc/"):
# Don't try writing a file in root's home directory or
# the system-wide config file.
# See bug #479178.
log.error("attempted to write to '%s'" % self.filename)
return
try:
fp = open(self.filename, "w")
self.conf.write(fp)
fp.close()
except (OSError, IOError):
log.debug("Unable to open file %s for writing." % self.filename)
def CheckDuplicateEntries(self):
try:
f = open(self.filename,'r')
data = f.read()
f.close()
except IOError:
data =""
final_data =''
for a in data.splitlines():
if not a or a not in final_data:
final_data = final_data +'\n' +a
import tempfile
fd, self.filename = tempfile.mkstemp()
f = open(self.filename,'w')
f.write(final_data)
f.close()
self.read()
os.unlink(self.filename)
class SysConfig(ConfigBase):
def __init__(self):
ConfigBase.__init__(self, '/etc/hp/hplip.conf')
class State(ConfigBase):
def __init__(self):
if not os.path.exists('/var/lib/hp/') and os.geteuid() == 0:
os.makedirs('/var/lib/hp/')
cmd = 'chmod 755 /var/lib/hp/'
os_utils.execute(cmd)
ConfigBase.__init__(self, '/var/lib/hp/hplip.state')
class UserConfig(ConfigBase):
def __init__(self):
sts, prop.user_dir = os_utils.getHPLIPDir()
if not os.geteuid() == 0:
prop.user_config_file = os.path.join(prop.user_dir, 'hplip.conf')
if not os.path.exists(prop.user_config_file):
try:
open(prop.user_config_file, 'w').close()
s = os.stat(os.path.dirname(prop.user_config_file))
os.chown(prop.user_config_file, s[stat.ST_UID], s[stat.ST_GID])
except IOError:
pass
ConfigBase.__init__(self, prop.user_config_file)
else:
# If running as root, conf file is None
prop.user_config_file = None
ConfigBase.__init__(self, None)
def workingDirectory(self):
t = self.get('last_used', 'working_dir', os.path.expanduser("~"))
try:
t = t.decode('utf-8')
except UnicodeError:
log.error("Invalid unicode: %s" % t)
log.debug("working directory: %s" % t)
return t
def setWorkingDirectory(self, t):
self.set('last_used', 'working_dir', t.encode('utf-8'))
log.debug("working directory: %s" % t.encode('utf-8'))
os.umask(0o037)
# System Config File: Directories and build settings. Not altered after installation.
sys_conf = SysConfig()
# System State File: System-wide runtime settings
sys_state = State()
# Per-user Settings File: (Note: For Qt4 code, limit the use of this to non-GUI apps. only)
user_conf = UserConfig()
# Language settings
try:
prop.locale, prop.encoding = locale.getdefaultlocale()
except ValueError:
prop.locale = 'en_US'
prop.encoding = 'UTF8'
prop.version = sys_conf.get('hplip', 'version', '0.0.0') # e.g., 3.9.2b.10
_p, _x = re.compile(r'(\d\w*)', re.I), []
for _y in prop.version.split('.')[:3]:
_z = _p.match(_y)
if _z is not None:
_x.append(_z.group(1))
prop.installed_version = '.'.join(_x) # e.g., '3.9.2'
try:
prop.installed_version_int = int(''.join(['%02x' % int(_y) for _y in _x]), 16) # e.g., 0x030902 -> 198914
except ValueError:
prop.installed_version_int = 0
prop.home_dir = sys_conf.get('dirs', 'home', os.path.realpath(os.path.normpath(os.getcwd())))
prop.username = pwd.getpwuid(os.getuid())[0]
pdb = pwd.getpwnam(prop.username)
prop.userhome = pdb[5]
prop.history_size = 50
prop.data_dir = os.path.join(prop.home_dir, 'data')
prop.image_dir = os.path.join(prop.home_dir, 'data', 'images')
prop.xml_dir = os.path.join(prop.home_dir, 'data', 'xml')
prop.models_dir = os.path.join(prop.home_dir, 'data', 'models')
prop.localization_dir = os.path.join(prop.home_dir, 'data', 'localization')
prop.max_message_len = 8192
prop.max_message_read = 65536
prop.read_timeout = 90
prop.ppd_search_path = '/usr/share;/usr/local/share;/usr/lib;/usr/local/lib;/usr/libexec;/opt;/usr/lib64'
prop.ppd_search_pattern = 'HP-*.ppd.*'
prop.ppd_download_url = 'http://www.linuxprinting.org/ppd-o-matic.cgi'
prop.ppd_file_suffix = '-hpijs.ppd'
# Build and install configurations
prop.gui_build = to_bool(sys_conf.get('configure', 'gui-build', '0'))
prop.net_build = to_bool(sys_conf.get('configure', 'network-build', '0'))
prop.par_build = to_bool(sys_conf.get('configure', 'pp-build', '0'))
prop.usb_build = True
prop.scan_build = to_bool(sys_conf.get('configure', 'scanner-build', '0'))
prop.fax_build = to_bool(sys_conf.get('configure', 'fax-build', '0'))
prop.doc_build = to_bool(sys_conf.get('configure', 'doc-build', '0'))
prop.foomatic_xml_install = to_bool(sys_conf.get('configure', 'foomatic-xml-install', '0'))
prop.foomatic_ppd_install = to_bool(sys_conf.get('configure', 'foomatic-ppd-install', '0'))
prop.hpcups_build = to_bool(sys_conf.get('configure', 'hpcups-install', '0'))
prop.hpijs_build = to_bool(sys_conf.get('configure', 'hpijs-install', '0'))
# Spinner, ala Gentoo Portage
spinner = "\|/-\|/-"
spinpos = 0
enable_spinner = True
def change_spinner_state(enable =True):
global enable_spinner
enable_spinner = enable
def update_spinner():
global spinner, spinpos, enable_spinner
if enable_spinner and not log.is_debug() and sys.stdout.isatty():
sys.stdout.write("\b" + spinner[spinpos])
spinpos=(spinpos + 1) % 8
sys.stdout.flush()
def cleanup_spinner():
global enable_spinner
if enable_spinner and not log.is_debug() and sys.stdout.isatty():
sys.stdout.write("\b \b")
sys.stdout.flush()
# Convert string to int and return a list.
def xint(ver):
try:
l = [int(x) for x in ver.split('.')]
except:
pass
return l
# In case of import failure of extension modules, check whether its a mixed python environment issue.
def check_extension_module_env(ext_mod):
flag = 0
ext_mod_so = ext_mod + '.so'
python_ver = xint((sys.version).split(' ')[0]) #find the current python version ; xint() to convert string to int, returns a list
if python_ver[0] == 3 :
python_ver = 3
else :
python_ver = 2
for dirpath, dirname, filenames in os.walk('/usr/lib/'): #find the .so path
if ext_mod_so in filenames:
ext_path = dirpath
flag = 1
if flag == 0:
log.error('%s not present in the system. Please re-install HPLIP.' %ext_mod)
sys.exit(1)
m = re.search('python(\d(\.\d){0,2})', ext_path) #get the python version where the .so file is found
ext_ver = xint(m.group(1))
if ext_ver[0] == 3:
ver = 3
else:
ver = 2
if python_ver != ver : #compare the python version and the version where .so files are present
log.error("%s Extension module is missing from Python's path." %ext_mod)
log.info("To fix this issue, please refer to this 'http://hplipopensource.com/node/372'")
sys.exit(1)
# Internal/messaging errors
ERROR_STRINGS = {
ERROR_SUCCESS : 'No error',
ERROR_UNKNOWN_ERROR : 'Unknown error',
ERROR_DEVICE_NOT_FOUND : 'Device not found',
ERROR_INVALID_DEVICE_ID : 'Unknown/invalid device-id field',
ERROR_INVALID_DEVICE_URI : 'Unknown/invalid device-uri field',
ERROR_DATA_LENGTH_EXCEEDS_MAX : 'Data length exceeds maximum',
ERROR_DEVICE_IO_ERROR : 'Device I/O error',
ERROR_NO_PROBED_DEVICES_FOUND : 'No probed devices found',
ERROR_DEVICE_BUSY : 'Device busy',
ERROR_DEVICE_STATUS_NOT_AVAILABLE : 'DeviceStatus not available',
ERROR_INVALID_SERVICE_NAME : 'Invalid service name',
ERROR_ERROR_INVALID_CHANNEL_ID : 'Invalid channel-id (service name)',
ERROR_CHANNEL_BUSY : 'Channel busy',
ERROR_DEVICE_DOES_NOT_SUPPORT_OPERATION : 'Device does not support operation',
ERROR_DEVICEOPEN_FAILED : 'Device open failed',
ERROR_INVALID_DEVNODE : 'Invalid device node',
ERROR_INVALID_HOSTNAME : "Invalid hostname ip address",
ERROR_INVALID_PORT_NUMBER : "Invalid JetDirect port number",
ERROR_NO_CUPS_QUEUE_FOUND_FOR_DEVICE : "No CUPS queue found for device.",
ERROR_DATFILE_ERROR: "DAT file error",
ERROR_INVALID_TIMEOUT: "Invalid timeout",
ERROR_IO_TIMEOUT: "I/O timeout",
ERROR_FAX_INCOMPATIBLE_OPTIONS: "Incompatible fax options",
ERROR_FAX_INVALID_FAX_FILE: "Invalid fax file",
ERROR_FAX_FILE_NOT_FOUND: "Fax file not found",
ERROR_INTERNAL : 'Unknown internal error',
}
class Error(Exception):
def __init__(self, opt=ERROR_INTERNAL):
self.opt = opt | self.msg = ERROR_STRINGS.get(opt, ERROR_STRINGS[ERROR_INTERNAL])
log.debug("Exception: %d (%s)" % (opt, self.msg))
Exception.__init__(self, self.msg, opt)
# Make sure True and False are avail. in pre-2.2 versions
#try:
# True
#except NameError:
# True = (1==1)
# False = not True
# as new translations are completed, add them here
supported_locales = { 'en_US': ('us', 'en', 'en_us', 'american', 'america', 'usa', 'english'),}
# Localization support was disabled in 3.9.2
#'zh_CN': ('zh', 'cn', 'zh_cn' , 'china', 'chinese', 'prc'),
#'de_DE': ('de', 'de_de', 'german', 'deutsche'),
#'fr_FR': ('fr', 'fr_fr', 'france', 'french', 'français'),
#'it_IT': ('it', 'it_it', 'italy', 'italian', 'italiano'),
#'ru_RU': ('ru', 'ru_ru', 'russian'),
#'pt_BR': ('pt', 'br', 'pt_br', 'brazil', 'brazilian', 'portuguese', 'brasil', 'portuguesa'),
#'es_MX': ('es', 'mx', 'es_mx', 'mexico', 'spain', 'spanish', 'espanol', 'español'),
#} | |
deps.rs | //! Checks the licenses of third-party dependencies.
use cargo_metadata::{Metadata, Package, PackageId, Resolve};
use std::collections::{BTreeSet, HashSet};
use std::path::Path;
/// These are licenses that are allowed for all crates, including the runtime,
/// rustc, tools, etc.
const LICENSES: &[&str] = &[
"MIT/Apache-2.0",
"MIT / Apache-2.0",
"Apache-2.0/MIT",
"Apache-2.0 / MIT",
"MIT OR Apache-2.0",
"Apache-2.0 OR MIT",
"Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT", // wasi license
"MIT",
"Unlicense/MIT",
"Unlicense OR MIT",
];
/// These are exceptions to Rust's permissive licensing policy, and
/// should be considered bugs. Exceptions are only allowed in Rust
/// tooling. It is _crucial_ that no exception crates be dependencies
/// of the Rust runtime (std/test).
const EXCEPTIONS: &[(&str, &str)] = &[
("mdbook", "MPL-2.0"), // mdbook
("openssl", "Apache-2.0"), // cargo, mdbook
("arrayref", "BSD-2-Clause"), // mdbook via handlebars via pest
("toml-query", "MPL-2.0"), // mdbook
("toml-query_derive", "MPL-2.0"), // mdbook
("is-match", "MPL-2.0"), // mdbook
("rdrand", "ISC"), // mdbook, rustfmt
("fuchsia-cprng", "BSD-3-Clause"), // mdbook, rustfmt
("fuchsia-zircon-sys", "BSD-3-Clause"), // rustdoc, rustc, cargo
("fuchsia-zircon", "BSD-3-Clause"), // rustdoc, rustc, cargo (jobserver & tempdir)
("colored", "MPL-2.0"), // rustfmt
("ordslice", "Apache-2.0"), // rls
("cloudabi", "BSD-2-Clause"), // (rls -> crossbeam-channel 0.2 -> rand 0.5)
("ryu", "Apache-2.0 OR BSL-1.0"), // rls/cargo/... (because of serde)
("bytesize", "Apache-2.0"), // cargo
("im-rc", "MPL-2.0+"), // cargo
("adler32", "BSD-3-Clause AND Zlib"), // cargo dep that isn't used
("constant_time_eq", "CC0-1.0"), // rustfmt
("sized-chunks", "MPL-2.0+"), // cargo via im-rc
("bitmaps", "MPL-2.0+"), // cargo via im-rc
// FIXME: this dependency violates the documentation comment above:
("fortanix-sgx-abi", "MPL-2.0"), // libstd but only for `sgx` target
("dunce", "CC0-1.0"), // mdbook-linkcheck
("codespan-reporting", "Apache-2.0"), // mdbook-linkcheck
("codespan", "Apache-2.0"), // mdbook-linkcheck
("crossbeam-channel", "MIT/Apache-2.0 AND BSD-2-Clause"), // cargo
];
/// These are the root crates that are part of the runtime. The licenses for
/// these and all their dependencies *must not* be in the exception list.
const RUNTIME_CRATES: &[&str] = &["std", "core", "alloc", "test", "panic_abort", "panic_unwind"];
/// Which crates to check against the whitelist?
const WHITELIST_CRATES: &[&str] = &["rustc", "rustc_codegen_llvm"];
/// Whitelist of crates rustc is allowed to depend on. Avoid adding to the list if possible.
///
/// This list is here to provide a speed-bump to adding a new dependency to
/// rustc. Please check with the compiler team before adding an entry.
const WHITELIST: &[&str] = &[
"adler32",
"aho-corasick",
"annotate-snippets",
"ansi_term",
"arrayvec",
"atty",
"autocfg",
"backtrace",
"backtrace-sys",
"bitflags",
"byteorder",
"c2-chacha",
"cc",
"cfg-if",
"cloudabi",
"cmake",
"compiler_builtins",
"crc32fast",
"crossbeam-deque",
"crossbeam-epoch",
"crossbeam-queue",
"crossbeam-utils",
"datafrog",
"dlmalloc",
"either",
"ena",
"env_logger",
"filetime",
"flate2",
"fortanix-sgx-abi",
"fuchsia-zircon",
"fuchsia-zircon-sys",
"getopts",
"getrandom",
"hashbrown",
"hermit-abi",
"humantime",
"indexmap",
"itertools",
"jobserver",
"kernel32-sys",
"lazy_static",
"libc",
"libz-sys",
"lock_api",
"log",
"log_settings",
"measureme",
"memchr",
"memmap",
"memoffset",
"miniz_oxide",
"nodrop",
"num_cpus",
"parking_lot",
"parking_lot_core",
"pkg-config",
"polonius-engine",
"ppv-lite86",
"proc-macro2",
"punycode",
"quick-error",
"quote",
"rand",
"rand_chacha",
"rand_core",
"rand_hc",
"rand_isaac",
"rand_pcg",
"rand_xorshift",
"redox_syscall",
"redox_termios",
"regex",
"regex-syntax",
"remove_dir_all",
"rustc-demangle",
"rustc-hash",
"rustc-rayon",
"rustc-rayon-core",
"rustc_version",
"scoped-tls",
"scopeguard",
"semver",
"semver-parser",
"serde",
"serde_derive",
"smallvec",
"stable_deref_trait",
"syn",
"synstructure",
"tempfile",
"termcolor",
"termion",
"termize",
"thread_local",
"ucd-util",
"unicode-normalization",
"unicode-script",
"unicode-security",
"unicode-width",
"unicode-xid",
"utf8-ranges",
"vcpkg",
"version_check",
"wasi",
"winapi",
"winapi-build",
"winapi-i686-pc-windows-gnu",
"winapi-util",
"winapi-x86_64-pc-windows-gnu",
"wincolor",
// Yorick.
"fallible-iterator",
"num-traits",
"rmp",
"rmp-serde",
"ykpack",
];
/// Dependency checks.
///
/// `path` is path to the `src` directory, `cargo` is path to the cargo executable.
pub fn check(path: &Path, cargo: &Path, bad: &mut bool) {
let mut cmd = cargo_metadata::MetadataCommand::new();
cmd.cargo_path(cargo)
.manifest_path(path.parent().unwrap().join("Cargo.toml"))
.features(cargo_metadata::CargoOpt::AllFeatures);
let metadata = t!(cmd.exec());
check_exceptions(&metadata, bad);
check_whitelist(&metadata, bad);
check_crate_duplicate(&metadata, bad);
}
/// Check that all licenses are in the valid list in `LICENSES`.
///
/// Packages listed in `EXCEPTIONS` are allowed for tools.
fn check_exceptions(metadata: &Metadata, bad: &mut bool) {
// Validate the EXCEPTIONS list hasn't changed.
for (name, license) in EXCEPTIONS {
// Check that the package actually exists.
if !metadata.packages.iter().any(|p| p.name == *name) {
println!(
"could not find exception package `{}`\n\
Remove from EXCEPTIONS list if it is no longer used.",
name
);
*bad = true;
}
// Check that the license hasn't changed.
for pkg in metadata.packages.iter().filter(|p| p.name == *name) {
if pkg.name == "fuchsia-cprng" {
// This package doesn't declare a license expression. Manual
// inspection of the license file is necessary, which appears
// to be BSD-3-Clause.
assert!(pkg.license.is_none());
continue;
}
match &pkg.license {
None => {
println!(
"dependency exception `{}` does not declare a license expression",
pkg.id
);
*bad = true;
}
Some(pkg_license) => {
if pkg_license.as_str() != *license {
println!("dependency exception `{}` license has changed", name);
println!(" previously `{}` now `{}`", license, pkg_license);
println!(" update EXCEPTIONS for the new license");
*bad = true;
}
}
}
}
}
let exception_names: Vec<_> = EXCEPTIONS.iter().map(|(name, _license)| *name).collect();
let runtime_ids = compute_runtime_crates(metadata);
// Check if any package does not have a valid license.
for pkg in &metadata.packages {
if pkg.source.is_none() {
// No need to check local packages.
continue;
}
if !runtime_ids.contains(&pkg.id) && exception_names.contains(&pkg.name.as_str()) {
continue;
}
let license = match &pkg.license {
Some(license) => license,
None => {
println!("dependency `{}` does not define a license expression", pkg.id,);
*bad = true;
continue;
}
};
if !LICENSES.contains(&license.as_str()) {
if pkg.name == "fortanix-sgx-abi" {
// This is a specific exception because SGX is considered
// "third party". See
// https://github.com/rust-lang/rust/issues/62620 for more. In
// general, these should never be added.
continue;
}
println!("invalid license `{}` in `{}`", license, pkg.id);
*bad = true;
}
}
}
/// Checks the dependency of `WHITELIST_CRATES` at the given path. Changes `bad` to `true` if a
/// check failed.
///
/// Specifically, this checks that the dependencies are on the `WHITELIST`.
fn check_whitelist(metadata: &Metadata, bad: &mut bool) {
// Check that the WHITELIST does not have unused entries.
for name in WHITELIST {
if !metadata.packages.iter().any(|p| p.name == *name) {
println!(
"could not find whitelisted package `{}`\n\
Remove from WHITELIST list if it is no longer used.",
name
);
*bad = true;
}
}
// Get the whitelist in a convenient form.
let whitelist: HashSet<_> = WHITELIST.iter().cloned().collect();
// Check dependencies.
let mut visited = BTreeSet::new();
let mut unapproved = BTreeSet::new();
for &krate in WHITELIST_CRATES.iter() {
let pkg = pkg_from_name(metadata, krate);
let mut bad = check_crate_whitelist(&whitelist, metadata, &mut visited, pkg);
unapproved.append(&mut bad);
}
if !unapproved.is_empty() {
println!("Dependencies not on the whitelist:");
for dep in unapproved {
println!("* {}", dep);
}
*bad = true;
}
}
/// Checks the dependencies of the given crate from the given cargo metadata to see if they are on
/// the whitelist. Returns a list of illegal dependencies.
fn check_crate_whitelist<'a>(
whitelist: &'a HashSet<&'static str>,
metadata: &'a Metadata,
visited: &mut BTreeSet<&'a PackageId>,
krate: &'a Package,
) -> BTreeSet<&'a PackageId> {
// This will contain bad deps.
let mut unapproved = BTreeSet::new();
// Check if we have already visited this crate.
if visited.contains(&krate.id) {
return unapproved;
}
visited.insert(&krate.id);
// If this path is in-tree, we don't require it to be on the whitelist.
if krate.source.is_some() {
// If this dependency is not on `WHITELIST`, add to bad set.
if !whitelist.contains(krate.name.as_str()) {
unapproved.insert(&krate.id);
}
}
// Do a DFS in the crate graph.
let to_check = deps_of(metadata, &krate.id);
for dep in to_check {
let mut bad = check_crate_whitelist(whitelist, metadata, visited, dep);
unapproved.append(&mut bad);
}
unapproved
}
/// Prevents multiple versions of some expensive crates.
fn check_crate_duplicate(metadata: &Metadata, bad: &mut bool) {
const FORBIDDEN_TO_HAVE_DUPLICATES: &[&str] = &[
// These two crates take quite a long time to build, so don't allow two versions of them
// to accidentally sneak into our dependency graph, in order to ensure we keep our CI times
// under control.
"cargo",
"rustc-ap-syntax",
];
for &name in FORBIDDEN_TO_HAVE_DUPLICATES {
let matches: Vec<_> = metadata.packages.iter().filter(|pkg| pkg.name == name).collect();
match matches.len() {
0 => {
println!(
"crate `{}` is missing, update `check_crate_duplicate` \
if it is no longer used",
name
);
*bad = true;
}
1 => {}
_ => {
println!(
"crate `{}` is duplicated in `Cargo.lock`, \
it is too expensive to build multiple times, \
so make sure only one version appears across all dependencies",
name
);
for pkg in matches {
println!(" * {}", pkg.id);
}
*bad = true;
}
}
}
}
/// Returns a list of dependencies for the given package.
fn deps_of<'a>(metadata: &'a Metadata, pkg_id: &'a PackageId) -> Vec<&'a Package> {
let resolve = metadata.resolve.as_ref().unwrap();
let node = resolve
.nodes
.iter()
.find(|n| &n.id == pkg_id)
.unwrap_or_else(|| panic!("could not find `{}` in resolve", pkg_id));
node.deps
.iter()
.map(|dep| {
metadata.packages.iter().find(|pkg| pkg.id == dep.pkg).unwrap_or_else(|| {
panic!("could not find dep `{}` for pkg `{}` in resolve", dep.pkg, pkg_id)
})
})
.collect()
}
/// Finds a package with the given name.
fn pkg_from_name<'a>(metadata: &'a Metadata, name: &'static str) -> &'a Package {
let mut i = metadata.packages.iter().filter(|p| p.name == name);
let result =
i.next().unwrap_or_else(|| panic!("could not find package `{}` in package list", name));
assert!(i.next().is_none(), "more than one package found for `{}`", name);
result
}
/// Finds all the packages that are in the rust runtime.
fn compute_runtime_crates<'a>(metadata: &'a Metadata) -> HashSet<&'a PackageId> {
let resolve = metadata.resolve.as_ref().unwrap();
let mut result = HashSet::new();
for name in RUNTIME_CRATES {
let id = &pkg_from_name(metadata, name).id;
normal_deps_of_r(resolve, id, &mut result);
}
result
}
/// Recursively find all normal dependencies.
fn | <'a>(
resolve: &'a Resolve,
pkg_id: &'a PackageId,
result: &mut HashSet<&'a PackageId>,
) {
if !result.insert(pkg_id) {
return;
}
let node = resolve
.nodes
.iter()
.find(|n| &n.id == pkg_id)
.unwrap_or_else(|| panic!("could not find `{}` in resolve", pkg_id));
// Don't care about dev-dependencies.
// Build dependencies *shouldn't* matter unless they do some kind of
// codegen. For now we'll assume they don't.
let deps = node.deps.iter().filter(|node_dep| {
node_dep
.dep_kinds
.iter()
.any(|kind_info| kind_info.kind == cargo_metadata::DependencyKind::Normal)
});
for dep in deps {
normal_deps_of_r(resolve, &dep.pkg, result);
}
}
| normal_deps_of_r |
struct.go | package filehelper
import (
"bytes"
"errors"
"fmt"
"io/ioutil"
"os"
csvmap "github.com/recursionpharma/go-csv-map"
"github.com/shoobyban/mxj"
"github.com/shoobyban/slog"
)
// ParserFunc is to parse a []byte into an interface{}
type ParserFunc func([]byte) (interface{}, error)
// Parser is the main type
type Parser struct { | func NewParser() *Parser {
return &Parser{
parsers: map[string]ParserFunc{
"xml": func(content []byte) (interface{}, error) {
return mxj.NewMapXml(content)
},
"json": func(content []byte) (interface{}, error) {
return mxj.NewMapJson(content)
},
"csv": func(content []byte) (interface{}, error) {
r := csvmap.NewReader(bytes.NewBuffer(content))
r.Reader.LazyQuotes = true
var err error
r.Columns, err = r.ReadHeader()
if err != nil {
slog.Errorf("Error reading csv header %v", err)
}
return r.ReadAll()
},
},
}
}
// RegisterParser registers or overrides a format parser func. Indices are lower case.
func (l *Parser) RegisterParser(format string, parser ParserFunc) {
l.parsers[format] = parser
}
// ReadStruct reads from given file, parsing into structure
func (l *Parser) ReadStruct(filename, format string) (interface{}, error) {
f, err := os.Open(filename)
if err != nil {
slog.Infof("Can't open file %s", filename)
return nil, err
}
defer f.Close()
byteValue, _ := ioutil.ReadAll(f)
return l.ParseStruct(byteValue, format)
}
// ParseStruct parses byte slice into map or slice
func (l *Parser) ParseStruct(content []byte, format string) (interface{}, error) {
var out interface{}
var err error
if parser, ok := l.parsers[format]; ok {
out, err = parser(content)
} else {
return nil, errors.New("Unknown file")
}
if err != nil {
return nil, fmt.Errorf("Can't parse %s: %v", format, err)
}
return out, nil
} | parsers map[string]ParserFunc
}
// NewParser defines a new parser |
userinfomodel.go | package mysql
import (
"database/sql"
"fmt"
"strings"
"time"
"github.com/zeromicro/go-zero/core/stores/builder"
"github.com/zeromicro/go-zero/core/stores/cache"
"github.com/zeromicro/go-zero/core/stores/sqlc"
"github.com/zeromicro/go-zero/core/stores/sqlx"
"github.com/zeromicro/go-zero/core/stringx"
)
var (
userInfoFieldNames = builder.RawFieldNames(&UserInfo{})
userInfoRows = strings.Join(userInfoFieldNames, ",")
userInfoRowsExpectAutoSet = strings.Join(stringx.Remove(userInfoFieldNames, "`create_time`", "`update_time`"), ",")
userInfoRowsWithPlaceHolder = strings.Join(stringx.Remove(userInfoFieldNames, "`uid`", "`create_time`", "`update_time`"), "=?,") + "=?"
cacheUserInfoUidPrefix = "cache#userInfo#uid#"
)
type (
UserInfoModel interface {
Insert(data UserInfo) (sql.Result, error)
InsertOrUpdate(data UserInfo) error
FindOne(uid int64) (*UserInfo, error)
Update(data UserInfo) error
Delete(uid int64) error
}
defaultUserInfoModel struct {
sqlc.CachedConn
table string
}
UserInfo struct {
Uid int64 `db:"uid"` // 用户id
UserName string `db:"userName"` // 用户名
NickName string `db:"nickName"` // 用户的昵称
InviterUid int64 `db:"inviterUid"` // 邀请人用户id
InviterId string `db:"inviterId"` // 邀请码
Sex int64 `db:"sex"` // 用户的性别,值为1时是男性,值为2时是女性,值为0时是未知
City string `db:"city"` // 用户所在城市
Country string `db:"country"` // 用户所在国家
Province string `db:"province"` // 用户所在省份
Language string `db:"language"` // 用户的语言,简体中文为zh_CN
HeadImgUrl string `db:"headImgUrl"` // 用户头像
CreatedTime sql.NullTime `db:"createdTime"`
UpdatedTime sql.NullTime `db:"updatedTime"`
DeletedTime sql.NullTime `db:"deletedTime"`
}
)
func NewUserInfoModel(conn sqlx.SqlConn, c cache.CacheConf) UserInfoModel {
return &defaultUserInfoModel{
CachedConn: sqlc.NewConn(conn, c),
table: "`user_info`",
}
}
func (m *defaultUserInfoModel) Insert(data UserIn | ?, ?, ?, ?, ?)", m.table, userInfoRowsExpectAutoSet)
ret, err := m.ExecNoCache(query, data.Uid, data.UserName, data.NickName, data.InviterUid, data.InviterId, data.Sex, data.City, data.Country, data.Province, data.Language, data.HeadImgUrl, data.CreatedTime, data.UpdatedTime, data.DeletedTime)
return ret, err
}
func (m *defaultUserInfoModel) FindOne(uid int64) (*UserInfo, error) {
userInfoUidKey := fmt.Sprintf("%s%v", cacheUserInfoUidPrefix, uid)
var resp UserInfo
err := m.QueryRow(&resp, userInfoUidKey, func(conn sqlx.SqlConn, v interface{}) error {
query := fmt.Sprintf("select %s from %s where `uid` = ? limit 1", userInfoRows, m.table)
return conn.QueryRow(v, query, uid)
})
switch err {
case nil:
return &resp, nil
case sqlc.ErrNotFound:
return nil, ErrNotFound
default:
return nil, err
}
}
func (m *defaultUserInfoModel) Update(data UserInfo) error {
data.UpdatedTime = sql.NullTime{Valid: true, Time: time.Now()}
userInfoUidKey := fmt.Sprintf("%s%v", cacheUserInfoUidPrefix, data.Uid)
_, err := m.Exec(func(conn sqlx.SqlConn) (result sql.Result, err error) {
query := fmt.Sprintf("update %s set %s where `uid` = ?", m.table, userInfoRowsWithPlaceHolder)
return conn.Exec(query, data.UserName, data.NickName, data.InviterUid, data.InviterId, data.Sex, data.City, data.Country, data.Province, data.Language, data.HeadImgUrl, data.CreatedTime, data.UpdatedTime, data.DeletedTime, data.Uid)
}, userInfoUidKey)
return err
}
func (m *defaultUserInfoModel) InsertOrUpdate(data UserInfo) error {
_, err := m.FindOne(data.Uid)
switch err {
case nil: //如果找到了直接更新
err = m.Update(data)
case ErrNotFound: //如果没找到则插入
_, err = m.Insert(data)
}
return err
}
func (m *defaultUserInfoModel) Delete(uid int64) error {
userInfoUidKey := fmt.Sprintf("%s%v", cacheUserInfoUidPrefix, uid)
_, err := m.Exec(func(conn sqlx.SqlConn) (result sql.Result, err error) {
query := fmt.Sprintf("delete from %s where `uid` = ?", m.table)
return conn.Exec(query, uid)
}, userInfoUidKey)
return err
}
func (m *defaultUserInfoModel) formatPrimary(primary interface{}) string {
return fmt.Sprintf("%s%v", cacheUserInfoUidPrefix, primary)
}
func (m *defaultUserInfoModel) queryPrimary(conn sqlx.SqlConn, v, primary interface{}) error {
query := fmt.Sprintf("select %s from %s where `uid` = ? limit 1", userInfoRows, m.table)
return conn.QueryRow(v, query, primary)
}
| fo) (sql.Result, error) {
query := fmt.Sprintf("insert into %s (%s) values (?, ?, ?, ?, ?, ?, ?, ?, ?, |
peb.rs | use crate::{process::ImageDosHeader, structs::UnicodeString};
use std::ffi::c_void;
extern "C" {
fn get_peb() -> *const Peb;
}
// Derived from https://sourceforge.net/p/mingw-w64/mingw-w64/ci/3fb0b9bd05b99762c12492e92e359e69281a0938/tree/mingw-w64-headers/include/ntdef.h#l663
#[repr(C)]
pub struct LdrDataTableListEntry {
pub flink: *const LdrDataTableListEntry,
pub blink: *const LdrDataTableListEntry,
}
// If you are wondering what happens here, I am walking the list backwards.
// Apparently, certain EDRs have started placing decoy ntdll objects in the
// list, and as far as I have heard, the fake entries are placed before the
// actual ntdll entry, so walking backwards _should_ find the actual ntdll
// first.
impl IntoIterator for &LdrDataTableListEntry {
type Item = *const LdrDataTableEntry;
type IntoIter = LdrDataTableListIterator;
fn into_iter(self) -> Self::IntoIter {
LdrDataTableListIterator {
current: unsafe { (*self.blink).flink },
top: Some(unsafe { (*self.flink).flink }),
}
}
}
pub struct LdrDataTableListIterator {
current: *const LdrDataTableListEntry,
top: Option<*const LdrDataTableListEntry>,
}
impl Iterator for LdrDataTableListIterator {
type Item = *const LdrDataTableEntry;
fn next(&mut self) -> Option<Self::Item> {
unsafe {
if (*self.current).blink.is_null() || self.top == None {
return None;
}
if self.top == Some((*self.current).flink) {
self.top = None;
}
self.current = (*self.current).blink;
let ptr = self.current as usize;
Some((ptr - std::mem::size_of::<LdrDataTableListEntry>()) as *const LdrDataTableEntry)
}
}
}
// Derived from https://sourceforge.net/p/mingw-w64/mingw-w64/ci/3fb0b9bd05b99762c12492e92e359e69281a0938/tree/mingw-w64-headers/include/winternl.h#l44
#[repr(C)]
pub struct LdrData {
pub reserved1: [u8; 8],
pub reserved2: [*const c_void; 3],
pub in_memory_order_module_list: LdrDataTableListEntry,
}
// Derived from https://github.com/stephenfewer/ReflectiveDLLInjection/blob/4a1b9bbbeed9a80758e12586796e67b3f54fa3d6/dll/src/ReflectiveLoader.h#L89
// See licenses/reflectivedllinjection.LICENSE for license.
#[repr(C)]
pub struct LdrDataTableEntry {
pub in_load_order_links: LdrDataTableListEntry,
pub in_memory_order_module_list: LdrDataTableListEntry,
pub in_initialization_order_module_list: LdrDataTableListEntry,
pub dll_base: *const ImageDosHeader,
pub entry_point: *const c_void,
pub size_of_image: u32,
pub full_dll_name: UnicodeString,
pub base_dll_name: UnicodeString,
pub flags: u32,
pub load_count: i16,
pub tls_index: i16,
pub hash_table_entry: LdrDataTableListEntry,
pub time_date_stamp: u32,
}
// Derived from https://github.com/CylanceVulnResearch/ReflectiveDLLRefresher/blob/c19b83e715454fd62d7d4070d8f61d64e278802f/src/ReflectiveLoader.h#L147
// Which in turn was based on a more recent(?) version of
// https://github.com/stephenfewer/ReflectiveDLLInjection/blob/178ba2a6a9feee0a9d9757dcaa65168ced588c12/dll/src/ReflectiveLoader.h#L127 as far as I can tell
// See licenses/reflectivedllinjection.LICENSE for the license of the original struct and licenses/reflectivedllrefresher.LICENSE for the license of the modified version.
// TODO consider whether it is worth it to remove anything after api_set_map if it is not needed
#[repr(C)]
pub struct Peb {
pub inherited_address_space: u8,
pub read_image_file_exec_options: u8,
pub being_debugged: u8,
pub spare_bool: u8,
pub mutant: *const c_void,
pub image_base_address: *const c_void,
pub ldr: *const LdrData,
pub process_parameters: *const RtlUserProcessParameters,
pub sub_system_data: *const c_void,
pub process_heap: *const c_void,
pub fast_peb_lock: *const c_void,
pub fast_peb_lock_routine: *const c_void,
pub fast_peb_unlock_routine: *const c_void,
pub environment_update_count: u32,
pub kernel_callback_table: *const c_void,
pub system_reserved: u32,
pub atl_thunk_slist_ptr32: u32,
pub api_set_map: crate::api_set_map::ApiSetMap,
pub tls_expansion_counter: u32,
pub tls_bitmap: *const c_void,
pub tls_bitmap_bits: [u32; 2],
pub read_only_shared_memory_base: *const c_void,
pub read_only_shared_memory_heap: *const c_void,
pub read_only_static_server_data: *const c_void,
pub ansi_code_page_data: *const c_void,
pub oem_code_page_data: *const c_void,
pub unicode_case_table_data: *const c_void,
pub number_of_processors: u32,
pub nt_global_flag: u32,
pub critical_section_timeout: i64,
pub heap_segment_reserve: u32,
pub heap_segment_commit: u32,
pub heap_de_commit_total_free_threshold: u32,
pub heap_de_commit_free_block_threshold: u32,
pub number_of_heaps: u32,
pub maximum_number_of_heaps: u32,
pub process_heaps: *const c_void,
pub gdi_shared_handle_table: *const c_void,
pub process_starter_helper: *const c_void,
pub gdi_dcattribute_list: u32,
pub loader_lock: *const c_void,
pub os_major_version: u32,
pub os_minor_version: u32,
pub os_build_number: u16,
pub os_csd_version: u16,
pub os_platform_id: u32,
pub image_subsystem: u32,
pub image_subsystem_major_version: u32,
pub image_subsystem_minor_version: u32,
pub image_process_affinity_mask: u32,
pub gdi_handle_buffer: [u32; 34],
pub post_process_init_routine: *const c_void,
pub tls_expansion_bitmap: *const c_void,
pub tls_expansion_bitmap_bits: [u32; 32],
pub session_id: u32,
pub app_compat_flags: u64,
pub app_compat_flags_user: u64,
pub shim_data: *const c_void,
pub app_compat_info: *const c_void,
pub csd_version: crate::structs::UnicodeString,
pub activation_context_data: *const c_void,
pub process_assembly_storage_map: *const c_void,
pub system_default_activation_context_data: *const c_void,
pub system_assembly_storage_map: *const c_void,
pub minimum_stack_commit: u32,
}
impl Peb {
pub fn get_ptr() -> *const Self {
unsafe { get_peb() }
}
}
// Derived from https://sourceforge.net/p/mingw-w64/mingw-w64/ci/3fb0b9bd05b99762c12492e92e359e69281a0938/tree/mingw-w64-headers/include/winternl.h#l66
#[repr(C)]
pub struct RtlUserProcessParameters {
pub reserved1: [u8; 16],
pub reserved2: [*const c_void; 10],
pub image_path_name: UnicodeString,
pub commandline: UnicodeString,
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_get_commandline() |
}
| {
let commandline = unsafe {
let peb = &*Peb::get_ptr();
&(*peb.process_parameters).commandline
};
let commandline_string = commandline
.try_to_string()
.expect("Unable to create string from commandline in PEB.");
assert_eq!(
commandline_string.contains(".exe"),
true,
"The process's command line does not contain .exe, and is probably not read correctly."
);
} |
bone-list.js | boneMod = angular.module('marrowApp.directives.boneList', []);
boneMod.directive('boneList', function () { | scope: { bone: '=', reshare: '&' },
templateUrl: 'js/directives/bone-list/bone-list.html'
};
}); | return { |
cpu.rs | use core::ptr;
| pub fn current_frame() -> *const usize {
ptr::null()
} | pub fn wait_for_interrupt() {
unsafe { asm!("wfe") }
}
|
utils.rs | // Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
use std::collections::HashMap;
use std::io::{BufWriter, Write};
use std::ops::Deref;
use std::sync::atomic::{AtomicUsize, Ordering};
use std::sync::Arc;
use std::{fs::File, pin::Pin};
use crate::error::{BallistaError, Result};
use crate::execution_plans::{ShuffleWriterExec, UnresolvedShuffleExec};
use crate::memory_stream::MemoryStream;
use crate::serde::scheduler::PartitionStats;
use datafusion::arrow::error::Result as ArrowResult;
use datafusion::arrow::{
array::{
ArrayBuilder, ArrayRef, StructArray, StructBuilder, UInt64Array, UInt64Builder,
},
datatypes::{DataType, Field, SchemaRef},
ipc::reader::FileReader,
ipc::writer::FileWriter,
record_batch::RecordBatch,
};
use datafusion::execution::context::{ExecutionConfig, ExecutionContext};
use datafusion::logical_plan::Operator;
use datafusion::physical_optimizer::coalesce_batches::CoalesceBatches;
use datafusion::physical_optimizer::merge_exec::AddCoalescePartitionsExec;
use datafusion::physical_optimizer::optimizer::PhysicalOptimizerRule;
use datafusion::physical_plan::coalesce_batches::CoalesceBatchesExec;
use datafusion::physical_plan::coalesce_partitions::CoalescePartitionsExec;
use datafusion::physical_plan::csv::CsvExec;
use datafusion::physical_plan::expressions::{BinaryExpr, Column, Literal};
use datafusion::physical_plan::filter::FilterExec;
use datafusion::physical_plan::hash_aggregate::HashAggregateExec;
use datafusion::physical_plan::hash_join::HashJoinExec;
use datafusion::physical_plan::parquet::ParquetExec;
use datafusion::physical_plan::projection::ProjectionExec;
use datafusion::physical_plan::sort::SortExec;
use datafusion::physical_plan::{
AggregateExpr, ExecutionPlan, PhysicalExpr, RecordBatchStream, SQLMetric,
};
use futures::{future, Stream, StreamExt};
use std::time::Instant;
/// Stream data to disk in Arrow IPC format
pub async fn write_stream_to_disk(
stream: &mut Pin<Box<dyn RecordBatchStream + Send + Sync>>,
path: &str,
disk_write_metric: Arc<SQLMetric>,
) -> Result<PartitionStats> {
let file = File::create(&path).map_err(|e| {
BallistaError::General(format!(
"Failed to create partition file at {}: {:?}",
path, e
))
})?;
let mut num_rows = 0;
let mut num_batches = 0;
let mut num_bytes = 0;
let mut writer = FileWriter::try_new(file, stream.schema().as_ref())?;
while let Some(result) = stream.next().await {
let batch = result?;
let batch_size_bytes: usize = batch
.columns()
.iter()
.map(|array| array.get_array_memory_size())
.sum();
num_batches += 1;
num_rows += batch.num_rows();
num_bytes += batch_size_bytes;
let start = Instant::now();
writer.write(&batch)?;
disk_write_metric.add_elapsed(start);
}
let start = Instant::now();
writer.finish()?;
disk_write_metric.add_elapsed(start);
Ok(PartitionStats::new(
Some(num_rows as u64),
Some(num_batches),
Some(num_bytes as u64),
))
}
pub async fn collect_stream(
stream: &mut Pin<Box<dyn RecordBatchStream + Send + Sync>>,
) -> Result<Vec<RecordBatch>> {
let mut batches = vec![];
while let Some(batch) = stream.next().await {
batches.push(batch?);
}
Ok(batches)
}
pub fn produce_diagram(filename: &str, stages: &[Arc<ShuffleWriterExec>]) -> Result<()> {
let write_file = File::create(filename)?;
let mut w = BufWriter::new(&write_file);
writeln!(w, "digraph G {{")?;
// draw stages and entities
for stage in stages {
writeln!(w, "\tsubgraph cluster{} {{", stage.stage_id())?;
writeln!(w, "\t\tlabel = \"Stage {}\";", stage.stage_id())?;
let mut id = AtomicUsize::new(0);
build_exec_plan_diagram(
&mut w,
stage.children()[0].as_ref(),
stage.stage_id(),
&mut id,
true,
)?;
writeln!(w, "\t}}")?;
}
// draw relationships
for stage in stages {
let mut id = AtomicUsize::new(0);
build_exec_plan_diagram(
&mut w,
stage.children()[0].as_ref(),
stage.stage_id(),
&mut id,
false,
)?;
}
write!(w, "}}")?;
Ok(())
}
fn build_exec_plan_diagram(
w: &mut BufWriter<&File>,
plan: &dyn ExecutionPlan,
stage_id: usize,
id: &mut AtomicUsize,
draw_entity: bool,
) -> Result<usize> {
let operator_str = if plan.as_any().downcast_ref::<HashAggregateExec>().is_some() {
"HashAggregateExec"
} else if plan.as_any().downcast_ref::<SortExec>().is_some() {
"SortExec"
} else if plan.as_any().downcast_ref::<ProjectionExec>().is_some() {
"ProjectionExec"
} else if plan.as_any().downcast_ref::<HashJoinExec>().is_some() {
"HashJoinExec"
} else if plan.as_any().downcast_ref::<ParquetExec>().is_some() {
"ParquetExec"
} else if plan.as_any().downcast_ref::<CsvExec>().is_some() {
"CsvExec"
} else if plan.as_any().downcast_ref::<FilterExec>().is_some() {
"FilterExec"
} else if plan.as_any().downcast_ref::<ShuffleWriterExec>().is_some() {
"ShuffleWriterExec"
} else if plan
.as_any()
.downcast_ref::<UnresolvedShuffleExec>()
.is_some()
{
"UnresolvedShuffleExec"
} else if plan
.as_any()
.downcast_ref::<CoalesceBatchesExec>()
.is_some()
{
"CoalesceBatchesExec"
} else if plan
.as_any()
.downcast_ref::<CoalescePartitionsExec>()
.is_some()
{
"CoalescePartitionsExec"
} else {
println!("Unknown: {:?}", plan);
"Unknown"
};
let node_id = id.load(Ordering::SeqCst);
id.store(node_id + 1, Ordering::SeqCst);
if draw_entity {
writeln!(
w,
"\t\tstage_{}_exec_{} [shape=box, label=\"{}\"];",
stage_id, node_id, operator_str
)?;
}
for child in plan.children() {
if let Some(shuffle) = child.as_any().downcast_ref::<UnresolvedShuffleExec>() {
if !draw_entity {
for y in &shuffle.query_stage_ids {
writeln!(
w,
"\tstage_{}_exec_1 -> stage_{}_exec_{};",
y, stage_id, node_id
)?;
}
}
} else {
// relationships within same entity
let child_id =
build_exec_plan_diagram(w, child.as_ref(), stage_id, id, draw_entity)?;
if draw_entity {
writeln!(
w,
"\t\tstage_{}_exec_{} -> stage_{}_exec_{};", | }
}
}
Ok(node_id)
}
/// Create a DataFusion context that is compatible with Ballista
pub fn create_datafusion_context() -> ExecutionContext {
let config = ExecutionConfig::new().with_concurrency(2); // TODO: this is hack to enable partitioned joins
ExecutionContext::with_config(config)
}
pub struct WrappedStream {
stream: Pin<Box<dyn Stream<Item = ArrowResult<RecordBatch>> + Send + Sync>>,
schema: SchemaRef,
}
impl WrappedStream {
pub fn new(
stream: Pin<Box<dyn Stream<Item = ArrowResult<RecordBatch>> + Send + Sync>>,
schema: SchemaRef,
) -> Self {
Self { stream, schema }
}
}
impl RecordBatchStream for WrappedStream {
fn schema(&self) -> SchemaRef {
self.schema.clone()
}
}
impl Stream for WrappedStream {
type Item = ArrowResult<RecordBatch>;
fn poll_next(
mut self: Pin<&mut Self>,
cx: &mut std::task::Context<'_>,
) -> std::task::Poll<Option<Self::Item>> {
self.stream.poll_next_unpin(cx)
}
fn size_hint(&self) -> (usize, Option<usize>) {
self.stream.size_hint()
}
} | stage_id, child_id, stage_id, node_id
)?; |
knexfile.js | // Update with your config settings.
// var pg = require('pg')
// pg.defaults.ssl = true // Forces SSL to Heroku
require('dotenv').config()
module.exports = {
development: {
client: 'postgresql',
connection: {
host: process.env.DB_HOST,
user: process.env.DB_USER,
password: process.env.DB_PASS,
database: process.env.DB_NAME,
port: process.env.DB_PORT, |
staging: {
client: 'postgresql',
connection: process.env.DATABASE_URL,
pool: {
min: 2,
max: 10
},
migrations: {
tableName: 'knex_migrations'
}
},
production: {
client: 'postgresql',
connection: process.env.DATABASE_URL,
pool: {
min: 2,
max: 10
},
migrations: {
tableName: 'knex_migrations'
}
}
} | charset: 'utf8'
}
}, |
http.py | ##
# The MIT License (MIT)
#
# Copyright (c) 2015 Frankly Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
##
from __future__ import division
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
from http_parser.http import HttpStream
from http_parser.http import NoMoreData
from http_parser.http import HTTP_REQUEST
from http_parser.http import HTTP_RESPONSE
from http_parser.parser import HttpParser
from http_parser.reader import SocketReader
from http_parser.util import IOrderedDict as HttpFields
from http_parser.util import status_reasons as reasons
import six
from six.moves.urllib.parse import urlencode
from six.moves.urllib.parse import urlparse
from six.moves.urllib.parse import urlunparse
from six.moves.urllib.parse import parse_qs
from wsgiref.util import guess_scheme
from . import net
__all__ = [
'HTTP_10',
'HTTP_11',
'HttpSocket',
'HttpConnection',
'HttpClient',
'HttpFields',
'HttpServer',
'bind',
'connect',
'reasons',
]
HTTP_10 = 'HTTP/1.0'
HTTP_11 = 'HTTP/1.1'
def parse_query_value(value):
if isinstance(value, list):
if len(value) == 0: return None
if len(value) == 1: return parse_query_value(value[0])
return [parse_query_value(x) for x in value]
if value == '': return None
if value == 'true': return True
if value == 'false': return False
return value
def format_query_value(value):
if value is None: return ''
if value is True: return 'true'
if value is False: return 'false'
if isinstance(value, list): return [format_query_value(x) for x in value]
if isinstance(value, tuple): return [format_query_value(x) for x in value]
return value
class HttpSocket(object):
def __init__(self, socket):
self.socket = socket
def __enter__(self):
return self
def __exit__(self, *args):
try:
self.close()
except Exception as e:
pass
def close(self):
if self.socket is not None:
try:
self.socket.close()
finally:
self.socket = None
def detach(self):
socket, self.socket = self.socket, None
return socket
def fileno(self):
return -1 if self.socket is None else self.socket.fileno()
@property
def timeout(self):
return self.socket.gettimeout()
@timeout.setter
def timeout(self, value):
self.socket.settimeout(value)
class HttpConnection(HttpSocket):
def __init__(self, socket=None, host=None):
HttpSocket.__init__(self, socket)
self.version = HTTP_11
self.host = host
self.reader = None if socket is None else SocketReader(self.socket)
def connect(self, host, port='http', timeout=None, secure=None, **kwargs):
assert self.socket is None, "http connection already established"
if secure is None and port == 'https':
secure = True
self.socket = net.connect(host, port, timeout=timeout, secure=secure, **kwargs)
self.reader = SocketReader(self.socket)
self.host = host
if port not in ('http', 'https'):
self.host += ':%s' % port
def close(self):
|
def shutdown(self):
self.socket.shutdown()
def recv(self):
try:
stream = HttpStream(self.reader, kind=HTTP_RESPONSE, parser_class=HttpParser, decompress=True)
status = stream.status_code()
version = stream.version()
fields = stream.headers()
content = stream.body_file()
self.version = 'HTTP/%s.%s' % version
return status, fields, content
except NoMoreData:
pass
def send(self, method, path, query=None, fragment=None, fields=None, content=None, version=None):
if fields is None:
fields = HttpFields()
elif not isinstance(fields, HttpFields):
fields = HttpFields(fields)
if query is None:
query = { }
if content is None:
content = b''
if version is None:
version = self.version
assert version in (HTTP_10, HTTP_11), "invalid http version: %s" % version
fields.setdefault('Content-Length', six.text_type(len(content)))
fields.setdefault('Host', self.host)
for k, v in six.iteritems(dict(query)):
query[k] = format_query_value(v)
if six.PY3:
query = urlencode(query, encoding='utf-8')
else:
query = urlencode(query)
header = ''
header += method
header += ' '
header += urlunparse(('', '', path, '', query, fragment if bool(fragment) else ''))
header += ' %s\r\n' % version
header += ''.join('%s: %s\r\n' % (k, v) for k, v in six.iteritems(fields))
header += '\r\n'
header = header.encode('utf-8')
self.socket.sendall(header + content)
def request(self, *args, **kwargs):
self.send(*args, **kwargs)
return self.recv()
def delete(self, *args, **kwargs):
return self.request('DELETE', *args, **kwargs)
def get(self, *args, **kwargs):
return self.request('GET', *args, **kwargs)
def head(self, *args, **kwargs):
return self.request('HEAD', *args, **kwargs)
def options(self, *args, **kwargs):
return self.request('OPTIONS', *args, **kwargs)
def post(self, *args, **kwargs):
return self.request('POST', *args, **kwargs)
def put(self, *args, **kwargs):
return self.request('PUT', *args, **kwargs)
class HttpClient(HttpSocket):
def __init__(self, socket, address, server):
HttpSocket.__init__(self, socket)
self.address = address
self.reader = SocketReader(self.socket)
self.server = server
self.version = HTTP_11
def __iter__(self):
while True:
request = self.recv()
if request is None:
break
yield request
def iter_wsgi(self):
while True:
environ = self.recv(True)
if environ is None:
break
yield environ
def close(self):
try:
if self.reader is not None:
self.reader.close()
except Exception:
pass
finally:
self.reader = None
HttpSocket.close(self)
def recv(self, wsgi=False):
try:
stream = HttpStream(self.reader, kind=HTTP_REQUEST, parser_class=HttpParser, decompress=True)
if bool(wsgi):
environ = stream.wsgi_environ()
environ['wsgi.url_scheme'] = guess_scheme(environ)
environ['wsgi.input'] = stream.body_file()
environ['wsgi.socket'] = self.socket
return environ
# BUG:
# http-parser has an issue here, if we call 'method' before 'headers'
# and invalid method name is returned...
fields = stream.headers()
method = stream.method()
url = stream.url()
version = stream.version()
content = stream.body_file()
url = urlparse(url)
path = url.path
query = parse_qs(url.query, keep_blank_values=True)
fragment = url.fragment
for k, v in six.iteritems(dict(query)):
query[k] = parse_query_value(v)
self.version = 'HTTP/%s.%s' % version
return method, path, query, fragment, fields, content
except NoMoreData:
pass
def send(self, status, fields=None, content=None, version=None):
if fields is None:
fields = { }
elif not isinstance(fields, HttpFields):
fields = HttpFields(fields)
if content is None:
content = b''
if version is None:
version = self.version
assert version in (HTTP_10, HTTP_11), "invalid http version: %s" % version
fields.setdefault('Content-Length', six.text_type(len(content)))
if self.server is not None:
fields.setdefault('Server', self.server)
if isinstance(status, int):
status = '%s %s' % (status, reasons[status])
header = ''
header += '%s %s\r\n' % (version, status)
header += ''.join('%s: %s\r\n' % (k, v) for k, v in six.iteritems(fields))
header += '\r\n'
header = header.encode('utf-8')
return self.socket.sendall(header + content)
class HttpServer(HttpSocket):
def __init__(self, socket=None, server='maestro-http'):
HttpSocket.__init__(self, socket)
self.server = server
def __iter__(self):
while True:
yield self.accept()
def accept(self):
assert self.socket is not None, "http server not bound to any network interface"
socket, address = self.socket.accept()
socket.settimeout(self.socket.gettimeout())
return HttpClient(socket, address, self.server)
def bind(self, *args, **kwargs):
assert self.socket is None, "http server already bound to network interface"
self.socket = net.bind(*args, **kwargs)
def bind(*args, **kwargs):
server = HttpServer()
try:
server.bind(*args, **kwargs)
except:
server.close()
raise
return server
def connect(*args, **kwargs):
conn = HttpConnection()
try:
conn.connect(*args, **kwargs)
except:
conn.close()
raise
return conn
| try:
if self.reader is not None:
self.reader.close()
except Exception:
pass
finally:
self.reader = None
self.host = None
HttpSocket.close(self) |
models.py | from django.db import models |
class Category(models.Model):
"""Category Model"""
title = models.CharField(
verbose_name = (u'Title'),
help_text = (u' '),
max_length = 255
)
slug = models.SlugField(
verbose_name = (u'Slug'),
help_text = (u'Uri identifier.'),
max_length = 255,
unique = True
)
class Meta:
app_label = (u'blog')
verbose_name = (u"Category")
verbose_name_plural = (u"Categories")
ordering = ['title',]
def __unicode__(self):
return "%s" % (self.title, )
class Post(models.Model):
"""Post Model"""
title = models.CharField(
verbose_name = (u'Title'),
help_text = (u' '),
max_length = 255
)
slug = models.SlugField(
verbose_name = (u'Slug'),
help_text = (u'Uri identifier.'),
max_length = 255,
unique = True
)
content_markdown = models.TextField(
verbose_name = (u'Content (Markdown)'),
help_text = (u'')
)
content_markup = models.TextField(
verbose_name = (u'Content (Markup)'),
help_text = (u' ')
)
categories = models.ManyToManyField(
Category,
verbose_name = (u'Categories'),
help_text = (u' '),
null = True,
blank = True
)
date_publish = models.DateTimeField(
verbose_name = (u'Publish Date'),
help_text = (u' '),
auto_now=True
)
class Meta:
app_label = (u'blog')
verbose_name = (u'Post')
verbose_name_plural = (u'Posts')
ordering = ['-date_publish']
def save(self, *args, **kwargs):
self.content_markup = markdown(self.content_markdown, ['codehilite'])
super(Post, self).save(*args, **kwargs)
def __unicode__(self):
return "%s" % (self.title,) | from markdown import markdown
# Create your models here.
# Reference: http://www.yaconiello.com/blog/part-1-creating-blog-system-using-django-markdown/ |
test_benchmarks.py | import numpy as np
import pandas as pd
import pytest
import ibis
import ibis.expr.datatypes as dt
from ibis.backends.pandas.udf import udf
def make_t():
return ibis.table(
[
('_timestamp', 'int32'),
('dim1', 'int32'),
('dim2', 'int32'),
('valid_seconds', 'int32'),
('meas1', 'int32'),
('meas2', 'int32'),
('year', 'int32'),
('month', 'int32'),
('day', 'int32'),
('hour', 'int32'),
('minute', 'int32'),
],
name="t",
)
@pytest.fixture
def t():
return make_t()
def make_base(t):
return (
(t.year > 2016)
| ((t.year == 2016) & (t.month > 6))
| ((t.year == 2016) & (t.month == 6) & (t.day > 6))
| ((t.year == 2016) & (t.month == 6) & (t.day == 6) & (t.hour > 6))
| (
(t.year == 2016)
& (t.month == 6)
& (t.day == 6)
& (t.hour == 6)
& (t.minute >= 5)
)
) & (
(t.year < 2016)
| ((t.year == 2016) & (t.month < 6))
| ((t.year == 2016) & (t.month == 6) & (t.day < 6))
| ((t.year == 2016) & (t.month == 6) & (t.day == 6) & (t.hour < 6))
| (
(t.year == 2016)
& (t.month == 6)
& (t.day == 6)
& (t.hour == 6)
& (t.minute <= 5)
)
)
@pytest.fixture
def base(t):
return make_base(t)
def make_large_expr(t, base):
src_table = t[base]
src_table = src_table.mutate(
_timestamp=(src_table['_timestamp'] - src_table['_timestamp'] % 3600)
.cast('int32')
.name('_timestamp'),
valid_seconds=300,
)
aggs = []
for meas in ['meas1', 'meas2']:
aggs.append(src_table[meas].sum().cast('float').name(meas))
src_table = src_table.aggregate(
aggs, by=['_timestamp', 'dim1', 'dim2', 'valid_seconds']
)
part_keys = ['year', 'month', 'day', 'hour', 'minute']
ts_col = src_table['_timestamp'].cast('timestamp')
new_cols = {}
for part_key in part_keys:
part_col = getattr(ts_col, part_key)()
new_cols[part_key] = part_col
src_table = src_table.mutate(**new_cols)
return src_table[
[
'_timestamp',
'dim1',
'dim2',
'meas1',
'meas2',
'year',
'month',
'day',
'hour',
'minute',
]
]
@pytest.fixture
def large_expr(t, base):
return make_large_expr(t, base)
@pytest.mark.benchmark(group="construction")
@pytest.mark.parametrize(
"construction_fn",
[
pytest.param(lambda *_: make_t(), id="small"),
pytest.param(lambda t, *_: make_base(t), id="medium"),
pytest.param(lambda t, base: make_large_expr(t, base), id="large"),
],
)
def test_construction(benchmark, construction_fn, t, base):
benchmark(construction_fn, t, base)
@pytest.mark.benchmark(group="builtins")
@pytest.mark.parametrize(
"expr_fn",
[
pytest.param(lambda t, _base, _large_expr: t, id="small"),
pytest.param(lambda _t, base, _large_expr: base, id="medium"),
pytest.param(lambda _t, _base, large_expr: large_expr, id="large"),
],
)
@pytest.mark.parametrize("builtin", [hash, str])
def test_builtins(benchmark, expr_fn, builtin, t, base, large_expr):
expr = expr_fn(t, base, large_expr)
benchmark(builtin, expr)
@pytest.mark.benchmark(group="compilation")
@pytest.mark.parametrize("module", ["impala", "sqlite"])
@pytest.mark.parametrize(
"expr_fn",
[
pytest.param(lambda t, _base, _large_expr: t, id="small"),
pytest.param(lambda _t, base, _large_expr: base, id="medium"),
pytest.param(lambda _t, _base, large_expr: large_expr, id="large"),
],
)
def test_compile(benchmark, module, expr_fn, t, base, large_expr):
try:
mod = getattr(ibis, module)
except AttributeError as e:
pytest.skip(str(e))
else:
expr = expr_fn(t, base, large_expr)
benchmark(mod.compile, expr)
@pytest.fixture
def pt():
n = 60_000
data = pd.DataFrame(
{
'key': np.random.choice(16000, size=n),
'low_card_key': np.random.choice(30, size=n),
'value': np.random.rand(n),
'timestamps': pd.date_range(
start='now', periods=n, freq='s'
).values,
'timestamp_strings': pd.date_range(
start='now', periods=n, freq='s'
).values.astype(str),
'repeated_timestamps': pd.date_range(
start='2018-09-01', periods=30
).repeat(int(n / 30)),
}
)
return ibis.pandas.connect(dict(df=data)).table('df')
def high_card_group_by(t):
return t.groupby(t.key).aggregate(avg_value=t.value.mean())
def cast_to_dates(t):
return t.timestamps.cast(dt.date)
def cast_to_dates_from_strings(t):
return t.timestamp_strings.cast(dt.date)
def multikey_group_by_with_mutate(t):
return (
t.mutate(dates=t.timestamps.cast('date'))
.groupby(['low_card_key', 'dates'])
.aggregate(avg_value=lambda t: t.value.mean())
)
def simple_sort(t):
return t.sort_by([t.key])
def simple_sort_projection(t):
return t[['key', 'value']].sort_by(['key'])
def multikey_sort(t):
return t.sort_by(['low_card_key', 'key'])
def multikey_sort_projection(t):
return t[['low_card_key', 'key', 'value']].sort_by(['low_card_key', 'key'])
def low_card_rolling_window(t):
return ibis.trailing_range_window(
ibis.interval(days=2),
order_by=t.repeated_timestamps,
group_by=t.low_card_key,
)
def low_card_grouped_rolling(t):
return t.value.mean().over(low_card_rolling_window(t))
def high_card_rolling_window(t):
return ibis.trailing_range_window(
ibis.interval(days=2),
order_by=t.repeated_timestamps,
group_by=t.key,
)
def high_card_grouped_rolling(t):
return t.value.mean().over(high_card_rolling_window(t))
@udf.reduction(['double'], 'double')
def my_mean(series):
return series.mean()
def low_card_grouped_rolling_udf_mean(t):
return my_mean(t.value).over(low_card_rolling_window(t))
def high_card_grouped_rolling_udf_mean(t):
return my_mean(t.value).over(high_card_rolling_window(t))
@udf.analytic(['double'], 'double')
def my_zscore(series):
return (series - series.mean()) / series.std()
|
def high_card_window(t):
return ibis.window(group_by=t.key)
def low_card_window_analytics_udf(t):
return my_zscore(t.value).over(low_card_window(t))
def high_card_window_analytics_udf(t):
return my_zscore(t.value).over(high_card_window(t))
@udf.reduction(['double', 'double'], 'double')
def my_wm(v, w):
return np.average(v, weights=w)
def low_card_grouped_rolling_udf_wm(t):
return my_wm(t.value, t.value).over(low_card_rolling_window(t))
def high_card_grouped_rolling_udf_wm(t):
return my_wm(t.value, t.value).over(low_card_rolling_window(t))
@pytest.mark.benchmark(group="execution")
@pytest.mark.parametrize(
"expression_fn",
[
pytest.param(high_card_group_by, id="high_card_group_by"),
pytest.param(cast_to_dates, id="cast_to_dates"),
pytest.param(
cast_to_dates_from_strings, id="cast_to_dates_from_strings"
),
pytest.param(
multikey_group_by_with_mutate, id="multikey_group_by_with_mutate"
),
pytest.param(simple_sort, id="simple_sort"),
pytest.param(simple_sort_projection, id="simple_sort_projection"),
pytest.param(multikey_sort, id="multikey_sort"),
pytest.param(multikey_sort_projection, id="multikey_sort_projection"),
pytest.param(low_card_grouped_rolling, id="low_card_grouped_rolling"),
pytest.param(
high_card_grouped_rolling, id="high_card_grouped_rolling"
),
pytest.param(
low_card_grouped_rolling_udf_mean,
id="low_card_grouped_rolling_udf_mean",
),
pytest.param(
high_card_grouped_rolling_udf_mean,
id="high_card_grouped_rolling_udf_mean",
),
pytest.param(
low_card_window_analytics_udf, id="low_card_window_analytics_udf"
),
pytest.param(
high_card_window_analytics_udf, id="high_card_window_analytics_udf"
),
pytest.param(
low_card_grouped_rolling_udf_wm,
id="low_card_grouped_rolling_udf_wm",
),
pytest.param(
high_card_grouped_rolling_udf_wm,
id="high_card_grouped_rolling_udf_wm",
),
],
)
def test_execute(benchmark, expression_fn, pt):
expr = expression_fn(pt)
benchmark(expr.execute) |
def low_card_window(t):
return ibis.window(group_by=t.low_card_key) |
model_zoo.py | # -*- coding:utf-8 -*-
# author: Hong Fangzhou
# @file: model_zoo.py
# @time: 2020/09/26 17:05
from .modules import BEV_Unet
from .modules import PointNet
from .modules import spconv_unet
from .modules import pytorch_meanshift
from .loss import instance_losses
from .loss import lovasz_losses
from utils.evaluate_panoptic import init_eval, eval_one_scan_w_fname, eval_one_scan_vps
from utils.evaluate_panoptic import printResults, valid_xentropy_ids, class_lut
from utils import clustering
from utils import common_utils
from utils.common_utils import grp_range_torch, parallel_FPS, SemKITTI2train
from scipy.optimize import linear_sum_assignment
import io
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch_scatter
import numpy as np
import numba as nb
import multiprocessing
from scipy import stats as s
from sklearn.metrics import confusion_matrix as cm
from easydict import EasyDict
import time
import os
import pickle
from sklearn.cluster import MeanShift
from sklearn import manifold, datasets
from scipy import stats as s
from utils import common_utils
from utils.config import global_args
import spconv
class PolarBaseClass(nn.Module):
def __init__(self, cfg):
super(PolarBaseClass, self).__init__()
self.ignore_label = cfg.DATA_CONFIG.DATALOADER.CONVERT_IGNORE_LABEL
self.pt_pooling = cfg.MODEL.MODEL_FN.PT_POOLING
self.max_pt = cfg.MODEL.MODEL_FN.MAX_PT_PER_ENCODE
self.pt_selection = cfg.MODEL.MODEL_FN.PT_SELECTION
if 'FEATURE_COMPRESSION' in cfg.MODEL.MODEL_FN.keys():
self.fea_compre = cfg.MODEL.MODEL_FN.FEATURE_COMPRESSION
else:
self.fea_compre = cfg.DATA_CONFIG.DATALOADER.GRID_SIZE[2]
self.grid_size = cfg.DATA_CONFIG.DATALOADER.GRID_SIZE
if self.pt_pooling == 'max':
self.pool_dim = cfg.MODEL.VFE.OUT_CHANNEL
if self.fea_compre is not None:
self.fea_compression = nn.Sequential(
nn.Linear(self.pool_dim, self.fea_compre),
nn.ReLU()
).cuda()
self.pt_fea_dim = self.fea_compre
def voxelize(self, inputs):
grid_ind = inputs['grid']
pt_fea = inputs['pt_fea']
pt_fea_ten = [torch.from_numpy(i).type(torch.FloatTensor).cuda() for i in pt_fea]
grid_ind_ten = [torch.from_numpy(i[:, :2]).cuda() for i in grid_ind]
pt_fea = pt_fea_ten
xy_ind = grid_ind_ten
# concate everything
cat_pt_ind = []
for i_batch in range(len(xy_ind)):
cat_pt_ind.append(F.pad(xy_ind[i_batch],(1,0),'constant',value = i_batch))
cat_pt_fea = torch.cat(pt_fea,dim = 0)
cat_pt_ind = torch.cat(cat_pt_ind,dim = 0)
pt_num = cat_pt_ind.shape[0]
# shuffle the data
cur_dev = pt_fea[0].get_device()
shuffled_ind = torch.randperm(pt_num,device = cur_dev)
cat_pt_fea = cat_pt_fea[shuffled_ind,:]
cat_pt_ind = cat_pt_ind[shuffled_ind,:]
# unique xy grid index
unq, unq_inv, unq_cnt = torch.unique(cat_pt_ind,return_inverse=True, return_counts=True, dim=0)
unq = unq.type(torch.int64)
# subsample pts
if self.pt_selection == 'random':
grp_ind = grp_range_torch(unq_cnt,cur_dev)[torch.argsort(torch.argsort(unq_inv))] # convert the array that is in the order of grid to the order of cat_pt_feature
remain_ind = grp_ind < self.max_pt # randomly sample max_pt points inside a grid
elif self.pt_selection == 'farthest':
unq_ind = np.split(np.argsort(unq_inv.detach().cpu().numpy()), np.cumsum(unq_cnt.detach().cpu().numpy()[:-1]))
remain_ind = np.zeros((pt_num,),dtype = np.bool)
np_cat_fea = cat_pt_fea.detach().cpu().numpy()[:,:3]
pool_in = []
for i_inds in unq_ind:
if len(i_inds) > self.max_pt:
pool_in.append((np_cat_fea[i_inds,:],self.max_pt))
if len(pool_in) > 0:
pool = multiprocessing.Pool(multiprocessing.cpu_count())
FPS_results = pool.starmap(parallel_FPS, pool_in)
pool.close()
pool.join()
count = 0
for i_inds in unq_ind:
if len(i_inds) <= self.max_pt:
remain_ind[i_inds] = True
else:
remain_ind[i_inds[FPS_results[count]]] = True
count += 1
cat_pt_fea = cat_pt_fea[remain_ind,:]
cat_pt_ind = cat_pt_ind[remain_ind,:]
unq_inv = unq_inv[remain_ind]
unq_cnt = torch.clamp(unq_cnt,max=self.max_pt)
# process feature
processed_cat_pt_fea = self.vfe_model(cat_pt_fea)
#TODO: maybe use pointnet to extract features inside each grid and each grid share the same parameters instead of apply pointnet to global point clouds?
# This kind of global pointnet is more memory efficient cause otherwise we will have to alloc [480 x 360 x 32 x 64 x C] tensor in order to apply pointnet to each grid
if self.pt_pooling == 'max':
pooled_data = torch_scatter.scatter_max(processed_cat_pt_fea, unq_inv, dim=0)[0] # choose the max feature for each grid
else: raise NotImplementedError
if self.fea_compre:
processed_pooled_data = self.fea_compression(pooled_data)
else:
processed_pooled_data = pooled_data
# stuff pooled data into 4D tensor
out_data_dim = [len(pt_fea),self.grid_size[0],self.grid_size[1],self.pt_fea_dim]
out_data = torch.zeros(out_data_dim, dtype=torch.float32).to(cur_dev)
out_data[unq[:,0],unq[:,1],unq[:,2],:] = processed_pooled_data
out_data = out_data.permute(0,3,1,2)
del pt_fea, xy_ind
return out_data, grid_ind
def voxelize_spconv(self, inputs, grid_name='grid', pt_fea_name='pt_fea'):
grid_ind = inputs[grid_name]
pt_fea = inputs[pt_fea_name]
pt_fea_ten = [torch.from_numpy(i).type(torch.FloatTensor).cuda() for i in pt_fea]
grid_ind_ten = [torch.from_numpy(i).cuda() for i in grid_ind]
pt_fea = pt_fea_ten
xy_ind = grid_ind_ten
# concate everything
cat_pt_ind = []
for i_batch in range(len(xy_ind)):
cat_pt_ind.append(F.pad(xy_ind[i_batch],(1,0),'constant',value = i_batch))
cat_pt_fea = torch.cat(pt_fea,dim = 0)
cat_pt_ind = torch.cat(cat_pt_ind,dim = 0)
pt_num = cat_pt_ind.shape[0]
# shuffle the data
cur_dev = pt_fea[0].get_device()
shuffled_ind = torch.randperm(pt_num,device = cur_dev)
cat_pt_fea = cat_pt_fea[shuffled_ind,:]
cat_pt_ind = cat_pt_ind[shuffled_ind,:]
# unique xy grid index
unq, unq_inv, unq_cnt = torch.unique(cat_pt_ind,return_inverse=True, return_counts=True, dim=0)
unq = unq.type(torch.int64)
# subsample pts
if self.pt_selection == 'random':
grp_ind = grp_range_torch(unq_cnt,cur_dev)[torch.argsort(torch.argsort(unq_inv))] # convert the array that is in the order of grid to the order of cat_pt_feature
remain_ind = grp_ind < self.max_pt # randomly sample max_pt points inside a grid
elif self.pt_selection == 'farthest':
unq_ind = np.split(np.argsort(unq_inv.detach().cpu().numpy()), np.cumsum(unq_cnt.detach().cpu().numpy()[:-1]))
remain_ind = np.zeros((pt_num,),dtype = np.bool)
np_cat_fea = cat_pt_fea.detach().cpu().numpy()[:,:3]
pool_in = []
for i_inds in unq_ind:
if len(i_inds) > self.max_pt:
pool_in.append((np_cat_fea[i_inds,:],self.max_pt))
if len(pool_in) > 0:
pool = multiprocessing.Pool(multiprocessing.cpu_count())
FPS_results = pool.starmap(parallel_FPS, pool_in)
pool.close()
pool.join()
count = 0
for i_inds in unq_ind:
if len(i_inds) <= self.max_pt:
remain_ind[i_inds] = True
else:
remain_ind[i_inds[FPS_results[count]]] = True
count += 1
cat_pt_fea = cat_pt_fea[remain_ind,:]
cat_pt_ind = cat_pt_ind[remain_ind,:]
unq_inv = unq_inv[remain_ind]
unq_cnt = torch.clamp(unq_cnt,max=self.max_pt)
# process feature
processed_cat_pt_fea = self.vfe_model(cat_pt_fea)
#TODO: maybe use pointnet to extract features inside each grid and each grid share the same parameters instead of apply pointnet to global point clouds?
# This kind of global pointnet is more memory efficient cause otherwise we will have to alloc [480 x 360 x 32 x 64 x C] tensor in order to apply pointnet to each grid
if self.pt_pooling == 'max':
pooled_data = torch_scatter.scatter_max(processed_cat_pt_fea, unq_inv, dim=0)[0] # choose the max feature for each grid
else: raise NotImplementedError
if self.fea_compre:
processed_pooled_data = self.fea_compression(pooled_data)
else:
processed_pooled_data = pooled_data
# stuff pooled data into 4D tensor
# out_data_dim = [len(pt_fea),self.grid_size[0],self.grid_size[1],self.pt_fea_dim]
# out_data = torch.zeros(out_data_dim, dtype=torch.float32).to(cur_dev)
# out_data[unq[:,0],unq[:,1],unq[:,2],:] = processed_pooled_data
# out_data = out_data.permute(0,3,1,2)
del pt_fea, xy_ind
return unq, processed_pooled_data
def calc_sem_label(self, sem_logits, inputs, need_add_one=True):
vox_pred_labels = torch.argmax(sem_logits, dim=1)
vox_pred_labels = vox_pred_labels.cpu().detach().numpy()
grid_ind = inputs['grid']
pt_pred_labels = []
for i in range(len(grid_ind)):
if need_add_one:
pt_pred_labels.append(vox_pred_labels[i, grid_ind[i][:, 0], grid_ind[i][:, 1], grid_ind[i][:, 2]] + 1)
else:
pt_pred_labels.append(vox_pred_labels[i, grid_ind[i][:, 0], grid_ind[i][:, 1], grid_ind[i][:, 2]])
return pt_pred_labels
def calc_sem_label_point_logits(self, sem_logits, inputs, need_add_one=True):
pts_pred_labels = torch.argmax(sem_logits, dim=1)
pts_pred_labels = pts_pred_labels.cpu().detach().numpy()
grid_ind = inputs['grid']
pt_pred_labels = []
for i in range(len(grid_ind)):
if need_add_one:
pt_pred_labels.append(pts_pred_labels + 1)
else:
pt_pred_labels.append(pts_pred_labels)
return pt_pred_labels
def update_evaluator(self, evaluator, sem_preds, ins_preds, inputs):
for i in range(len(sem_preds)):
eval_one_scan_w_fname(evaluator, inputs['pt_labs'][i].reshape(-1),
inputs['pt_ins_labels'][i].reshape(-1),
sem_preds[i], ins_preds[i], inputs['pcd_fname'][i])
def update_evaluator_multi_frames(self, evaluator, sem_preds, ins_preds, inputs):
for i in range(len(sem_preds)):
eval_one_scan_w_fname(evaluator, inputs['pt_labs'][i][inputs['mask_np'][i].reshape(-1) == 0].reshape(-1),
inputs['pt_ins_labels'][i][inputs['mask_np'][i].reshape(-1) == 0].reshape(-1),
sem_preds[i][inputs['mask_np'][i].reshape(-1) == 0], ins_preds[i][inputs['mask_np'][i].reshape(-1) == 0], inputs['pcd_fname'][i])
def forward(self, x):
raise NotImplementedError
class PolarSpconv(PolarBaseClass):
def __init__(self, cfg):
super(PolarSpconv, self).__init__(cfg)
self.backbone = getattr(spconv_unet, cfg.MODEL.BACKBONE.NAME)(cfg)
self.sem_head = getattr(spconv_unet, cfg.MODEL.SEM_HEAD.NAME)(cfg)
self.vfe_model = getattr(PointNet, cfg.MODEL.VFE.NAME)(cfg)
if cfg.MODEL.SEM_LOSS == 'Lovasz_loss':
self.sem_loss_lovasz = lovasz_losses.lovasz_softmax
if cfg.DATA_CONFIG.DATASET_NAME.startswith('SemanticKitti'):
weights = torch.zeros(20, dtype=torch.float)
weights[0] = 1.0
weights[1] = 2.293
weights[2] = 85.756
weights[3] = 71.511
weights[4] = 31.596
weights[5] = 35.624
weights[6] = 74.761
weights[7] = 88.722
weights[8] = 96.389
weights[9] = 1.00
weights[10] = 6.362
weights[11] = 1.00
weights[12] = 20.387
weights[13] = 1.00
weights[14] = 1.363
weights[15] = 1.00
weights[16] = 14.214
weights[17] = 1.263
weights[18] = 25.936
weights[19] = 61.896
else:
raise NotImplementedError
self.sem_loss = torch.nn.CrossEntropyLoss(weight=weights.cuda(), ignore_index=0)
else:
raise NotImplementedError
def calc_loss(self, sem_logits, inputs, need_minus_one=True):
if need_minus_one:
vox_label = SemKITTI2train(inputs['vox_label']).type(torch.LongTensor).cuda()
else:
vox_label = inputs['vox_label'].type(torch.LongTensor).cuda()
sem_loss = self.sem_loss_lovasz(torch.nn.functional.softmax(sem_logits), vox_label,ignore=self.ignore_label) + self.sem_loss(sem_logits,vox_label)
loss = sem_loss
ret_dict = {}
ret_dict['sem_loss'] = sem_loss
ret_dict['loss'] = loss
return ret_dict
def forward(self, batch, is_test=False, before_merge_evaluator=None, after_merge_evaluator=None, require_cluster=True):
coor, feature_3d = self.voxelize_spconv(batch)
sem_fea, _ = self.backbone(feature_3d, coor, len(batch['grid']))
sem_logits = self.sem_head(sem_fea)
loss_dict = self.calc_loss(sem_logits, batch, need_minus_one=False)
if is_test:
pt_sem_preds = self.calc_sem_label(sem_logits, batch, need_add_one=False)
pt_ins_ids_preds = [np.zeros_like(pt_sem_preds[i]) for i in range(len(pt_sem_preds))]
merged_sem_preds = pt_sem_preds
if 'mask' in batch:
self.update_evaluator_multi_frames(after_merge_evaluator, merged_sem_preds, pt_ins_ids_preds, batch)
else:
self.update_evaluator(after_merge_evaluator, merged_sem_preds, pt_ins_ids_preds, batch)
loss_dict['sem_preds'] = merged_sem_preds
loss_dict['ins_preds'] = pt_ins_ids_preds
loss_dict['ins_num'] = 0
return loss_dict
class PolarOffset(PolarBaseClass):
def __init__(self, cfg, need_create_model=True):
super(PolarOffset, self).__init__(cfg)
self.ins_loss_name = cfg.MODEL.INS_LOSS
self.ins_embedding_dim = cfg.MODEL.INS_HEAD.EMBEDDING_CHANNEL
if not need_create_model:
return
self.backbone = getattr(BEV_Unet, cfg.MODEL.BACKBONE.NAME)(cfg)
self.sem_head = getattr(BEV_Unet, cfg.MODEL.SEM_HEAD.NAME)(cfg)
self.ins_head = getattr(BEV_Unet, cfg.MODEL.INS_HEAD.NAME)(cfg)
self.vfe_model = getattr(PointNet, cfg.MODEL.VFE.NAME)(cfg)
self.ins_loss = getattr(instance_losses, cfg.MODEL.INS_LOSS)
if cfg.MODEL.SEM_LOSS == 'Lovasz_loss':
self.sem_loss_lovasz = lovasz_losses.lovasz_softmax
self.sem_loss = torch.nn.CrossEntropyLoss(ignore_index=cfg.DATA_CONFIG.DATALOADER.CONVERT_IGNORE_LABEL)
else:
raise NotImplementedError
self.cluster_fn_wrapper = getattr(clustering, cfg.MODEL.POST_PROCESSING.CLUSTER_ALGO)
self.cluster_fn = self.cluster_fn_wrapper(cfg)
self.merge_func_name = cfg.MODEL.POST_PROCESSING.MERGE_FUNC
def calc_loss(self, sem_logits, pred_offsets, inputs, need_minus_one=True):
if need_minus_one:
vox_label = SemKITTI2train(inputs['vox_label']).type(torch.LongTensor).cuda()
else:
vox_label = inputs['vox_label'].type(torch.LongTensor).cuda()
pt_valid = [torch.from_numpy(i).cuda() for i in inputs['pt_valid']]
if self.ins_loss_name.find('semantic_centroids') != -1:
offset_loss_list = self.ins_loss(pred_offsets, inputs['pt_ins_labels'], pt_valid, gt_semantic_label=inputs['pt_labs'])
elif self.ins_loss_name.find('embedding_contrastive_loss') != -1:
offset_loss_list = self.ins_loss(pred_offsets, inputs['pt_ins_labels'], pt_valid, gt_semantic_label=inputs['pt_labs'], xyz=inputs['pt_cart_xyz'])
elif self.ins_loss_name.find('embedding_discriminative') != -1:
offset_loss_list = self.ins_loss(pred_offsets, inputs['pt_ins_labels'], pt_valid)
else:
pt_offsets = [torch.from_numpy(i).cuda() for i in inputs['pt_offsets']]
offset_loss_list = self.ins_loss(pred_offsets, pt_offsets, pt_valid)
sem_loss = self.sem_loss_lovasz(torch.nn.functional.softmax(sem_logits), vox_label,ignore=self.ignore_label) + self.sem_loss(sem_logits,vox_label)
#if self.ins_loss_name == 'embedding_contrastive_loss':
# loss = 5 * sem_loss + sum(offset_loss_list)
#else:
loss = sem_loss + sum(offset_loss_list)
ret_dict = {}
ret_dict['offset_loss_list'] = offset_loss_list
ret_dict['sem_loss'] = sem_loss
ret_dict['loss'] = loss
return ret_dict
def clustering(self, sem_preds, pred_offsets, inputs):
grid_ind = inputs['grid']
pt_cart_xyz = inputs['pt_cart_xyz']
pt_pred_offsets = [pred_offsets[i].detach().cpu().numpy().reshape(-1, self.ins_embedding_dim) for i in range(len(pred_offsets))]
pt_pred_valid = []
for i in range(len(grid_ind)):
pt_pred_valid.append(np.isin(sem_preds[i], valid_xentropy_ids).reshape(-1))
pred_ins_ids = self.cluster_fn(pt_cart_xyz, pt_pred_offsets, pt_pred_valid)
return pred_ins_ids
def merge_ins_sem(self, sem_preds, pred_ins_ids, logits=None, inputs=None):
merged_sem_preds = []
for i in range(len(sem_preds)):
if self.merge_func_name == 'merge_ins_sem':
merged_sem_preds.append(common_utils.merge_ins_sem(sem_preds[i], pred_ins_ids[i]))
elif self.merge_func_name == 'merge_ins_sem_logits_size_based':
merged_sem_preds.append(common_utils.merge_ins_sem_logits_size_based(sem_preds[i], pred_ins_ids[i], i, logits, inputs))
elif self.merge_func_name == 'none':
merged_sem_preds.append(sem_preds[i])
return merged_sem_preds
def forward(self, batch, is_test=False, before_merge_evaluator=None, after_merge_evaluator=None, require_cluster=True):
out_data, grid_ind = self.voxelize(batch)
sem_fea, ins_fea = self.backbone(out_data)
sem_logits = self.sem_head(sem_fea)
pred_offsets, _ = self.ins_head(ins_fea, grid_ind)
loss_dict = self.calc_loss(sem_logits, pred_offsets, batch)
if is_test:
pt_sem_preds = self.calc_sem_label(sem_logits, batch)
if require_cluster:
pt_ins_ids_preds = self.clustering(pt_sem_preds, pred_offsets, batch)
else:
pt_ins_ids_preds = [np.zeros_like(pt_sem_preds[i]) for i in range(len(pt_sem_preds))]
if require_cluster:
merged_sem_preds = self.merge_ins_sem(pt_sem_preds, pt_ins_ids_preds)
else:
merged_sem_preds = pt_sem_preds
if before_merge_evaluator != None:
self.update_evaluator(before_merge_evaluator, pt_sem_preds, pt_ins_ids_preds, batch)
if after_merge_evaluator != None:
self.update_evaluator(after_merge_evaluator, merged_sem_preds, pt_ins_ids_preds, batch)
loss_dict['sem_preds'] = merged_sem_preds
loss_dict['ins_preds'] = pt_ins_ids_preds
return loss_dict
class PolarOffsetSpconv(PolarOffset):
def __init__(self, cfg):
super(PolarOffsetSpconv, self).__init__(cfg, need_create_model=False)
self.backbone = getattr(spconv_unet, cfg.MODEL.BACKBONE.NAME)(cfg)
self.sem_head = getattr(spconv_unet, cfg.MODEL.SEM_HEAD.NAME)(cfg)
self.ins_head = getattr(spconv_unet, cfg.MODEL.INS_HEAD.NAME)(cfg)
self.vfe_model = getattr(PointNet, cfg.MODEL.VFE.NAME)(cfg)
self.ins_loss = getattr(instance_losses, cfg.MODEL.INS_LOSS)
if cfg.MODEL.SEM_LOSS == 'Lovasz_loss':
self.sem_loss_lovasz = lovasz_losses.lovasz_softmax
if cfg.DATA_CONFIG.DATASET_NAME.startswith('SemanticKitti'):
weights = torch.zeros(20, dtype=torch.float)
weights[0] = 1.0
weights[1] = 2.293
weights[2] = 85.756
weights[3] = 71.511
weights[4] = 31.596
weights[5] = 35.624
weights[6] = 74.761
weights[7] = 88.722
weights[8] = 96.389
weights[9] = 1.00
weights[10] = 6.362
weights[11] = 1.00
weights[12] = 20.387
weights[13] = 1.00
weights[14] = 1.363
weights[15] = 1.00
weights[16] = 14.214
weights[17] = 1.263
weights[18] = 25.936
weights[19] = 61.896
else:
raise NotImplementedError
self.sem_loss = torch.nn.CrossEntropyLoss(weight=weights.cuda(), ignore_index=0)
else:
raise NotImplementedError
cluster_fn_wrapper = getattr(clustering, cfg.MODEL.POST_PROCESSING.CLUSTER_ALGO)
self.cluster_fn = cluster_fn_wrapper(cfg)
self.is_fix_semantic = False
self.merge_func_name = cfg.MODEL.POST_PROCESSING.MERGE_FUNC
def fix_semantic_parameters(self):
fix_list = [self.backbone, self.sem_head, self.vfe_model, self.fea_compression]
for mod in fix_list:
for p in mod.parameters():
p.requires_grad = False
self.is_fix_semantic = True
def forward(self, batch, is_test=False, before_merge_evaluator=None, after_merge_evaluator=None, require_cluster=True, require_merge=True):
if self.is_fix_semantic:
with torch.no_grad():
coor, feature_3d = self.voxelize_spconv(batch)
sem_fea, ins_fea = self.backbone(feature_3d, coor, len(batch['grid']))
sem_logits = self.sem_head(sem_fea)
else:
coor, feature_3d = self.voxelize_spconv(batch)
sem_fea, ins_fea = self.backbone(feature_3d, coor, len(batch['grid']))
sem_logits = self.sem_head(sem_fea)
pred_offsets, _ = self.ins_head(ins_fea, batch)
loss_dict = self.calc_loss(sem_logits, pred_offsets, batch, need_minus_one=False)
if is_test:
pt_sem_preds = self.calc_sem_label(sem_logits, batch, need_add_one=False)
if require_cluster:
pt_ins_ids_preds = self.clustering(pt_sem_preds, pred_offsets, batch)
else:
pt_ins_ids_preds = [np.zeros_like(pt_sem_preds[i]) for i in range(len(pt_sem_preds))]
if require_merge:
merged_sem_preds = self.merge_ins_sem(pt_sem_preds, pt_ins_ids_preds, sem_logits, batch)
else:
merged_sem_preds = pt_sem_preds
if before_merge_evaluator != None:
if 'mask' in batch:
self.update_evaluator_multi_frames(before_merge_evaluator, pt_sem_preds, pt_ins_ids_preds, batch)
else:
self.update_evaluator(before_merge_evaluator, pt_sem_preds, pt_ins_ids_preds, batch)
if after_merge_evaluator != None:
if 'mask' in batch:
self.update_evaluator_multi_frames(after_merge_evaluator, merged_sem_preds, pt_ins_ids_preds, batch)
else:
self.update_evaluator(after_merge_evaluator, merged_sem_preds, pt_ins_ids_preds, batch)
loss_dict['sem_preds'] = merged_sem_preds
loss_dict['ins_preds'] = pt_ins_ids_preds
loss_dict['ins_num'] = np.unique(pt_ins_ids_preds[0]).shape[0]
return loss_dict
class PolarOffsetSpconvPytorchMeanshift(PolarOffsetSpconv):
def __init__(self, cfg):
super(PolarOffsetSpconvPytorchMeanshift, self).__init__(cfg)
self.pytorch_meanshift = pytorch_meanshift.PytorchMeanshift(cfg, self.ins_loss, self.cluster_fn)
self.is_fix_semantic_instance = False
def fix_semantic_instance_parameters(self):
fix_list = [self.backbone, self.sem_head, self.vfe_model, self.fea_compression, self.ins_head]
for mod in fix_list:
for p in mod.parameters():
p.requires_grad = False
self.is_fix_semantic_instance = True
def forward(self, batch, is_test=False, before_merge_evaluator=None, after_merge_evaluator=None, require_cluster=True, require_merge=True):
if self.is_fix_semantic_instance:
with torch.no_grad():
coor, feature_3d = self.voxelize_spconv(batch)
sem_fea, ins_fea = self.backbone(feature_3d, coor, len(batch['grid']))
sem_logits = self.sem_head(sem_fea)
pred_offsets, ins_fea_list = self.ins_head(ins_fea, batch)
else:
if self.is_fix_semantic:
with torch.no_grad():
coor, feature_3d = self.voxelize_spconv(batch)
sem_fea, ins_fea = self.backbone(feature_3d, coor, len(batch['grid']))
sem_logits = self.sem_head(sem_fea)
else:
coor, feature_3d = self.voxelize_spconv(batch)
sem_fea, ins_fea = self.backbone(feature_3d, coor, len(batch['grid']))
sem_logits = self.sem_head(sem_fea)
pred_offsets, ins_fea_list = self.ins_head(ins_fea, batch)
loss_dict = self.calc_loss(sem_logits, pred_offsets, batch, need_minus_one=False)
valid = batch['pt_valid']
valid = [v.reshape(-1) for v in valid]
if is_test:
pt_sem_preds = self.calc_sem_label(sem_logits, batch, need_add_one=False)
valid = []
for i in range(len(batch['grid'])):
valid.append(np.isin(pt_sem_preds[i], valid_xentropy_ids).reshape(-1))
if self.pytorch_meanshift.data_mode == 'offset':
embedding = [offset + torch.from_numpy(xyz).cuda() for offset, xyz in zip(pred_offsets, batch['pt_cart_xyz'])]
else:
raise NotImplementedError
batch['ins_fea_list'] = ins_fea_list
pt_ins_ids_preds, meanshift_loss, bandwidth_weight_summary = self.pytorch_meanshift(batch['pt_cart_xyz'], embedding, valid, batch, need_cluster=is_test)
loss_dict['bandwidth_weight_summary'] = bandwidth_weight_summary
loss_dict['meanshift_loss'] = meanshift_loss
loss_dict['offset_loss_list'] += meanshift_loss
loss_dict['loss'] += sum(meanshift_loss)
if is_test:
if require_cluster:
merged_sem_preds = self.merge_ins_sem(pt_sem_preds, pt_ins_ids_preds)
else:
merged_sem_preds = pt_sem_preds
# if before_merge_evaluator != None:
# self.update_evaluator(before_merge_evaluator, pt_sem_preds, pt_ins_ids_preds, batch)
# if after_merge_evaluator != None:
# self.update_evaluator(after_merge_evaluator, merged_sem_preds, pt_ins_ids_preds, batch)
if before_merge_evaluator != None:
if 'mask' in batch:
self.update_evaluator_multi_frames(before_merge_evaluator, pt_sem_preds, pt_ins_ids_preds, batch)
else:
self.update_evaluator(before_merge_evaluator, pt_sem_preds, pt_ins_ids_preds, batch)
if after_merge_evaluator != None:
if 'mask' in batch:
self.update_evaluator_multi_frames(after_merge_evaluator, merged_sem_preds, pt_ins_ids_preds, batch)
else:
self.update_evaluator(after_merge_evaluator, merged_sem_preds, pt_ins_ids_preds, batch)
if 'mask' in batch:
loss_dict['sem_preds'] = [m[batch['mask_np'][i].reshape(-1) == 0] for i, m in enumerate(merged_sem_preds)]
loss_dict['ins_preds'] = [p[batch['mask_np'][i].reshape(-1) == 0] for i, p in enumerate(pt_ins_ids_preds)]
else:
loss_dict['sem_preds'] = merged_sem_preds
loss_dict['ins_preds'] = pt_ins_ids_preds
loss_dict['ins_num'] = np.unique(pt_ins_ids_preds[0]).shape[0]
return loss_dict
class PolarOffsetSpconvPytorchMeanshiftTrackingMultiFrames(PolarOffsetSpconvPytorchMeanshift):
def __init__(self, cfg):
super(PolarOffsetSpconvPytorchMeanshiftTrackingMultiFrames, self).__init__(cfg)
self.is_init = False
self.before_ins_ids_preds = None
self.before_valid_preds = None
self.before_seq = None
def update_evaluator_multi_frames(self, evaluator, sem_preds, ins_preds, inputs, window_k):
assert len(sem_preds) == 1
for i in range(len(sem_preds)):
eval_one_scan_vps(evaluator, inputs['pt_labs'][i][inputs['mask_np'][i].reshape(-1) == 0].reshape(-1),
inputs['pt_ins_labels'][i][inputs['mask_np'][i].reshape(-1) == 0].reshape(-1),
sem_preds[i][inputs['mask_np'][i].reshape(-1) == 0].reshape(-1),
ins_preds[i].reshape(-1), window_k)
def forward(self, batch, is_test=False, merge_evaluator_list=None, merge_evaluator_window_k_list=None, require_cluster=True, require_merge=True):
assert is_test
if self.is_fix_semantic_instance:
with torch.no_grad():
coor, feature_3d = self.voxelize_spconv(batch)
sem_fea, ins_fea = self.backbone(feature_3d, coor, len(batch['grid']))
sem_logits = self.sem_head(sem_fea)
pred_offsets, ins_fea_list = self.ins_head(ins_fea, batch)
else:
if self.is_fix_semantic:
with torch.no_grad():
coor, feature_3d = self.voxelize_spconv(batch)
sem_fea, ins_fea = self.backbone(feature_3d, coor, len(batch['grid']))
sem_logits = self.sem_head(sem_fea)
else:
coor, feature_3d = self.voxelize_spconv(batch)
sem_fea, ins_fea = self.backbone(feature_3d, coor, len(batch['grid']))
sem_logits = self.sem_head(sem_fea)
pred_offsets, ins_fea_list = self.ins_head(ins_fea, batch)
loss_dict = self.calc_loss(sem_logits, pred_offsets, batch, need_minus_one=False)
valid = batch['pt_valid']
if is_test:
pt_sem_preds = self.calc_sem_label(sem_logits, batch, need_add_one=False)
valid = []
for i in range(len(batch['grid'])):
valid.append(np.isin(pt_sem_preds[i], valid_xentropy_ids).reshape(-1))
if self.pytorch_meanshift.data_mode == 'offset':
embedding = [offset + torch.from_numpy(xyz).cuda() for offset, xyz in zip(pred_offsets, batch['pt_cart_xyz'])]
else:
raise NotImplementedError
batch['ins_fea_list'] = ins_fea_list
pt_ins_ids_preds, meanshift_loss, bandwidth_weight_summary = self.pytorch_meanshift(batch['pt_cart_xyz'], embedding, valid, batch, need_cluster=is_test)
loss_dict['bandwidth_weight_summary'] = bandwidth_weight_summary
loss_dict['meanshift_loss'] = meanshift_loss
loss_dict['offset_loss_list'] += meanshift_loss
loss_dict['loss'] += sum(meanshift_loss)
if is_test:
if require_cluster:
merged_sem_preds = self.merge_ins_sem(pt_sem_preds, pt_ins_ids_preds)
else:
merged_sem_preds = pt_sem_preds
cur_pcd_fname = batch['pcd_fname'][0]
cur_pcd_seq = cur_pcd_fname.split('/')[-3]
if self.before_seq == None:
self.before_seq = cur_pcd_seq
elif self.before_seq != cur_pcd_seq:
self.before_seq = cur_pcd_seq
self.is_init = False
ins_preds_tracking, matching_list = self.tracking_test(valid, pt_ins_ids_preds, batch)
loss_dict['ins_preds'] = ins_preds_tracking
loss_dict['matching_list'] = matching_list
if merge_evaluator_list is not None:
for evaluator, window_k in zip(merge_evaluator_list, merge_evaluator_window_k_list):
self.update_evaluator_multi_frames(evaluator, merged_sem_preds, ins_preds_tracking, batch, window_k)
loss_dict['sem_preds'] = [m[batch['mask_np'][i].reshape(-1) == 0] for i, m in enumerate(merged_sem_preds)]
loss_dict['ins_num'] = np.unique(ins_preds_tracking[0]).shape[0]
return loss_dict
def matching(self, after_ins_ids_gt, after_valid_gt, after_ins_ids_preds, after_valid_preds):
offset = 2**32
x_inst_in_cl_mask = after_valid_preds.reshape(-1)
y_inst_in_cl_mask = after_valid_gt.reshape(-1)
x_inst_in_cl = after_ins_ids_preds.reshape(-1) * x_inst_in_cl_mask.astype(np.int64)
y_inst_in_cl = after_ins_ids_gt.reshape(-1) * y_inst_in_cl_mask.astype(np.int64)
unique_pred, counts_pred = np.unique(x_inst_in_cl[x_inst_in_cl > 0], return_counts=True)
id2idx_pred = {id: idx for idx, id in enumerate(unique_pred)}
matched_pred = np.array([False] * unique_pred.shape[0])
unique_gt, counts_gt = np.unique(y_inst_in_cl[y_inst_in_cl > 0], return_counts=True)
id2idx_gt = {id: idx for idx, id in enumerate(unique_gt)}
matched_gt = np.array([False] * unique_gt.shape[0])
valid_combos = np.logical_and(x_inst_in_cl > 0, y_inst_in_cl > 0)
offset_combo = x_inst_in_cl[valid_combos] + offset * y_inst_in_cl[valid_combos]
unique_combo, counts_combo = np.unique(offset_combo, return_counts=True)
gt_labels = unique_combo // offset
pred_labels = unique_combo % offset
gt_areas = np.array([counts_gt[id2idx_gt[id]] for id in gt_labels])
pred_areas = np.array([counts_pred[id2idx_pred[id]] for id in pred_labels])
intersections = counts_combo
unions = gt_areas + pred_areas - intersections
ious = intersections.astype(np.float) / unions.astype(np.float)
tp_indexes = ious > 0.5
return pred_labels[tp_indexes], gt_labels[tp_indexes]
def tracking_test(self, pred_valid, pred_ins_ids, batch):
batch_size = len(pred_valid)
assert batch_size == 1
ins_ids_tracking_list = []
matching_list = []
for b in range(batch_size):
after_mask = batch['mask_np'][b].reshape(-1) == 0
after_ins_ids_preds = pred_ins_ids[b][after_mask]
after_valid_preds = pred_valid[b][after_mask]
after_valid_ins_ids_preds = after_ins_ids_preds[after_valid_preds].reshape(-1)
after_unique_ins_ids_preds, after_unique_ins_ids_preds_counts = np.unique(after_valid_ins_ids_preds, return_counts=True)
# after_unique_ins_ids_preds = after_unique_ins_ids_preds[after_unique_ins_ids_preds_counts > min_points].reshape(-1)
if after_unique_ins_ids_preds.shape[0] == 0:
self.is_init = False
return [after_ins_ids_preds], matching_list
| return [after_ins_ids_preds], matching_list
before_mask = batch['mask_np'][b].reshape(-1) == 1
cur_before_ins_ids_preds = pred_ins_ids[b][before_mask]
cur_before_valid_preds = pred_valid[b][before_mask]
cur_before_labels, before_labels = self.matching(
self.before_ins_ids_preds, self.before_valid_preds,
cur_before_ins_ids_preds, cur_before_valid_preds
)
cur2before_dict = {c:b for c,b in zip(cur_before_labels, before_labels)}
ins_ids_tracking = np.zeros_like(after_ins_ids_preds)
cur_max = np.max(self.before_ins_ids_preds)
for au in after_unique_ins_ids_preds:
if au in cur2before_dict:
ins_ids_tracking[after_ins_ids_preds == au] = cur2before_dict[au]
else:
cur_max += 1
ins_ids_tracking[after_ins_ids_preds == au] = cur_max
ins_ids_tracking_list.append(ins_ids_tracking)
self.before_ins_ids_preds = ins_ids_tracking
self.before_valid_preds = after_valid_preds
return ins_ids_tracking_list, matching_list | if not self.is_init:
self.is_init = True
self.before_ins_ids_preds = after_ins_ids_preds
self.before_valid_preds = after_valid_preds |
build.rs | use std::env;
fn main() { | println!("cargo:rerun-if-changed={}", linker_file);
println!("cargo:rerun-if-changed=build.rs");
} | let linker_file = env::var("LINKER_FILE").unwrap_or_else(|_| "linker.ld".to_string());
|
ex028.py | from random import randint
import playsound
from time import sleep
print('-=-' * 20)
print('Vou pensar em um número entre 0 e 5. Tente advinhar... ')
print('-=-' * 20)
jogador = int(input('Em que número você pensou? '))
print('PROCESSANDO... ')
sleep(3)
computador = randint(0, 5)
if jogador == computador:
print('PARABÉNS! Você acertou! Eu escolhi {} e você escolheu {} também! '.format(computador, jogador))
playsound.playsound('ex028.mp3')
else: | print('VOCÊ ERRROU! Eu escolhi {} e você escolheu {}'.format(computador, jogador))
playsound.playsound('errou.mp3')
print('Foi muito bom jogar com você!') |
|
error_reporting.rs | // Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use super::{
FulfillmentError,
FulfillmentErrorCode,
MismatchedProjectionTypes,
Obligation,
ObligationCause,
ObligationCauseCode,
OnUnimplementedDirective,
OnUnimplementedNote,
OutputTypeParameterMismatch,
TraitNotObjectSafe,
ConstEvalFailure,
PredicateObligation,
SelectionContext,
SelectionError,
ObjectSafetyViolation,
Overflow,
};
use errors::{Applicability, DiagnosticBuilder};
use hir;
use hir::def_id::DefId;
use infer::{self, InferCtxt};
use infer::type_variable::TypeVariableOrigin;
use std::fmt;
use syntax::ast;
use session::DiagnosticMessageId;
use ty::{self, AdtKind, ToPredicate, ToPolyTraitRef, Ty, TyCtxt, TypeFoldable};
use ty::GenericParamDefKind;
use ty::error::ExpectedFound;
use ty::fast_reject;
use ty::fold::TypeFolder;
use ty::subst::Subst;
use ty::SubtypePredicate;
use util::nodemap::{FxHashMap, FxHashSet};
use syntax_pos::{DUMMY_SP, Span};
impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
pub fn report_fulfillment_errors(&self,
errors: &Vec<FulfillmentError<'tcx>>,
body_id: Option<hir::BodyId>,
fallback_has_occurred: bool) |
// returns if `cond` not occurring implies that `error` does not occur - i.e. that
// `error` occurring implies that `cond` occurs.
fn error_implies(&self,
cond: &ty::Predicate<'tcx>,
error: &ty::Predicate<'tcx>)
-> bool
{
if cond == error {
return true
}
let (cond, error) = match (cond, error) {
(&ty::Predicate::Trait(..), &ty::Predicate::Trait(ref error))
=> (cond, error),
_ => {
// FIXME: make this work in other cases too.
return false
}
};
for implication in super::elaborate_predicates(self.tcx, vec![cond.clone()]) {
if let ty::Predicate::Trait(implication) = implication {
let error = error.to_poly_trait_ref();
let implication = implication.to_poly_trait_ref();
// FIXME: I'm just not taking associated types at all here.
// Eventually I'll need to implement param-env-aware
// `Γ₁ ⊦ φ₁ => Γ₂ ⊦ φ₂` logic.
let param_env = ty::ParamEnv::empty();
if let Ok(_) = self.can_sub(param_env, error, implication) {
debug!("error_implies: {:?} -> {:?} -> {:?}", cond, error, implication);
return true
}
}
}
false
}
fn report_fulfillment_error(&self, error: &FulfillmentError<'tcx>,
body_id: Option<hir::BodyId>,
fallback_has_occurred: bool) {
debug!("report_fulfillment_errors({:?})", error);
match error.code {
FulfillmentErrorCode::CodeSelectionError(ref e) => {
self.report_selection_error(&error.obligation, e, fallback_has_occurred);
}
FulfillmentErrorCode::CodeProjectionError(ref e) => {
self.report_projection_error(&error.obligation, e);
}
FulfillmentErrorCode::CodeAmbiguity => {
self.maybe_report_ambiguity(&error.obligation, body_id);
}
FulfillmentErrorCode::CodeSubtypeError(ref expected_found, ref err) => {
self.report_mismatched_types(&error.obligation.cause,
expected_found.expected,
expected_found.found,
err.clone())
.emit();
}
}
}
fn report_projection_error(&self,
obligation: &PredicateObligation<'tcx>,
error: &MismatchedProjectionTypes<'tcx>)
{
let predicate =
self.resolve_type_vars_if_possible(&obligation.predicate);
if predicate.references_error() {
return
}
self.probe(|_| {
let err_buf;
let mut err = &error.err;
let mut values = None;
// try to find the mismatched types to report the error with.
//
// this can fail if the problem was higher-ranked, in which
// cause I have no idea for a good error message.
if let ty::Predicate::Projection(ref data) = predicate {
let mut selcx = SelectionContext::new(self);
let (data, _) = self.replace_late_bound_regions_with_fresh_var(
obligation.cause.span,
infer::LateBoundRegionConversionTime::HigherRankedType,
data);
let mut obligations = vec![];
let normalized_ty = super::normalize_projection_type(
&mut selcx,
obligation.param_env,
data.projection_ty,
obligation.cause.clone(),
0,
&mut obligations
);
if let Err(error) = self.at(&obligation.cause, obligation.param_env)
.eq(normalized_ty, data.ty) {
values = Some(infer::ValuePairs::Types(ExpectedFound {
expected: normalized_ty,
found: data.ty,
}));
err_buf = error;
err = &err_buf;
}
}
let msg = format!("type mismatch resolving `{}`", predicate);
let error_id = (DiagnosticMessageId::ErrorId(271),
Some(obligation.cause.span), msg.clone());
let fresh = self.tcx.sess.one_time_diagnostics.borrow_mut().insert(error_id);
if fresh {
let mut diag = struct_span_err!(
self.tcx.sess, obligation.cause.span, E0271,
"type mismatch resolving `{}`", predicate
);
self.note_type_err(&mut diag, &obligation.cause, None, values, err);
self.note_obligation_cause(&mut diag, obligation);
diag.emit();
}
});
}
fn fuzzy_match_tys(&self, a: Ty<'tcx>, b: Ty<'tcx>) -> bool {
/// returns the fuzzy category of a given type, or None
/// if the type can be equated to any type.
fn type_category<'tcx>(t: Ty<'tcx>) -> Option<u32> {
match t.sty {
ty::TyBool => Some(0),
ty::TyChar => Some(1),
ty::TyStr => Some(2),
ty::TyInt(..) | ty::TyUint(..) | ty::TyInfer(ty::IntVar(..)) => Some(3),
ty::TyFloat(..) | ty::TyInfer(ty::FloatVar(..)) => Some(4),
ty::TyRef(..) | ty::TyRawPtr(..) => Some(5),
ty::TyArray(..) | ty::TySlice(..) => Some(6),
ty::TyFnDef(..) | ty::TyFnPtr(..) => Some(7),
ty::TyDynamic(..) => Some(8),
ty::TyClosure(..) => Some(9),
ty::TyTuple(..) => Some(10),
ty::TyProjection(..) => Some(11),
ty::TyParam(..) => Some(12),
ty::TyAnon(..) => Some(13),
ty::TyNever => Some(14),
ty::TyAdt(adt, ..) => match adt.adt_kind() {
AdtKind::Struct => Some(15),
AdtKind::Union => Some(16),
AdtKind::Enum => Some(17),
},
ty::TyGenerator(..) => Some(18),
ty::TyForeign(..) => Some(19),
ty::TyGeneratorWitness(..) => Some(20),
ty::TyInfer(..) | ty::TyError => None
}
}
match (type_category(a), type_category(b)) {
(Some(cat_a), Some(cat_b)) => match (&a.sty, &b.sty) {
(&ty::TyAdt(def_a, _), &ty::TyAdt(def_b, _)) => def_a == def_b,
_ => cat_a == cat_b
},
// infer and error can be equated to all types
_ => true
}
}
fn impl_similar_to(&self,
trait_ref: ty::PolyTraitRef<'tcx>,
obligation: &PredicateObligation<'tcx>)
-> Option<DefId>
{
let tcx = self.tcx;
let param_env = obligation.param_env;
let trait_ref = tcx.erase_late_bound_regions(&trait_ref);
let trait_self_ty = trait_ref.self_ty();
let mut self_match_impls = vec![];
let mut fuzzy_match_impls = vec![];
self.tcx.for_each_relevant_impl(
trait_ref.def_id, trait_self_ty, |def_id| {
let impl_substs = self.fresh_substs_for_item(obligation.cause.span, def_id);
let impl_trait_ref = tcx
.impl_trait_ref(def_id)
.unwrap()
.subst(tcx, impl_substs);
let impl_self_ty = impl_trait_ref.self_ty();
if let Ok(..) = self.can_eq(param_env, trait_self_ty, impl_self_ty) {
self_match_impls.push(def_id);
if trait_ref.substs.types().skip(1)
.zip(impl_trait_ref.substs.types().skip(1))
.all(|(u,v)| self.fuzzy_match_tys(u, v))
{
fuzzy_match_impls.push(def_id);
}
}
});
let impl_def_id = if self_match_impls.len() == 1 {
self_match_impls[0]
} else if fuzzy_match_impls.len() == 1 {
fuzzy_match_impls[0]
} else {
return None
};
if tcx.has_attr(impl_def_id, "rustc_on_unimplemented") {
Some(impl_def_id)
} else {
None
}
}
fn on_unimplemented_note(
&self,
trait_ref: ty::PolyTraitRef<'tcx>,
obligation: &PredicateObligation<'tcx>) ->
OnUnimplementedNote
{
let def_id = self.impl_similar_to(trait_ref, obligation)
.unwrap_or(trait_ref.def_id());
let trait_ref = *trait_ref.skip_binder();
let mut flags = vec![];
match obligation.cause.code {
ObligationCauseCode::BuiltinDerivedObligation(..) |
ObligationCauseCode::ImplDerivedObligation(..) => {}
_ => {
// this is a "direct", user-specified, rather than derived,
// obligation.
flags.push(("direct".to_string(), None));
}
}
if let ObligationCauseCode::ItemObligation(item) = obligation.cause.code {
// FIXME: maybe also have some way of handling methods
// from other traits? That would require name resolution,
// which we might want to be some sort of hygienic.
//
// Currently I'm leaving it for what I need for `try`.
if self.tcx.trait_of_item(item) == Some(trait_ref.def_id) {
let method = self.tcx.item_name(item);
flags.push(("from_method".to_string(), None));
flags.push(("from_method".to_string(), Some(method.to_string())));
}
}
if let Some(k) = obligation.cause.span.compiler_desugaring_kind() {
let desugaring = k.as_symbol().as_str();
flags.push(("from_desugaring".to_string(), None));
flags.push(("from_desugaring".to_string(), Some(desugaring.to_string())));
}
let generics = self.tcx.generics_of(def_id);
let self_ty = trait_ref.self_ty();
// This is also included through the generics list as `Self`,
// but the parser won't allow you to use it
flags.push(("_Self".to_string(), Some(self_ty.to_string())));
if let Some(def) = self_ty.ty_adt_def() {
// We also want to be able to select self's original
// signature with no type arguments resolved
flags.push(("_Self".to_string(), Some(self.tcx.type_of(def.did).to_string())));
}
for param in generics.params.iter() {
let value = match param.kind {
GenericParamDefKind::Type {..} => {
trait_ref.substs[param.index as usize].to_string()
},
GenericParamDefKind::Lifetime => continue,
};
let name = param.name.to_string();
flags.push((name, Some(value)));
}
if let Some(true) = self_ty.ty_to_def_id().map(|def_id| def_id.is_local()) {
flags.push(("crate_local".to_string(), None));
}
if let Ok(Some(command)) = OnUnimplementedDirective::of_item(
self.tcx, trait_ref.def_id, def_id
) {
command.evaluate(self.tcx, trait_ref, &flags[..])
} else {
OnUnimplementedNote::empty()
}
}
fn find_similar_impl_candidates(&self,
trait_ref: ty::PolyTraitRef<'tcx>)
-> Vec<ty::TraitRef<'tcx>>
{
let simp = fast_reject::simplify_type(self.tcx,
trait_ref.skip_binder().self_ty(),
true);
let mut impl_candidates = Vec::new();
match simp {
Some(simp) => self.tcx.for_each_impl(trait_ref.def_id(), |def_id| {
let imp = self.tcx.impl_trait_ref(def_id).unwrap();
let imp_simp = fast_reject::simplify_type(self.tcx,
imp.self_ty(),
true);
if let Some(imp_simp) = imp_simp {
if simp != imp_simp {
return;
}
}
impl_candidates.push(imp);
}),
None => self.tcx.for_each_impl(trait_ref.def_id(), |def_id| {
impl_candidates.push(
self.tcx.impl_trait_ref(def_id).unwrap());
})
};
impl_candidates
}
fn report_similar_impl_candidates(&self,
impl_candidates: Vec<ty::TraitRef<'tcx>>,
err: &mut DiagnosticBuilder)
{
if impl_candidates.is_empty() {
return;
}
let end = if impl_candidates.len() <= 5 {
impl_candidates.len()
} else {
4
};
let normalize = |candidate| self.tcx.global_tcx().infer_ctxt().enter(|ref infcx| {
let normalized = infcx
.at(&ObligationCause::dummy(), ty::ParamEnv::empty())
.normalize(candidate)
.ok();
match normalized {
Some(normalized) => format!("\n {:?}", normalized.value),
None => format!("\n {:?}", candidate),
}
});
err.help(&format!("the following implementations were found:{}{}",
&impl_candidates[0..end].iter().map(normalize).collect::<String>(),
if impl_candidates.len() > 5 {
format!("\nand {} others", impl_candidates.len() - 4)
} else {
"".to_owned()
}
));
}
/// Reports that an overflow has occurred and halts compilation. We
/// halt compilation unconditionally because it is important that
/// overflows never be masked -- they basically represent computations
/// whose result could not be truly determined and thus we can't say
/// if the program type checks or not -- and they are unusual
/// occurrences in any case.
pub fn report_overflow_error<T>(&self,
obligation: &Obligation<'tcx, T>,
suggest_increasing_limit: bool) -> !
where T: fmt::Display + TypeFoldable<'tcx>
{
let predicate =
self.resolve_type_vars_if_possible(&obligation.predicate);
let mut err = struct_span_err!(self.tcx.sess, obligation.cause.span, E0275,
"overflow evaluating the requirement `{}`",
predicate);
if suggest_increasing_limit {
self.suggest_new_overflow_limit(&mut err);
}
self.note_obligation_cause(&mut err, obligation);
err.emit();
self.tcx.sess.abort_if_errors();
bug!();
}
/// Reports that a cycle was detected which led to overflow and halts
/// compilation. This is equivalent to `report_overflow_error` except
/// that we can give a more helpful error message (and, in particular,
/// we do not suggest increasing the overflow limit, which is not
/// going to help).
pub fn report_overflow_error_cycle(&self, cycle: &[PredicateObligation<'tcx>]) -> ! {
let cycle = self.resolve_type_vars_if_possible(&cycle.to_owned());
assert!(cycle.len() > 0);
debug!("report_overflow_error_cycle: cycle={:?}", cycle);
self.report_overflow_error(&cycle[0], false);
}
pub fn report_extra_impl_obligation(&self,
error_span: Span,
item_name: ast::Name,
_impl_item_def_id: DefId,
trait_item_def_id: DefId,
requirement: &dyn fmt::Display)
-> DiagnosticBuilder<'tcx>
{
let msg = "impl has stricter requirements than trait";
let sp = self.tcx.sess.codemap().def_span(error_span);
let mut err = struct_span_err!(self.tcx.sess, sp, E0276, "{}", msg);
if let Some(trait_item_span) = self.tcx.hir.span_if_local(trait_item_def_id) {
let span = self.tcx.sess.codemap().def_span(trait_item_span);
err.span_label(span, format!("definition of `{}` from trait", item_name));
}
err.span_label(sp, format!("impl has extra requirement {}", requirement));
err
}
/// Get the parent trait chain start
fn get_parent_trait_ref(&self, code: &ObligationCauseCode<'tcx>) -> Option<String> {
match code {
&ObligationCauseCode::BuiltinDerivedObligation(ref data) => {
let parent_trait_ref = self.resolve_type_vars_if_possible(
&data.parent_trait_ref);
match self.get_parent_trait_ref(&data.parent_code) {
Some(t) => Some(t),
None => Some(format!("{}", parent_trait_ref.skip_binder().self_ty())),
}
}
_ => None,
}
}
pub fn report_selection_error(&self,
obligation: &PredicateObligation<'tcx>,
error: &SelectionError<'tcx>,
fallback_has_occurred: bool)
{
let span = obligation.cause.span;
let mut err = match *error {
SelectionError::Unimplemented => {
if let ObligationCauseCode::CompareImplMethodObligation {
item_name, impl_item_def_id, trait_item_def_id,
} = obligation.cause.code {
self.report_extra_impl_obligation(
span,
item_name,
impl_item_def_id,
trait_item_def_id,
&format!("`{}`", obligation.predicate))
.emit();
return;
}
match obligation.predicate {
ty::Predicate::Trait(ref trait_predicate) => {
let trait_predicate =
self.resolve_type_vars_if_possible(trait_predicate);
if self.tcx.sess.has_errors() && trait_predicate.references_error() {
return;
}
let trait_ref = trait_predicate.to_poly_trait_ref();
let (post_message, pre_message) =
self.get_parent_trait_ref(&obligation.cause.code)
.map(|t| (format!(" in `{}`", t), format!("within `{}`, ", t)))
.unwrap_or((String::new(), String::new()));
let OnUnimplementedNote { message, label, note }
= self.on_unimplemented_note(trait_ref, obligation);
let have_alt_message = message.is_some() || label.is_some();
let mut err = struct_span_err!(
self.tcx.sess,
span,
E0277,
"{}",
message.unwrap_or_else(|| {
format!("the trait bound `{}` is not satisfied{}",
trait_ref.to_predicate(), post_message)
}));
let explanation =
if obligation.cause.code == ObligationCauseCode::MainFunctionType {
"consider using `()`, or a `Result`".to_owned()
} else {
format!("{}the trait `{}` is not implemented for `{}`",
pre_message,
trait_ref,
trait_ref.self_ty())
};
if let Some(ref s) = label {
// If it has a custom "#[rustc_on_unimplemented]"
// error message, let's display it as the label!
err.span_label(span, s.as_str());
err.help(&explanation);
} else {
err.span_label(span, explanation);
}
if let Some(ref s) = note {
// If it has a custom "#[rustc_on_unimplemented]" note, let's display it
err.note(s.as_str());
}
self.suggest_borrow_on_unsized_slice(&obligation.cause.code, &mut err);
self.suggest_remove_reference(&obligation, &mut err, &trait_ref);
// Try to report a help message
if !trait_ref.has_infer_types() &&
self.predicate_can_apply(obligation.param_env, trait_ref) {
// If a where-clause may be useful, remind the
// user that they can add it.
//
// don't display an on-unimplemented note, as
// these notes will often be of the form
// "the type `T` can't be frobnicated"
// which is somewhat confusing.
err.help(&format!("consider adding a `where {}` bound",
trait_ref.to_predicate()));
} else if !have_alt_message {
// Can't show anything else useful, try to find similar impls.
let impl_candidates = self.find_similar_impl_candidates(trait_ref);
self.report_similar_impl_candidates(impl_candidates, &mut err);
}
// If this error is due to `!: Trait` not implemented but `(): Trait` is
// implemented, and fallback has occured, then it could be due to a
// variable that used to fallback to `()` now falling back to `!`. Issue a
// note informing about the change in behaviour.
if trait_predicate.skip_binder().self_ty().is_never()
&& fallback_has_occurred
{
let predicate = trait_predicate.map_bound(|mut trait_pred| {
trait_pred.trait_ref.substs = self.tcx.mk_substs_trait(
self.tcx.mk_nil(),
&trait_pred.trait_ref.substs[1..],
);
trait_pred
});
let unit_obligation = Obligation {
predicate: ty::Predicate::Trait(predicate),
.. obligation.clone()
};
if self.predicate_may_hold(&unit_obligation) {
err.note("the trait is implemented for `()`. \
Possibly this error has been caused by changes to \
Rust's type-inference algorithm \
(see: https://github.com/rust-lang/rust/issues/48950 \
for more info). Consider whether you meant to use the \
type `()` here instead.");
}
}
err
}
ty::Predicate::Subtype(ref predicate) => {
// Errors for Subtype predicates show up as
// `FulfillmentErrorCode::CodeSubtypeError`,
// not selection error.
span_bug!(span, "subtype requirement gave wrong error: `{:?}`", predicate)
}
ty::Predicate::RegionOutlives(ref predicate) => {
let predicate = self.resolve_type_vars_if_possible(predicate);
let err = self.region_outlives_predicate(&obligation.cause,
&predicate).err().unwrap();
struct_span_err!(self.tcx.sess, span, E0279,
"the requirement `{}` is not satisfied (`{}`)",
predicate, err)
}
ty::Predicate::Projection(..) | ty::Predicate::TypeOutlives(..) => {
let predicate =
self.resolve_type_vars_if_possible(&obligation.predicate);
struct_span_err!(self.tcx.sess, span, E0280,
"the requirement `{}` is not satisfied",
predicate)
}
ty::Predicate::ObjectSafe(trait_def_id) => {
let violations = self.tcx.object_safety_violations(trait_def_id);
self.tcx.report_object_safety_error(span,
trait_def_id,
violations)
}
ty::Predicate::ClosureKind(closure_def_id, closure_substs, kind) => {
let found_kind = self.closure_kind(closure_def_id, closure_substs).unwrap();
let closure_span = self.tcx.sess.codemap()
.def_span(self.tcx.hir.span_if_local(closure_def_id).unwrap());
let node_id = self.tcx.hir.as_local_node_id(closure_def_id).unwrap();
let mut err = struct_span_err!(
self.tcx.sess, closure_span, E0525,
"expected a closure that implements the `{}` trait, \
but this closure only implements `{}`",
kind,
found_kind);
err.span_label(
closure_span,
format!("this closure implements `{}`, not `{}`", found_kind, kind));
err.span_label(
obligation.cause.span,
format!("the requirement to implement `{}` derives from here", kind));
// Additional context information explaining why the closure only implements
// a particular trait.
if let Some(tables) = self.in_progress_tables {
let tables = tables.borrow();
let closure_hir_id = self.tcx.hir.node_to_hir_id(node_id);
match (found_kind, tables.closure_kind_origins().get(closure_hir_id)) {
(ty::ClosureKind::FnOnce, Some((span, name))) => {
err.span_label(*span, format!(
"closure is `FnOnce` because it moves the \
variable `{}` out of its environment", name));
},
(ty::ClosureKind::FnMut, Some((span, name))) => {
err.span_label(*span, format!(
"closure is `FnMut` because it mutates the \
variable `{}` here", name));
},
_ => {}
}
}
err.emit();
return;
}
ty::Predicate::WellFormed(ty) => {
// WF predicates cannot themselves make
// errors. They can only block due to
// ambiguity; otherwise, they always
// degenerate into other obligations
// (which may fail).
span_bug!(span, "WF predicate not satisfied for {:?}", ty);
}
ty::Predicate::ConstEvaluatable(..) => {
// Errors for `ConstEvaluatable` predicates show up as
// `SelectionError::ConstEvalFailure`,
// not `Unimplemented`.
span_bug!(span,
"const-evaluatable requirement gave wrong error: `{:?}`", obligation)
}
}
}
OutputTypeParameterMismatch(ref found_trait_ref, ref expected_trait_ref, _) => {
let found_trait_ref = self.resolve_type_vars_if_possible(&*found_trait_ref);
let expected_trait_ref = self.resolve_type_vars_if_possible(&*expected_trait_ref);
if expected_trait_ref.self_ty().references_error() {
return;
}
let found_trait_ty = found_trait_ref.self_ty();
let found_did = found_trait_ty.ty_to_def_id();
let found_span = found_did.and_then(|did| {
self.tcx.hir.span_if_local(did)
}).map(|sp| self.tcx.sess.codemap().def_span(sp)); // the sp could be an fn def
let found = match found_trait_ref.skip_binder().substs.type_at(1).sty {
ty::TyTuple(ref tys) => tys.iter()
.map(|_| ArgKind::empty()).collect::<Vec<_>>(),
_ => vec![ArgKind::empty()],
};
let expected = match expected_trait_ref.skip_binder().substs.type_at(1).sty {
ty::TyTuple(ref tys) => tys.iter()
.map(|t| match t.sty {
ty::TypeVariants::TyTuple(ref tys) => ArgKind::Tuple(
Some(span),
tys.iter()
.map(|ty| ("_".to_owned(), format!("{}", ty.sty)))
.collect::<Vec<_>>()
),
_ => ArgKind::Arg("_".to_owned(), format!("{}", t.sty)),
}).collect(),
ref sty => vec![ArgKind::Arg("_".to_owned(), format!("{}", sty))],
};
if found.len() == expected.len() {
self.report_closure_arg_mismatch(span,
found_span,
found_trait_ref,
expected_trait_ref)
} else {
let (closure_span, found) = found_did
.and_then(|did| self.tcx.hir.get_if_local(did))
.map(|node| {
let (found_span, found) = self.get_fn_like_arguments(node);
(Some(found_span), found)
}).unwrap_or((found_span, found));
self.report_arg_count_mismatch(span,
closure_span,
expected,
found,
found_trait_ty.is_closure())
}
}
TraitNotObjectSafe(did) => {
let violations = self.tcx.object_safety_violations(did);
self.tcx.report_object_safety_error(span, did,
violations)
}
ConstEvalFailure(ref err) => {
match err.struct_error(
self.tcx.at(span),
"could not evaluate constant expression",
) {
Some(err) => err,
None => return,
}
}
Overflow => {
bug!("overflow should be handled before the `report_selection_error` path");
}
};
self.note_obligation_cause(&mut err, obligation);
err.emit();
}
/// When encountering an assignment of an unsized trait, like `let x = ""[..];`, provide a
/// suggestion to borrow the initializer in order to use have a slice instead.
fn suggest_borrow_on_unsized_slice(&self,
code: &ObligationCauseCode<'tcx>,
err: &mut DiagnosticBuilder<'tcx>) {
if let &ObligationCauseCode::VariableType(node_id) = code {
let parent_node = self.tcx.hir.get_parent_node(node_id);
if let Some(hir::map::NodeLocal(ref local)) = self.tcx.hir.find(parent_node) {
if let Some(ref expr) = local.init {
if let hir::ExprIndex(_, _) = expr.node {
if let Ok(snippet) = self.tcx.sess.codemap().span_to_snippet(expr.span) {
err.span_suggestion_with_applicability(
expr.span,
"consider borrowing here",
format!("&{}", snippet),
Applicability::MachineApplicable
);
}
}
}
}
}
}
/// Whenever references are used by mistake, like `for (i, e) in &vec.iter().enumerate()`,
/// suggest removing these references until we reach a type that implements the trait.
fn suggest_remove_reference(&self,
obligation: &PredicateObligation<'tcx>,
err: &mut DiagnosticBuilder<'tcx>,
trait_ref: &ty::Binder<ty::TraitRef<'tcx>>) {
let trait_ref = trait_ref.skip_binder();
let span = obligation.cause.span;
if let Ok(snippet) = self.tcx.sess.codemap().span_to_snippet(span) {
let refs_number = snippet.chars()
.filter(|c| !c.is_whitespace())
.take_while(|c| *c == '&')
.count();
let mut trait_type = trait_ref.self_ty();
for refs_remaining in 0..refs_number {
if let ty::TypeVariants::TyRef(_, t_type, _) = trait_type.sty {
trait_type = t_type;
let substs = self.tcx.mk_substs_trait(trait_type, &[]);
let new_trait_ref = ty::TraitRef::new(trait_ref.def_id, substs);
let new_obligation = Obligation::new(ObligationCause::dummy(),
obligation.param_env,
new_trait_ref.to_predicate());
if self.predicate_may_hold(&new_obligation) {
let sp = self.tcx.sess.codemap()
.span_take_while(span, |c| c.is_whitespace() || *c == '&');
let remove_refs = refs_remaining + 1;
let format_str = format!("consider removing {} leading `&`-references",
remove_refs);
err.span_suggestion_short_with_applicability(
sp, &format_str, String::from(""), Applicability::MachineApplicable
);
break;
}
} else {
break;
}
}
}
}
/// Given some node representing a fn-like thing in the HIR map,
/// returns a span and `ArgKind` information that describes the
/// arguments it expects. This can be supplied to
/// `report_arg_count_mismatch`.
pub fn get_fn_like_arguments(&self, node: hir::map::Node) -> (Span, Vec<ArgKind>) {
match node {
hir::map::NodeExpr(&hir::Expr {
node: hir::ExprClosure(_, ref _decl, id, span, _),
..
}) => {
(self.tcx.sess.codemap().def_span(span), self.tcx.hir.body(id).arguments.iter()
.map(|arg| {
if let hir::Pat {
node: hir::PatKind::Tuple(args, _),
span,
..
} = arg.pat.clone().into_inner() {
ArgKind::Tuple(
Some(span),
args.iter().map(|pat| {
let snippet = self.tcx.sess.codemap()
.span_to_snippet(pat.span).unwrap();
(snippet, "_".to_owned())
}).collect::<Vec<_>>(),
)
} else {
let name = self.tcx.sess.codemap()
.span_to_snippet(arg.pat.span).unwrap();
ArgKind::Arg(name, "_".to_owned())
}
})
.collect::<Vec<ArgKind>>())
}
hir::map::NodeItem(&hir::Item {
span,
node: hir::ItemFn(ref decl, ..),
..
}) |
hir::map::NodeImplItem(&hir::ImplItem {
span,
node: hir::ImplItemKind::Method(hir::MethodSig { ref decl, .. }, _),
..
}) |
hir::map::NodeTraitItem(&hir::TraitItem {
span,
node: hir::TraitItemKind::Method(hir::MethodSig { ref decl, .. }, _),
..
}) => {
(self.tcx.sess.codemap().def_span(span), decl.inputs.iter()
.map(|arg| match arg.clone().into_inner().node {
hir::TyTup(ref tys) => ArgKind::Tuple(
Some(arg.span),
tys.iter()
.map(|_| ("_".to_owned(), "_".to_owned()))
.collect::<Vec<_>>(),
),
_ => ArgKind::Arg("_".to_owned(), "_".to_owned())
}).collect::<Vec<ArgKind>>())
}
hir::map::NodeVariant(&hir::Variant {
span,
node: hir::Variant_ {
data: hir::VariantData::Tuple(ref fields, _),
..
},
..
}) => {
(self.tcx.sess.codemap().def_span(span),
fields.iter().map(|field| {
ArgKind::Arg(format!("{}", field.ident), "_".to_string())
}).collect::<Vec<_>>())
}
hir::map::NodeStructCtor(ref variant_data) => {
(self.tcx.sess.codemap().def_span(self.tcx.hir.span(variant_data.id())),
variant_data.fields()
.iter().map(|_| ArgKind::Arg("_".to_owned(), "_".to_owned()))
.collect())
}
_ => panic!("non-FnLike node found: {:?}", node),
}
}
/// Reports an error when the number of arguments needed by a
/// trait match doesn't match the number that the expression
/// provides.
pub fn report_arg_count_mismatch(
&self,
span: Span,
found_span: Option<Span>,
expected_args: Vec<ArgKind>,
found_args: Vec<ArgKind>,
is_closure: bool,
) -> DiagnosticBuilder<'tcx> {
let kind = if is_closure { "closure" } else { "function" };
let args_str = |arguments: &Vec<ArgKind>, other: &Vec<ArgKind>| {
let arg_length = arguments.len();
let distinct = match &other[..] {
&[ArgKind::Tuple(..)] => true,
_ => false,
};
match (arg_length, arguments.get(0)) {
(1, Some(&ArgKind::Tuple(_, ref fields))) => {
format!("a single {}-tuple as argument", fields.len())
}
_ => format!("{} {}argument{}",
arg_length,
if distinct && arg_length > 1 { "distinct " } else { "" },
if arg_length == 1 { "" } else { "s" }),
}
};
let expected_str = args_str(&expected_args, &found_args);
let found_str = args_str(&found_args, &expected_args);
let mut err = struct_span_err!(
self.tcx.sess,
span,
E0593,
"{} is expected to take {}, but it takes {}",
kind,
expected_str,
found_str,
);
err.span_label(span, format!( "expected {} that takes {}", kind, expected_str));
if let Some(found_span) = found_span {
err.span_label(found_span, format!("takes {}", found_str));
if let &[ArgKind::Tuple(_, ref fields)] = &found_args[..] {
if fields.len() == expected_args.len() {
let sugg = fields.iter()
.map(|(name, _)| name.to_owned())
.collect::<Vec<String>>().join(", ");
err.span_suggestion_with_applicability(found_span,
"change the closure to take multiple \
arguments instead of a single tuple",
format!("|{}|", sugg),
Applicability::MachineApplicable);
}
}
if let &[ArgKind::Tuple(_, ref fields)] = &expected_args[..] {
if fields.len() == found_args.len() && is_closure {
let sugg = format!(
"|({}){}|",
found_args.iter()
.map(|arg| match arg {
ArgKind::Arg(name, _) => name.to_owned(),
_ => "_".to_owned(),
})
.collect::<Vec<String>>()
.join(", "),
// add type annotations if available
if found_args.iter().any(|arg| match arg {
ArgKind::Arg(_, ty) => ty != "_",
_ => false,
}) {
format!(": ({})",
fields.iter()
.map(|(_, ty)| ty.to_owned())
.collect::<Vec<String>>()
.join(", "))
} else {
"".to_owned()
},
);
err.span_suggestion_with_applicability(
found_span,
"change the closure to accept a tuple instead of \
individual arguments",
sugg,
Applicability::MachineApplicable
);
}
}
}
err
}
fn report_closure_arg_mismatch(&self,
span: Span,
found_span: Option<Span>,
expected_ref: ty::PolyTraitRef<'tcx>,
found: ty::PolyTraitRef<'tcx>)
-> DiagnosticBuilder<'tcx>
{
fn build_fn_sig_string<'a, 'gcx, 'tcx>(tcx: ty::TyCtxt<'a, 'gcx, 'tcx>,
trait_ref: &ty::TraitRef<'tcx>) -> String {
let inputs = trait_ref.substs.type_at(1);
let sig = if let ty::TyTuple(inputs) = inputs.sty {
tcx.mk_fn_sig(
inputs.iter().map(|&x| x),
tcx.mk_infer(ty::TyVar(ty::TyVid { index: 0 })),
false,
hir::Unsafety::Normal,
::rustc_target::spec::abi::Abi::Rust
)
} else {
tcx.mk_fn_sig(
::std::iter::once(inputs),
tcx.mk_infer(ty::TyVar(ty::TyVid { index: 0 })),
false,
hir::Unsafety::Normal,
::rustc_target::spec::abi::Abi::Rust
)
};
format!("{}", ty::Binder::bind(sig))
}
let argument_is_closure = expected_ref.skip_binder().substs.type_at(0).is_closure();
let mut err = struct_span_err!(self.tcx.sess, span, E0631,
"type mismatch in {} arguments",
if argument_is_closure { "closure" } else { "function" });
let found_str = format!(
"expected signature of `{}`",
build_fn_sig_string(self.tcx, found.skip_binder())
);
err.span_label(span, found_str);
let found_span = found_span.unwrap_or(span);
let expected_str = format!(
"found signature of `{}`",
build_fn_sig_string(self.tcx, expected_ref.skip_binder())
);
err.span_label(found_span, expected_str);
err
}
}
impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
pub fn recursive_type_with_infinite_size_error(self,
type_def_id: DefId)
-> DiagnosticBuilder<'tcx>
{
assert!(type_def_id.is_local());
let span = self.hir.span_if_local(type_def_id).unwrap();
let span = self.sess.codemap().def_span(span);
let mut err = struct_span_err!(self.sess, span, E0072,
"recursive type `{}` has infinite size",
self.item_path_str(type_def_id));
err.span_label(span, "recursive type has infinite size");
err.help(&format!("insert indirection (e.g., a `Box`, `Rc`, or `&`) \
at some point to make `{}` representable",
self.item_path_str(type_def_id)));
err
}
pub fn report_object_safety_error(self,
span: Span,
trait_def_id: DefId,
violations: Vec<ObjectSafetyViolation>)
-> DiagnosticBuilder<'tcx>
{
let trait_str = self.item_path_str(trait_def_id);
let span = self.sess.codemap().def_span(span);
let mut err = struct_span_err!(
self.sess, span, E0038,
"the trait `{}` cannot be made into an object",
trait_str);
err.span_label(span, format!("the trait `{}` cannot be made into an object", trait_str));
let mut reported_violations = FxHashSet();
for violation in violations {
if !reported_violations.insert(violation.clone()) {
continue;
}
err.note(&violation.error_msg());
}
err
}
}
impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
fn maybe_report_ambiguity(&self, obligation: &PredicateObligation<'tcx>,
body_id: Option<hir::BodyId>) {
// Unable to successfully determine, probably means
// insufficient type information, but could mean
// ambiguous impls. The latter *ought* to be a
// coherence violation, so we don't report it here.
let predicate = self.resolve_type_vars_if_possible(&obligation.predicate);
let span = obligation.cause.span;
debug!("maybe_report_ambiguity(predicate={:?}, obligation={:?})",
predicate,
obligation);
// Ambiguity errors are often caused as fallout from earlier
// errors. So just ignore them if this infcx is tainted.
if self.is_tainted_by_errors() {
return;
}
match predicate {
ty::Predicate::Trait(ref data) => {
let trait_ref = data.to_poly_trait_ref();
let self_ty = trait_ref.self_ty();
if predicate.references_error() {
return;
}
// Typically, this ambiguity should only happen if
// there are unresolved type inference variables
// (otherwise it would suggest a coherence
// failure). But given #21974 that is not necessarily
// the case -- we can have multiple where clauses that
// are only distinguished by a region, which results
// in an ambiguity even when all types are fully
// known, since we don't dispatch based on region
// relationships.
// This is kind of a hack: it frequently happens that some earlier
// error prevents types from being fully inferred, and then we get
// a bunch of uninteresting errors saying something like "<generic
// #0> doesn't implement Sized". It may even be true that we
// could just skip over all checks where the self-ty is an
// inference variable, but I was afraid that there might be an
// inference variable created, registered as an obligation, and
// then never forced by writeback, and hence by skipping here we'd
// be ignoring the fact that we don't KNOW the type works
// out. Though even that would probably be harmless, given that
// we're only talking about builtin traits, which are known to be
// inhabited. But in any case I just threw in this check for
// has_errors() to be sure that compilation isn't happening
// anyway. In that case, why inundate the user.
if !self.tcx.sess.has_errors() {
if
self.tcx.lang_items().sized_trait()
.map_or(false, |sized_id| sized_id == trait_ref.def_id())
{
self.need_type_info_err(body_id, span, self_ty).emit();
} else {
let mut err = struct_span_err!(self.tcx.sess,
span, E0283,
"type annotations required: \
cannot resolve `{}`",
predicate);
self.note_obligation_cause(&mut err, obligation);
err.emit();
}
}
}
ty::Predicate::WellFormed(ty) => {
// Same hacky approach as above to avoid deluging user
// with error messages.
if !ty.references_error() && !self.tcx.sess.has_errors() {
self.need_type_info_err(body_id, span, ty).emit();
}
}
ty::Predicate::Subtype(ref data) => {
if data.references_error() || self.tcx.sess.has_errors() {
// no need to overload user in such cases
} else {
let &SubtypePredicate { a_is_expected: _, a, b } = data.skip_binder();
// both must be type variables, or the other would've been instantiated
assert!(a.is_ty_var() && b.is_ty_var());
self.need_type_info_err(body_id,
obligation.cause.span,
a).emit();
}
}
_ => {
if !self.tcx.sess.has_errors() {
let mut err = struct_span_err!(self.tcx.sess,
obligation.cause.span, E0284,
"type annotations required: \
cannot resolve `{}`",
predicate);
self.note_obligation_cause(&mut err, obligation);
err.emit();
}
}
}
}
/// Returns whether the trait predicate may apply for *some* assignment
/// to the type parameters.
fn predicate_can_apply(&self,
param_env: ty::ParamEnv<'tcx>,
pred: ty::PolyTraitRef<'tcx>)
-> bool {
struct ParamToVarFolder<'a, 'gcx: 'a+'tcx, 'tcx: 'a> {
infcx: &'a InferCtxt<'a, 'gcx, 'tcx>,
var_map: FxHashMap<Ty<'tcx>, Ty<'tcx>>
}
impl<'a, 'gcx, 'tcx> TypeFolder<'gcx, 'tcx> for ParamToVarFolder<'a, 'gcx, 'tcx> {
fn tcx<'b>(&'b self) -> TyCtxt<'b, 'gcx, 'tcx> { self.infcx.tcx }
fn fold_ty(&mut self, ty: Ty<'tcx>) -> Ty<'tcx> {
if let ty::TyParam(ty::ParamTy {name, ..}) = ty.sty {
let infcx = self.infcx;
self.var_map.entry(ty).or_insert_with(||
infcx.next_ty_var(
TypeVariableOrigin::TypeParameterDefinition(DUMMY_SP, name)))
} else {
ty.super_fold_with(self)
}
}
}
self.probe(|_| {
let mut selcx = SelectionContext::new(self);
let cleaned_pred = pred.fold_with(&mut ParamToVarFolder {
infcx: self,
var_map: FxHashMap()
});
let cleaned_pred = super::project::normalize(
&mut selcx,
param_env,
ObligationCause::dummy(),
&cleaned_pred
).value;
let obligation = Obligation::new(
ObligationCause::dummy(),
param_env,
cleaned_pred.to_predicate()
);
self.predicate_may_hold(&obligation)
})
}
fn note_obligation_cause<T>(&self,
err: &mut DiagnosticBuilder,
obligation: &Obligation<'tcx, T>)
where T: fmt::Display
{
self.note_obligation_cause_code(err,
&obligation.predicate,
&obligation.cause.code,
&mut vec![]);
}
fn note_obligation_cause_code<T>(&self,
err: &mut DiagnosticBuilder,
predicate: &T,
cause_code: &ObligationCauseCode<'tcx>,
obligated_types: &mut Vec<&ty::TyS<'tcx>>)
where T: fmt::Display
{
let tcx = self.tcx;
match *cause_code {
ObligationCauseCode::ExprAssignable |
ObligationCauseCode::MatchExpressionArm { .. } |
ObligationCauseCode::IfExpression |
ObligationCauseCode::IfExpressionWithNoElse |
ObligationCauseCode::MainFunctionType |
ObligationCauseCode::StartFunctionType |
ObligationCauseCode::IntrinsicType |
ObligationCauseCode::MethodReceiver |
ObligationCauseCode::ReturnNoExpression |
ObligationCauseCode::MiscObligation => {
}
ObligationCauseCode::SliceOrArrayElem => {
err.note("slice and array elements must have `Sized` type");
}
ObligationCauseCode::TupleElem => {
err.note("only the last element of a tuple may have a dynamically sized type");
}
ObligationCauseCode::ProjectionWf(data) => {
err.note(&format!("required so that the projection `{}` is well-formed",
data));
}
ObligationCauseCode::ReferenceOutlivesReferent(ref_ty) => {
err.note(&format!("required so that reference `{}` does not outlive its referent",
ref_ty));
}
ObligationCauseCode::ObjectTypeBound(object_ty, region) => {
err.note(&format!("required so that the lifetime bound of `{}` for `{}` \
is satisfied",
region, object_ty));
}
ObligationCauseCode::ItemObligation(item_def_id) => {
let item_name = tcx.item_path_str(item_def_id);
let msg = format!("required by `{}`", item_name);
if let Some(sp) = tcx.hir.span_if_local(item_def_id) {
let sp = tcx.sess.codemap().def_span(sp);
err.span_note(sp, &msg);
} else {
err.note(&msg);
}
}
ObligationCauseCode::ObjectCastObligation(object_ty) => {
err.note(&format!("required for the cast to the object type `{}`",
self.ty_to_string(object_ty)));
}
ObligationCauseCode::RepeatVec => {
err.note("the `Copy` trait is required because the \
repeated element will be copied");
}
ObligationCauseCode::VariableType(_) => {
err.note("all local variables must have a statically known size");
}
ObligationCauseCode::SizedReturnType => {
err.note("the return type of a function must have a \
statically known size");
}
ObligationCauseCode::SizedYieldType => {
err.note("the yield type of a generator must have a \
statically known size");
}
ObligationCauseCode::AssignmentLhsSized => {
err.note("the left-hand-side of an assignment must have a statically known size");
}
ObligationCauseCode::TupleInitializerSized => {
err.note("tuples must have a statically known size to be initialized");
}
ObligationCauseCode::StructInitializerSized => {
err.note("structs must have a statically known size to be initialized");
}
ObligationCauseCode::FieldSized(ref item) => {
match *item {
AdtKind::Struct => {
err.note("only the last field of a struct may have a dynamically \
sized type");
}
AdtKind::Union => {
err.note("no field of a union may have a dynamically sized type");
}
AdtKind::Enum => {
err.note("no field of an enum variant may have a dynamically sized type");
}
}
}
ObligationCauseCode::ConstSized => {
err.note("constant expressions must have a statically known size");
}
ObligationCauseCode::SharedStatic => {
err.note("shared static variables must have a type that implements `Sync`");
}
ObligationCauseCode::BuiltinDerivedObligation(ref data) => {
let parent_trait_ref = self.resolve_type_vars_if_possible(&data.parent_trait_ref);
let ty = parent_trait_ref.skip_binder().self_ty();
err.note(&format!("required because it appears within the type `{}`", ty));
obligated_types.push(ty);
let parent_predicate = parent_trait_ref.to_predicate();
if !self.is_recursive_obligation(obligated_types, &data.parent_code) {
self.note_obligation_cause_code(err,
&parent_predicate,
&data.parent_code,
obligated_types);
}
}
ObligationCauseCode::ImplDerivedObligation(ref data) => {
let parent_trait_ref = self.resolve_type_vars_if_possible(&data.parent_trait_ref);
err.note(
&format!("required because of the requirements on the impl of `{}` for `{}`",
parent_trait_ref,
parent_trait_ref.skip_binder().self_ty()));
let parent_predicate = parent_trait_ref.to_predicate();
self.note_obligation_cause_code(err,
&parent_predicate,
&data.parent_code,
obligated_types);
}
ObligationCauseCode::CompareImplMethodObligation { .. } => {
err.note(
&format!("the requirement `{}` appears on the impl method \
but not on the corresponding trait method",
predicate));
}
ObligationCauseCode::ReturnType(_) |
ObligationCauseCode::BlockTailExpression(_) => (),
ObligationCauseCode::TrivialBound => {
err.help("see issue #48214");
if tcx.sess.opts.unstable_features.is_nightly_build() {
err.help("add #![feature(trivial_bounds)] to the \
crate attributes to enable",
);
}
}
}
}
fn suggest_new_overflow_limit(&self, err: &mut DiagnosticBuilder) {
let current_limit = self.tcx.sess.recursion_limit.get();
let suggested_limit = current_limit * 2;
err.help(&format!("consider adding a `#![recursion_limit=\"{}\"]` attribute to your crate",
suggested_limit));
}
fn is_recursive_obligation(&self,
obligated_types: &mut Vec<&ty::TyS<'tcx>>,
cause_code: &ObligationCauseCode<'tcx>) -> bool {
if let ObligationCauseCode::BuiltinDerivedObligation(ref data) = cause_code {
let parent_trait_ref = self.resolve_type_vars_if_possible(&data.parent_trait_ref);
for obligated_type in obligated_types {
if obligated_type == &parent_trait_ref.skip_binder().self_ty() {
return true;
}
}
}
return false;
}
}
/// Summarizes information
pub enum ArgKind {
/// An argument of non-tuple type. Parameters are (name, ty)
Arg(String, String),
/// An argument of tuple type. For a "found" argument, the span is
/// the locationo in the source of the pattern. For a "expected"
/// argument, it will be None. The vector is a list of (name, ty)
/// strings for the components of the tuple.
Tuple(Option<Span>, Vec<(String, String)>),
}
impl ArgKind {
fn empty() -> ArgKind {
ArgKind::Arg("_".to_owned(), "_".to_owned())
}
/// Creates an `ArgKind` from the expected type of an
/// argument. This has no name (`_`) and no source spans..
pub fn from_expected_ty(t: Ty<'_>) -> ArgKind {
match t.sty {
ty::TyTuple(ref tys) => ArgKind::Tuple(
None,
tys.iter()
.map(|ty| ("_".to_owned(), format!("{}", ty.sty)))
.collect::<Vec<_>>()
),
_ => ArgKind::Arg("_".to_owned(), format!("{}", t.sty)),
}
}
}
| {
#[derive(Debug)]
struct ErrorDescriptor<'tcx> {
predicate: ty::Predicate<'tcx>,
index: Option<usize>, // None if this is an old error
}
let mut error_map : FxHashMap<_, _> =
self.reported_trait_errors.borrow().iter().map(|(&span, predicates)| {
(span, predicates.iter().map(|predicate| ErrorDescriptor {
predicate: predicate.clone(),
index: None
}).collect())
}).collect();
for (index, error) in errors.iter().enumerate() {
error_map.entry(error.obligation.cause.span).or_insert(Vec::new()).push(
ErrorDescriptor {
predicate: error.obligation.predicate.clone(),
index: Some(index)
});
self.reported_trait_errors.borrow_mut()
.entry(error.obligation.cause.span).or_insert(Vec::new())
.push(error.obligation.predicate.clone());
}
// We do this in 2 passes because we want to display errors in order, tho
// maybe it *is* better to sort errors by span or something.
let mut is_suppressed: Vec<bool> = errors.iter().map(|_| false).collect();
for (_, error_set) in error_map.iter() {
// We want to suppress "duplicate" errors with the same span.
for error in error_set {
if let Some(index) = error.index {
// Suppress errors that are either:
// 1) strictly implied by another error.
// 2) implied by an error with a smaller index.
for error2 in error_set {
if error2.index.map_or(false, |index2| is_suppressed[index2]) {
// Avoid errors being suppressed by already-suppressed
// errors, to prevent all errors from being suppressed
// at once.
continue
}
if self.error_implies(&error2.predicate, &error.predicate) &&
!(error2.index >= error.index &&
self.error_implies(&error.predicate, &error2.predicate))
{
info!("skipping {:?} (implied by {:?})", error, error2);
is_suppressed[index] = true;
break
}
}
}
}
}
for (error, suppressed) in errors.iter().zip(is_suppressed) {
if !suppressed {
self.report_fulfillment_error(error, body_id, fallback_has_occurred);
}
}
} |
setup.py | from distutils.core import setup
setup( name = 'weekdate',
version = '0.1',
author = 'Kenneth P. J. Dyer',
author_email = '[email protected]',
url = 'https://github.com/kennethpjdyer/weekdate', | description = 'Basic utility for determining start and end dates for a given week.',
scripts = ['scripts/weekdate']
) | |
toolbar.component.ts | import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-toolbar',
templateUrl: 'toolbar.component.html',
})
export class | implements OnInit {
constructor() { }
ngOnInit() {
}
}
| ToolbarComponent |
params_test.py | import json
import os
import re
from collections import OrderedDict
import pytest
from allennlp.common.checks import ConfigurationError
from allennlp.common.params import infer_and_cast, Params, parse_overrides, unflatten, with_fallback
from allennlp.common.testing import AllenNlpTestCase
class TestParams(AllenNlpTestCase):
def | (self):
filename = self.FIXTURES_ROOT / "simple_tagger" / "experiment.json"
params = Params.from_file(filename)
assert "dataset_reader" in params
assert "trainer" in params
model_params = params.pop("model")
assert model_params.pop("type") == "simple_tagger"
def test_replace_none(self):
params = Params({"a": "None", "b": [1.0, "None", 2], "c": {"d": "None"}})
assert params["a"] is None
assert params["b"][1] is None
assert params["c"]["d"] is None
def test_bad_unicode_environment_variables(self):
filename = self.FIXTURES_ROOT / "simple_tagger" / "experiment.json"
os.environ["BAD_ENVIRONMENT_VARIABLE"] = "\udce2"
Params.from_file(filename)
del os.environ["BAD_ENVIRONMENT_VARIABLE"]
def test_overrides(self):
filename = self.FIXTURES_ROOT / "simple_tagger" / "experiment.json"
overrides = (
'{ "train_data_path": "FOO", "model": { "type": "BAR" },'
'"model.text_field_embedder.tokens.type": "BAZ",'
'"iterator.sorting_keys.0.0": "question"}'
)
params = Params.from_file(filename, overrides)
assert "dataset_reader" in params
assert "trainer" in params
assert params["train_data_path"] == "FOO"
assert params["iterator"]["sorting_keys"][0][0] == "question"
model_params = params.pop("model")
assert model_params.pop("type") == "BAR"
assert model_params["text_field_embedder"]["tokens"]["type"] == "BAZ"
def test_unflatten(self):
flattened = {"a.b.c": 1, "a.b.d": 0, "a.e.f.g.h": 2, "b": 3}
unflattened = unflatten(flattened)
assert unflattened == {"a": {"b": {"c": 1, "d": 0}, "e": {"f": {"g": {"h": 2}}}}, "b": 3}
# should do nothing to a non-flat dictionary
assert unflatten(unflattened) == unflattened
def test_with_fallback(self):
preferred = {"a": 1}
fallback = {"a": 0, "b": 2}
merged = with_fallback(preferred=preferred, fallback=fallback)
assert merged == {"a": 1, "b": 2}
# incompatibility is ok
preferred = {"a": {"c": 3}}
fallback = {"a": 0, "b": 2}
merged = with_fallback(preferred=preferred, fallback=fallback)
assert merged == {"a": {"c": 3}, "b": 2}
# goes deep
preferred = {"deep": {"a": 1}}
fallback = {"deep": {"a": 0, "b": 2}}
merged = with_fallback(preferred=preferred, fallback=fallback)
assert merged == {"deep": {"a": 1, "b": 2}}
def test_parse_overrides(self):
assert parse_overrides("") == {}
assert parse_overrides("{}") == {}
override_dict = parse_overrides('{"train_data": "/train", "trainer.num_epochs": 10}')
assert override_dict == {"train_data": "/train", "trainer": {"num_epochs": 10}}
params = with_fallback(
preferred=override_dict,
fallback={
"train_data": "/test",
"model": "simple_tagger",
"trainer": {"num_epochs": 100, "optimizer": "sgd"},
},
)
assert params == {
"train_data": "/train",
"model": "simple_tagger",
"trainer": {"num_epochs": 10, "optimizer": "sgd"},
}
def test_as_flat_dict(self):
params = Params({"a": 10, "b": {"c": 20, "d": "stuff"}}).as_flat_dict()
assert params == {"a": 10, "b.c": 20, "b.d": "stuff"}
def test_jsonnet_features(self):
config_file = self.TEST_DIR / "config.jsonnet"
with open(config_file, "w") as f:
f.write(
"""{
// This example is copied straight from the jsonnet docs
person1: {
name: "Alice",
welcome: "Hello " + self.name + "!",
},
person2: self.person1 { name: "Bob" },
}"""
)
params = Params.from_file(config_file)
alice = params.pop("person1")
bob = params.pop("person2")
assert alice.as_dict() == {"name": "Alice", "welcome": "Hello Alice!"}
assert bob.as_dict() == {"name": "Bob", "welcome": "Hello Bob!"}
params.assert_empty("TestParams")
def test_regexes_with_backslashes(self):
bad_regex = self.TEST_DIR / "bad_regex.jsonnet"
good_regex = self.TEST_DIR / "good_regex.jsonnet"
with open(bad_regex, "w") as f:
f.write(r'{"myRegex": "a\.b"}')
with open(good_regex, "w") as f:
f.write(r'{"myRegex": "a\\.b"}')
with pytest.raises(RuntimeError):
Params.from_file(bad_regex)
params = Params.from_file(good_regex)
regex = params["myRegex"]
assert re.match(regex, "a.b")
assert not re.match(regex, "a-b")
# Check roundtripping
good_regex2 = self.TEST_DIR / "good_regex2.jsonnet"
with open(good_regex2, "w") as f:
f.write(json.dumps(params.as_dict()))
params2 = Params.from_file(good_regex2)
assert params.as_dict() == params2.as_dict()
def test_env_var_substitution(self):
substitutor = self.TEST_DIR / "substitutor.jsonnet"
key = "TEST_ENV_VAR_SUBSTITUTION"
assert os.environ.get(key) is None
with open(substitutor, "w") as f:
f.write(f'{{"path": std.extVar("{key}")}}')
# raises without environment variable set
with pytest.raises(RuntimeError):
Params.from_file(substitutor)
os.environ[key] = "PERFECT"
params = Params.from_file(substitutor)
assert params["path"] == "PERFECT"
del os.environ[key]
@pytest.mark.xfail(
not os.path.exists(AllenNlpTestCase.PROJECT_ROOT / "training_config"),
reason="Training configs not installed with pip",
)
def test_known_configs(self):
configs = os.listdir(self.PROJECT_ROOT / "training_config")
# Our configs use environment variable substitution, and the _jsonnet parser
# will fail if we don't pass it correct environment variables.
forced_variables = [
# constituency parser
"PTB_TRAIN_PATH",
"PTB_DEV_PATH",
"PTB_TEST_PATH",
# dependency parser
"PTB_DEPENDENCIES_TRAIN",
"PTB_DEPENDENCIES_VAL",
# multilingual dependency parser
"TRAIN_PATHNAME",
"DEV_PATHNAME",
"TEST_PATHNAME",
# srl_elmo_5.5B
"SRL_TRAIN_DATA_PATH",
"SRL_VALIDATION_DATA_PATH",
# coref
"COREF_TRAIN_DATA_PATH",
"COREF_DEV_DATA_PATH",
"COREF_TEST_DATA_PATH",
# ner
"NER_TRAIN_DATA_PATH",
"NER_TEST_A_PATH",
"NER_TEST_B_PATH",
# bidirectional lm
"BIDIRECTIONAL_LM_TRAIN_PATH",
"BIDIRECTIONAL_LM_VOCAB_PATH",
"BIDIRECTIONAL_LM_ARCHIVE_PATH",
]
for var in forced_variables:
os.environ[var] = os.environ.get(var) or str(self.TEST_DIR)
for config in configs:
try:
Params.from_file(self.PROJECT_ROOT / "training_config" / config)
except Exception as e:
raise AssertionError(f"unable to load params for {config}, because {e}")
for var in forced_variables:
if os.environ[var] == str(self.TEST_DIR):
del os.environ[var]
def test_as_ordered_dict(self):
# keyD > keyC > keyE; keyDA > keyDB; Next all other keys alphabetically
preference_orders = [["keyD", "keyC", "keyE"], ["keyDA", "keyDB"]]
params = Params(
{
"keyC": "valC",
"keyB": "valB",
"keyA": "valA",
"keyE": "valE",
"keyD": {"keyDB": "valDB", "keyDA": "valDA"},
}
)
ordered_params_dict = params.as_ordered_dict(preference_orders)
expected_ordered_params_dict = OrderedDict(
{
"keyD": {"keyDA": "valDA", "keyDB": "valDB"},
"keyC": "valC",
"keyE": "valE",
"keyA": "valA",
"keyB": "valB",
}
)
assert json.dumps(ordered_params_dict) == json.dumps(expected_ordered_params_dict)
def test_to_file(self):
# Test to_file works with or without preference orders
params_dict = {"keyA": "valA", "keyB": "valB"}
expected_ordered_params_dict = OrderedDict({"keyB": "valB", "keyA": "valA"})
params = Params(params_dict)
file_path = self.TEST_DIR / "config.jsonnet"
# check with preference orders
params.to_file(file_path, [["keyB", "keyA"]])
with open(file_path, "r") as handle:
ordered_params_dict = OrderedDict(json.load(handle))
assert json.dumps(expected_ordered_params_dict) == json.dumps(ordered_params_dict)
# check without preference orders doesn't give error
params.to_file(file_path)
def test_infer_and_cast(self):
lots_of_strings = {
"a": ["10", "1.3", "true"],
"b": {"x": 10, "y": "20.1", "z": "other things"},
"c": "just a string",
}
casted = {
"a": [10, 1.3, True],
"b": {"x": 10, "y": 20.1, "z": "other things"},
"c": "just a string",
}
assert infer_and_cast(lots_of_strings) == casted
contains_bad_data = {"x": 10, "y": int}
with pytest.raises(ValueError, match="cannot infer type"):
infer_and_cast(contains_bad_data)
params = Params(lots_of_strings)
assert params.as_dict() == lots_of_strings
assert params.as_dict(infer_type_and_cast=True) == casted
def test_pop_choice(self):
choices = ["my_model", "other_model"]
params = Params({"model": "my_model"})
assert params.pop_choice("model", choices) == "my_model"
params = Params({"model": "non_existent_model"})
with pytest.raises(ConfigurationError):
params.pop_choice("model", choices)
params = Params({"model": "module.submodule.ModelName"})
assert params.pop_choice("model", "choices") == "module.submodule.ModelName"
params = Params({"model": "module.submodule.ModelName"})
with pytest.raises(ConfigurationError):
params.pop_choice("model", choices, allow_class_names=False)
| test_load_from_file |
simplessh-example.go | package main
import (
"github.com/zish/simplessh"
"log" | "encoding/json"
)
type input struct {
Opts *simplessh.Opts
Commands []*simplessh.Command
}
func main () {
log.SetFlags(log.Lshortfile)
log.SetFlags(log.Ltime)
var (
errs []error
err error
inputFile string
inputJson []byte
inputData *input
sshClient *simplessh.Client
output string
)
if len(os.Args) < 2 {
log.Fatal("Please specify an input JSON file.")
}
inputFile = os.Args[1]
if inputJson, err = ioutil.ReadFile(inputFile); err != nil {
log.Fatal(err)
}
if err = json.Unmarshal(inputJson, &inputData); err != nil {
log.Fatal(err)
}
if sshClient, err = simplessh.New(inputData.Opts); err != nil {
log.Printf("Error creating new SSH Client: %e\n", err)
} else {
log.Printf("%s\n", "SSH Client created successfully")
}
log.Printf("%s\n", "SSH Client Start Connect To Host...")
if err = sshClient.Connect(); err != nil {
log.Printf("SSH Client Error Connecting: %q\n", err)
} else {
log.Printf("%s\n", "SSH Client Successfully Connected")
}
for _, command := range inputData.Commands {
if output, errs = sshClient.RunCommand(command); len(errs) > 0 {
log.Printf("command: ERROR(S): %q\n", errs)
}
log.Println("command output:\n"+output)
}
if err = sshClient.Disconnect(); err != nil {
log.Printf("Error disconnecting from SSH Session: %q\n", err)
}
} | "os"
"io/ioutil" |
start.go | package main
import (
"fmt"
redigo "github.com/gomodule/redigo/redis"
"github.com/ssgo/config"
"github.com/ssgo/discover"
"github.com/ssgo/log"
"github.com/ssgo/redis"
"github.com/ssgo/s"
"github.com/ssgo/standard"
"github.com/ssgo/u"
"net/http"
"regexp"
"strings"
"sync"
"time"
)
var redisPool *redis.Redis
var pubsubRedisPool *redis.Redis
var updateLock = sync.Mutex{}
type regexProxiesInfo struct {
Value string
Regex regexp.Regexp
}
type regexRewriteInfo struct {
To string
Regex regexp.Regexp
}
var _proxies = map[string]string{}
var _regexProxies = map[string]*regexProxiesInfo{}
var _regexRewrites = map[string]*regexRewriteInfo{}
var gatewayConfig = struct {
CheckInterval int
Proxies map[string]string
Rewrites map[string]string
Prefix string
CallTimeout config.Duration
}{}
var logger = log.New(u.ShortUniqueId())
var proxiesKey = "_proxies"
var proxiesChannel = "_CH_proxies"
var rewritesKey = "_rewrites"
var rewritesChannel = "_CH_rewrites"
func logInfo(info string, extra ...interface{}) {
logger.Info("Gateway: "+info, extra...)
}
func logError(error string, extra ...interface{}) {
logger.Error("Gateway: "+error, extra...)
}
func main() {
discover.Init()
s.Init()
redisPool = redis.GetRedis(discover.Config.Registry, logger)
confForPubSub := *redisPool.Config
confForPubSub.IdleTimeout = -1
confForPubSub.ReadTimeout = -1
pubsubRedisPool = redis.NewRedis(&confForPubSub, logger)
config.LoadConfig("gateway", &gatewayConfig)
if gatewayConfig.CheckInterval == 0 {
gatewayConfig.CheckInterval = 10
} else if gatewayConfig.CheckInterval < 3 {
gatewayConfig.CheckInterval = 3
}
if gatewayConfig.CallTimeout == 0 {
gatewayConfig.CallTimeout = config.Duration(10 * time.Second)
}
if gatewayConfig.Prefix != "" {
proxiesKey = fmt.Sprint("_", gatewayConfig.Prefix, "proxies")
proxiesChannel = fmt.Sprint("_CH_", gatewayConfig.Prefix, "proxies")
rewritesKey = fmt.Sprint("_", gatewayConfig.Prefix, "rewrites")
rewritesChannel = fmt.Sprint("_CH_", gatewayConfig.Prefix, "rewrites")
}
s.SetRewriteBy(rewrite)
s.SetProxyBy(proxy)
as := s.AsyncStart()
syncProxies()
syncRewrites()
go subscribe()
for {
for i := 0; i < gatewayConfig.CheckInterval; i++ {
time.Sleep(time.Second * 1)
if !s.IsRunning() {
break
}
}
syncProxies()
syncRewrites()
if !s.IsRunning() {
break
}
}
as.Stop()
}
func rewrite(request *http.Request) (toPath string, rewrite bool) {
if len(_regexRewrites) > 0 {
requestUrl := fmt.Sprint(request.Header.Get("X-Scheme"), "://", request.Host, request.RequestURI)
requestUrlWithoutScheme := fmt.Sprint(request.Host, request.RequestURI)
for _, rr := range _regexRewrites {
finds := rr.Regex.FindAllStringSubmatch(requestUrl, 20)
if len(finds) == 0 {
finds = rr.Regex.FindAllStringSubmatch(requestUrlWithoutScheme, 20)
}
if len(finds) == 0 {
continue
}
to := rr.To
if len(finds[0]) > 1 {
for i := 1; i < len(finds[0]); i++ {
varName := fmt.Sprintf("$%d", i)
to = strings.ReplaceAll(to, varName, finds[0][i])
}
return to, true
}
}
}
// 不进行代理
return "", false
}
func proxy(request *http.Request) (authLevel int, toApp, toPath *string, headers map[string]string) {
outHeaders := map[string]string{
standard.DiscoverHeaderFromApp: "gateway",
standard.DiscoverHeaderFromNode: s.GetServerAddr(),
}
scheme := u.StringIf(request.TLS == nil, "http", "https")
host1 := ""
host2 := ""
if strings.ContainsRune(request.Host, ':') {
hostArr := strings.SplitN(request.Host, ":", 2)
host1 = hostArr[0]
host2 = request.Host
} else {
host1 = request.Host
host2 = request.Host + ":" + u.StringIf(request.TLS == nil, "80", "443")
}
pathMatchers := make([]string, 0)
pathMatchers = append(pathMatchers, fmt.Sprint(scheme, "://", host1, request.RequestURI))
pathMatchers = append(pathMatchers, fmt.Sprint(scheme, "://", host2, request.RequestURI))
pathMatchers = append(pathMatchers, fmt.Sprint(host1, request.RequestURI))
pathMatchers = append(pathMatchers, fmt.Sprint(host2, request.RequestURI))
pathMatchers = append(pathMatchers, request.RequestURI)
hostMatchers := make([]string, 0)
hostMatchers = append(hostMatchers, fmt.Sprint(scheme, "://", host1))
hostMatchers = append(hostMatchers, fmt.Sprint(scheme, "://", host2))
hostMatchers = append(hostMatchers, host1)
hostMatchers = append(hostMatchers, host2)
for p, a := range _proxies {
matchPath := ""
matchPathArr := strings.SplitN(strings.ReplaceAll(p, "://", ""), "/", 2)
if len(matchPathArr) == 2 {
matchPath = "/" + matchPathArr[1]
}
if matchPath == "" {
for _, m := range hostMatchers {
if m == p {
//fmt.Println(" >>>>>>>>1", p, m, request.RequestURI)
return 0, fixAppName(a), &request.RequestURI, outHeaders
}
}
} else {
for _, m := range pathMatchers {
if strings.HasPrefix(m, p) {
if strings.HasPrefix(request.RequestURI, matchPath) {
p2 := request.RequestURI[len(matchPath):]
if len(p2) == 0 || p2[0] != '/' {
p2 = "/" + p2
}
//fmt.Println(" >>>>>>>>2", p, m, p2)
return 0, fixAppName(a), &p2, outHeaders
} else {
//fmt.Println(" >>>>>>>>3", p, m, request.RequestURI)
return 0, fixAppName(a), &request.RequestURI, outHeaders
}
}
}
}
}
//// 匹配二级目录
//paths := strings.SplitN(request.RequestURI, "/", 4)
//if len(paths) == 4 {
// p1 := "/" + paths[1] + "/" + paths[2]
// p2 := "/" + paths[3]
//
// // Host + Path 匹配
// a := _proxies[request.Host+p1]
// if a != "" {
// outHeaders["Proxy-Path"] = p1
// return fixAppName(a), &p2, outHeaders
// }
//
// // Path 匹配
// a = _proxies[p1]
// if a != "" {
// outHeaders["Proxy-Path"] = p1
// return fixAppName(a), &p2, outHeaders
// }
//}
//
//// 匹配一级目录
//paths = strings.SplitN(request.RequestURI, "/", 3)
//if len(paths) == 3 {
// p1 := "/" + paths[1]
// p2 := "/" + paths[2]
//
// // Host + Path 匹配
// a := _proxies[request.Host+p1]
// if a != "" {
// outHeaders["Proxy-Path"] = p1
// return fixAppName(a), &p2, outHeaders
// }
//
// // Path 匹配
// a = _proxies[p1]
// if a != "" {
// outHeaders["Proxy-Path"] = p1
// return fixAppName(a), &p2, outHeaders
// }
//}
//// 匹配 Host
//a := _proxies[request.Host]
//if a != "" {
// return fixAppName(a), &request.RequestURI, outHeaders
//}
// 模糊匹配
if len(_regexProxies) > 0 {
requestUrl := request.Host + request.RequestURI
for _, rp := range _regexProxies {
finds := rp.Regex.FindAllStringSubmatch(requestUrl, 20)
if len(finds) > 0 && len(finds[0]) > 2 {
pos := strings.Index(request.RequestURI, finds[0][2])
if pos > 0 {
outHeaders["Proxy-Path"] = request.RequestURI[0:pos]
}
if !strings.Contains(finds[0][1], "://") && strings.ContainsRune(finds[0][1], ':') {
callConfig := ""
if strings.ContainsRune(finds[0][1], ':') {
// support call config in proxy value
a := strings.SplitN(finds[0][1], ":", 2)
finds[0][1] = a[0]
callConfig = a[1]
} else {
callConfig = u.String(gatewayConfig.CallTimeout.TimeDuration())
}
if discover.AddExternalApp(finds[0][1], callConfig) {
discover.Restart()
}
}
return 0, &finds[0][1], &finds[0][2], outHeaders
}
}
}
// 不进行代理
return
}
func fixAppName(appName string) *string {
if !strings.Contains(appName, "://") && strings.ContainsRune(appName, ':') {
a := strings.SplitN(appName, ":", 2)
return &a[0]
} else {
return &appName
}
}
func syncProxies() {
proxies := map[string]string{}
regexProxies := map[string]*regexProx |
updateRewrites(®exRewrites, gatewayConfig.Rewrites)
updateLock.Lock()
updateRewrites(®exRewrites, redisPool.Do("HGETALL", rewritesKey).StringMap())
updateLock.Unlock()
_regexRewrites = regexRewrites
}
func subscribe() {
for {
syncConn := &redigo.PubSubConn{Conn: pubsubRedisPool.GetConnection()}
err := syncConn.Subscribe(proxiesChannel, rewritesChannel)
if err != nil {
logError(err.Error())
_ = syncConn.Close()
syncConn = nil
time.Sleep(time.Second * 1)
if !s.IsRunning() {
break
}
continue
}
syncProxies()
syncRewrites()
if !s.IsRunning() {
break
}
// 开始接收订阅数据
for {
isErr := false
receiveObj := syncConn.Receive()
switch v := receiveObj.(type) {
case redigo.Message:
logInfo("received subscribe", "message", v)
if v.Channel == proxiesChannel {
syncProxies()
} else if v.Channel == rewritesChannel {
syncRewrites()
}
case redigo.Subscription:
case redigo.Pong:
case error:
if !strings.Contains(v.Error(), "connection closed") {
logError(v.Error())
}
isErr = true
break
}
if isErr {
break
}
if !s.IsRunning() {
break
}
}
if !s.IsRunning() {
break
}
time.Sleep(time.Second * 1)
if !s.IsRunning() {
break
}
}
}
func updateProxies(proxies *map[string]string, regexProxies *map[string]*regexProxiesInfo, in map[string]string) bool {
//logInfo("update", "data", in)
updated := false
for k, v := range in {
if v == _proxies[k] {
(*proxies)[k] = v
continue
}
if _regexProxies[k] != nil && v == _regexProxies[k].Value {
(*regexProxies)[k] = _regexProxies[k]
continue
}
if strings.Contains(v, "(") {
matcher, err := regexp.Compile("^" + v + "$")
if err != nil {
logError("proxy regexp compile failed", "key", k, "value", v)
//log.Print("Proxy Error Compile ", err)
} else {
logInfo(u.StringIf(_regexProxies[k] != nil, "update regexp proxy set", "new regexp proxy set"), "key", k, "value", v)
(*regexProxies)[k] = ®exProxiesInfo{
Value: v,
Regex: *matcher,
}
}
} else {
logInfo(u.StringIf(_proxies[k] != "", "update proxy set", "new proxy set"), "key", k, "value", v)
(*proxies)[k] = v
if !strings.Contains(v, "://") {
if discover.Config.Calls[v] == "" {
callConfig := ""
if strings.ContainsRune(v, ':') {
// support call config in proxy value
a := strings.SplitN(v, ":", 2)
v = a[0]
callConfig = a[1]
} else {
callConfig = u.String(gatewayConfig.CallTimeout.TimeDuration())
}
if discover.AddExternalApp(v, callConfig) {
updated = true
}
}
}
}
}
return updated
}
func updateRewrites(regexRewrites *map[string]*regexRewriteInfo, in map[string]string) {
for k, v := range in {
if _regexRewrites[k] != nil && v == _regexRewrites[k].To {
(*regexRewrites)[k] = _regexRewrites[k]
continue
}
matcher, err := regexp.Compile("^" + k + "$")
if err != nil {
logError("rewrite regexp compile failed", "key", k, "value", v)
} else {
logInfo(u.StringIf(_regexRewrites[k] != nil, "update regexp rewrite set", "new regexp rewrite set"), "key", k, "value", v)
(*regexRewrites)[k] = ®exRewriteInfo{
To: v,
Regex: *matcher,
}
}
}
}
| iesInfo{}
updated1 := updateProxies(&proxies, ®exProxies, gatewayConfig.Proxies)
updateLock.Lock()
updated2 := updateProxies(&proxies, ®exProxies, redisPool.Do("HGETALL", proxiesKey).StringMap())
if updated1 || updated2 {
logInfo("restart discover subscriber")
discover.Restart()
}
updateLock.Unlock()
_proxies = proxies
_regexProxies = regexProxies
}
func syncRewrites() {
regexRewrites := map[string]*regexRewriteInfo{} |
envbuilder.py | #!/usr/bin/env python
import subprocess
from snc_config import SncConfig
from datetime import datetime, timedelta
import argparse
from argparse import RawTextHelpFormatter
from color_print import ColorPrint
from plugins import PluginsLoader
import os
from multiprocessing import Pool
import copy_reg
import types
from itertools import repeat
import time
from functools import partial
from notification_manager import NotificationManager
ENVB_PATH = 'ENVB_PATH'
def _reduce_method(m):
if m.im_self is None: | else:
return getattr, (m.im_self, m.im_func.func_name)
copy_reg.pickle(types.MethodType, _reduce_method)
class EnvironmentBuilder(object):
"""
This class is main class of SNC Env builder
"""
def __init__(self, release_name):
self.release = release_name
self.config = SncConfig()
self.git_url = self.config.getstring('git_repo', 'git_url')
self.base_dir = self.config.getstring('git_repo', 'base_dir');
self.path_to_workspace = self.base_dir + os.sep + release_name
self.abort_on_error = self.config.getboolean('envbuilder', 'abort_on_error')
self.parallel_run = self.config.getboolean('envbuilder', 'parallel_run')
self.print_cmd_output = self.config.getboolean('envbuilder', 'print_cmd_output')
self.print_cmd = self.config.getboolean('envbuilder', 'print_cmd')
self.repo_status = {}
self.notif_mgr = NotificationManager(None, None, None)
if os.path.exists("errors.txt"):
os.remove("errors.txt")
def run_commands_in_current_release(self, commands):
final_status = True
final_error = ''
final_output = ''
for command in commands:
p_status, output, error = self.run_command_and_collect_errors("cd {0};{1}".format(self.path_to_workspace, str(command)))
if p_status != 0:
final_status = False
final_error = final_error + ' ' + str(error)
final_output = final_output + ' ' + str(output)
break
return final_status, final_output, final_error
def run_command_in_background(self, command):
b_command = "cd {0};{1} &".format(self.path_to_workspace, command)
os.system(b_command)
def run_command_and_collect_errors(self, command):
p_status, output, error = EnvironmentBuilder.handle_command(command, True, True, self.print_cmd_output, self.print_cmd)
if p_status != 0:
current_error = "Failed command: [{0}] Error: [{1}], Output: [{2}]".format(command, error, output)
filename = 'errors.txt'
if os.path.exists(filename):
append_write = 'a' # append if already exists
else:
append_write = 'w' # make a new file if not
error_file = open(filename,append_write)
error_file.write(current_error + '\n')
error_file.close()
return p_status, output, error
def clone_env(self):
now = time.time()
if not os.path.exists(self.path_to_workspace):
os.makedirs(self.path_to_workspace)
list_of_repos = self.config.getlist('git_repo', 'repo');
if self.parallel_run:
pool = Pool(len(list_of_repos))
pool.map(self._clone_env, list_of_repos)
else:
for repo in list_of_repos:
self._clone_env(repo)
later = time.time()
difference = int(later - now)
log_message = "Clone operation for release [{0}] took [{1}] seconds".format(self.release,difference)
ColorPrint.blue_highlight(log_message)
self.notif_mgr.send_notification(True, 'clone_env', log_message)
def _clone_env(self, repo):
if not os.path.exists(self.path_to_workspace + os.sep + repo):
clone_cmd ='cd {0};git clone https://{1}/{2}'.format(self.path_to_workspace, self.git_url, repo)
self.run_command_and_collect_errors(clone_cmd)
def copy_local_env(self, new_release_name):
path_to_new_release = self.base_dir + os.sep + new_release_name
copy_cmdb = 'cp -rp ' + self.path_to_workspace + ' ' + path_to_new_release
ColorPrint.blue_highlight("Copying environment [{0}] to [{1}] ".format(self.release, new_release_name))
if os.path.exists(self.path_to_workspace):
self.run_command_and_collect_errors(copy_cmdb)
else:
ColorPrint.err("Can't copy due to invalid path: [{0}] ".format(self.path_to_workspace))
def show_my_commits(self, show_sha, since_days):
list_of_repos = self.config.getlist('git_repo','repo');
for repo in list_of_repos:
current_repo_path = self.path_to_workspace + os.sep + repo;
if os.path.exists(current_repo_path):
if since_days is None:
commit_since_days = self.config.getint('git_repo','commit_since_days');
else:
commit_since_days = int(since_days)
since_date = datetime.now() - timedelta(days=commit_since_days)
show_commit = ''
if not show_sha:
show_commit = '\|commit ';
cmd_commits = 'cd ' + current_repo_path + ';git log --author="$(git config user.name)" --since "{0} {1} {2}"|grep -v "Author:\|Date:{3}"'.\
format(since_date.strftime("%B"), since_date.day, since_date.year, show_commit)
commits_output = EnvironmentBuilder.handle_command(cmd_commits, False, True, self.print_cmd_output, self.print_cmd)
p_status, output, err = commits_output;
if p_status == 0 and not (output.rstrip('\n').isspace()):
output = os.linesep.join(['\t' + s.strip() for s in output.splitlines() if s])
ColorPrint.blue_highlight("Commits for repository [{0}]".format(repo.upper()))
ColorPrint.info(output)
unpushed_commits = self.get_unpushed_commits(current_repo_path)
if unpushed_commits and not unpushed_commits.rstrip('\n').isspace():
ColorPrint.err("\tUnpushed commits!!!")
ColorPrint.warn(unpushed_commits)
def get_branch_name(self, repository_path):
cmd_get_branch = 'cd {0};git rev-parse --abbrev-ref HEAD'.format(repository_path)
result = self.run_command_and_collect_errors(cmd_get_branch)
p_status, branch_name, err = result;
branch_name = branch_name.rstrip('\n')
if p_status == 0:
return branch_name
return None
def get_unpushed_commits(self, repository_path):
current_branch = self.get_branch_name(repository_path)
cmd_commits = 'cd {0};git log origin/{1}..{2}|grep -v "Author:\|Date:"'.format(repository_path, current_branch, current_branch)
commits_output = EnvironmentBuilder.handle_command(cmd_commits, False, True, False)
p_status, output, err = commits_output;
if p_status == 0 and not (output.rstrip('\n').isspace()):
output = os.linesep.join(['\t' + s.strip() for s in output.splitlines() if s])
return output
return None
def switch_track(self, track_name):
if not os.path.exists(self.path_to_workspace):
ColorPrint.err("Invalid release name: [{0}]".format(self.release))
exit(1)
now = time.time()
list_of_repos = self.config.getlist('git_repo','repo');
if self.parallel_run:
pool = Pool(len(list_of_repos))
pool.map(self._switch_repo, zip(list_of_repos, repeat(track_name)))
else:
for repo in list_of_repos:
self._switch_repo([repo, track_name])
later = time.time()
difference = int(later - now)
log_message = "Switch operation for release [{0}] took [{1}] seconds".format(self.release, difference)
ColorPrint.blue_highlight(log_message)
self.notif_mgr.send_notification(True, "Switch branch", log_message)
def _switch_repo(self, args):
repo, track_name = args
ColorPrint.blue_highlight("Trying to switch the repository [{0}] to [{1}]".format(repo, track_name))
if os.path.exists(self.path_to_workspace + os.sep + repo):
p_status, out, err = self.run_command_and_collect_errors('cd {0};git rev-parse --abbrev-ref HEAD'.format(self.path_to_workspace + os.sep + repo))
if out == track_name:
ColorPrint.warn("The current repository [{0}] already switched to [{1}], skipping".format(repo, track_name))
else:
self.run_command_and_collect_errors('cd {0};git checkout {1}'.format(self.path_to_workspace + os.sep + repo, track_name))
def mvn_build(self):
if not os.path.exists(self.path_to_workspace):
ColorPrint.err("Invalid release name: [{0}]".format(self.release))
exit(1)
project_per_repo = self.config.getsection('projects')
for repo_name, projects in project_per_repo:
ColorPrint.blue_highlight("Starting mvn install for repository {0}".format(repo_name))
for project_name in projects.split(','):
project_path = self.path_to_workspace + os.sep + repo_name + os.sep + project_name
java_env = 'source ~/.bash_profile'
cmd = java_env + ';cd {0};mvn clean install -DskipTests'.format(project_path)
self.run_command_and_collect_errors(cmd)
log_message = "Maven build operation for release completed".format(self.release)
ColorPrint.blue_highlight(log_message)
self.notif_mgr.send_notification(True, 'Maven Build', log_message)
def mvn_clean(self):
if not os.path.exists(self.path_to_workspace):
ColorPrint.err("Invalid release name: [{0}]".format(self.release))
exit(1)
project_per_repo = self.config.getsection('projects')
for repo_name, projects in project_per_repo:
ColorPrint.blue_highlight("Starting mvn clean for repository {0}".format(repo_name))
for project_name in projects.split(','):
project_path = self.path_to_workspace + os.sep + repo_name + os.sep + project_name
java_env = 'source ~/.bash_profile'
cmd = java_env + ';cd {0};mvn clean'.format(project_path)
self.run_command_and_collect_errors(cmd)
log_message = "Maven clean operation for release completed".format(self.release)
ColorPrint.blue_highlight(log_message)
self.notif_mgr.send_notification(True, 'Maven Clean', log_message)
def run_git_pull(self):
if not os.path.exists(self.path_to_workspace):
ColorPrint.err("Invalid release name: [{0}]".format(self.release))
exit(1)
now = time.time()
list_of_repos = self.config.getlist('git_repo', 'repo');
if self.parallel_run:
pool = Pool(len(list_of_repos))
pool.map(self._git_pull, list_of_repos)
else:
for repo in list_of_repos:
self._git_pull(repo)
later = time.time()
difference = int(later - now)
log_message = "Pull operation for release [{0}] took [{1}] seconds".format(self.release, difference)
ColorPrint.blue_highlight(log_message)
self.notif_mgr.send_notification(True, 'git pull', log_message)
def run_git_custom(self,git_command):
if not os.path.exists(self.path_to_workspace):
ColorPrint.err("Invalid release name: [{0}]".format(self.release))
exit(1)
now = time.time()
list_of_repos = self.config.getlist('git_repo', 'repo');
func = partial(self._git_custom, git_command)
if self.parallel_run:
pool = Pool(len(list_of_repos))
pool.map(func, list_of_repos)
else:
for repo in list_of_repos:
self._git_custom(git_command, repo)
later = time.time()
difference = int(later - now)
log_message = "Git custom operation for release [{0}] took [{1}] seconds".format(self.release, difference)
ColorPrint.blue_highlight(log_message)
self.notif_mgr.send_notification(True, git_command, log_message)
def _git_pull(self, repo):
ColorPrint.blue_highlight("Pulling the repository [{0}]".format(repo))
repo_path = self.path_to_workspace + os.sep + repo
is_git_pull_ran = False
if os.path.exists(repo_path):
current_branch = self.get_branch_name(repo_path)
if self._is_branch_up_to_date(repo_path):
if repo in self.repo_status and self.repo_status[repo]:
ColorPrint.blue_highlight('Your repository [{0}] is up-to-date, skipping [git pull]'.format(repo))
else:
p_status, output, error = self.run_command_and_collect_errors('cd {0};git pull origin {1}'.format(repo_path, current_branch))
is_git_pull_ran = True
else:
self.run_git_stash(repo_path)
if self._is_ready_to_pull(repo_path):
if repo in self.repo_status and self.repo_status[repo]:
ColorPrint.blue_highlight('Your repository [{0}] is up-to-date, skipping [git pull]'.format(repo))
else:
p_status, output, error = self.run_command_and_collect_errors('cd {0};git pull origin {1}'.format(repo_path, current_branch))
is_git_pull_ran = True
self.run_git_unstash(repo_path)
else:
ColorPrint.warn( "The repository path [{0}] is not available".format(repo))
if is_git_pull_ran and p_status == 0:
if 'up to date' in output or 'Successfully rebased and updated' or 'Fast-forward' in output:
ColorPrint.blue_highlight("Pull for repository {0} finished successfully".format(repo))
else:
current_error = "Your repository {0} is broken, try to run 'git gc --prune=now' and 'git remote prune origin' to fix it".format(repo)
ColorPrint.err(current_error)
filename = 'errors.txt'
if os.path.exists(filename):
append_write = 'a' # append if already exists
else:
append_write = 'w' # make a new file if not
error_file = open(filename, append_write)
error_file.write(current_error + '\n')
error_file.close()
def _git_custom(self, git_command, repo):
ColorPrint.blue_highlight("Running custom git command on repository [{0}]".format(repo))
repo_path = self.path_to_workspace + os.sep + repo
if os.path.exists(repo_path):
self.run_command_and_collect_errors('cd {0};git {1}'.format(repo_path, git_command ))
else:
ColorPrint.warn( "The repository path [{0}] is not available".format(repo))
def run_git_stash(self, repo_path):
if os.path.exists(repo_path):
ColorPrint.blue_highlight( "Stashing the repository [{0}]".format(repo_path))
self.run_command_and_collect_errors('cd {0};git stash'.format(repo_path))
else:
ColorPrint.warn( "The repository path [{0}] is not available".format(repo_path))
def run_git_unstash(self, repo_path):
if os.path.exists(repo_path):
ColorPrint.blue_highlight("Unstashing the repository [{0}]".format(repo_path))
self.run_command_and_collect_errors('cd {0};git stash pop'.format(repo_path))
else:
ColorPrint.warn("The repository path [{0}] is not available".format(repo_path))
def _is_ready_to_pull(self, repo_path):
ColorPrint.blue_highlight("Checking repository status [{0}]".format(repo_path))
p_status, cmd_out, err = self.run_command_and_collect_errors('cd {0};git status -uno'.format(repo_path))
ColorPrint.info(cmd_out)
repo = os.path.basename(os.path.normpath(repo_path))
if 'Your branch is up-to-date' in str(cmd_out):
self.repo_status[repo] = True
else:
self.repo_status[repo] = False
if 'nothing to commit' in str(cmd_out):
return True
else:
return False
def _is_branch_up_to_date(self, repo_path):
ColorPrint.blue_highlight("Checking repository status [{0}]".format(repo_path))
self.run_command_and_collect_errors('cd {0};git remote update'.format(repo_path))
if self._is_ready_to_pull(repo_path):
return True
else:
repo = os.path.basename(os.path.normpath(repo_path))
if repo in self.repo_status and self.repo_status[repo]:
return True
else:
return False
@staticmethod
def print_list_avalable_versions(current_release):
base_dir = SncConfig().getstring('git_repo', 'base_dir');
if current_release is not None:
ColorPrint.blue_highlight('================' + current_release.upper() + '================')
EnvironmentBuilder.print_release_branch_per_repository(current_release)
exit(0)
for dir in os.listdir(base_dir):
if os.path.isdir(base_dir + os.sep + dir) and not dir.startswith('.'):
if EnvironmentBuilder.is_release_direcrory(dir):
ColorPrint.blue_highlight('================' + dir.upper() + '================')
EnvironmentBuilder.print_release_branch_per_repository(dir)
@staticmethod
def print_release_branch_per_repository(current_release):
"""git remote prune origin"""
base_dir = SncConfig().getstring('git_repo','base_dir');
list_of_repos = SncConfig().getlist('git_repo', 'repo');
list_of_messages = {}
brunches_d = {}
for repository in list_of_repos:
path_to_repository = base_dir + os.sep + current_release + os.sep + repository
if os.path.exists(path_to_repository + os.sep + '.git'):
cmd_get_branch = 'cd {0};git rev-parse --abbrev-ref HEAD'.format(path_to_repository)
status, current_brunch, error = EnvironmentBuilder.handle_command(cmd_get_branch, True, True, False)
current_brunch = current_brunch.rstrip();
current_message = "Release: [{0}] Repository: [{1}], Branch: [{2}]".rstrip().format(current_release, repository, current_brunch)
list_of_messages[current_message] = current_brunch
if current_brunch in brunches_d:
brunches_d[current_brunch] += 1
else:
brunches_d[current_brunch] = 0
if brunches_d.values():
max_brunch = max(brunches_d.values())
for message, branch in list_of_messages.iteritems():
if brunches_d[branch] < max_brunch:
ColorPrint.err(message)
else:
ColorPrint.info(message)
@staticmethod
def is_release_direcrory(release_dir):
base_dir = SncConfig().getstring('git_repo','base_dir');
full_path = base_dir + os.sep + release_dir
list_of_dirs = os.listdir(full_path)
list_of_repos = SncConfig().getlist('git_repo','repo');
return not set(list_of_repos).isdisjoint(list_of_dirs)
def print_execution_error_summary(self):
if not os.path.exists("errors.txt"):
exit(0)
with open('errors.txt', 'r') as error_file:
all_errors=error_file.read()
if all_errors:
ColorPrint.blue_highlight("Fix the following errors and run again")
ColorPrint.err('\n' + all_errors)
else:
ColorPrint.blue_highlight("Execution complited without errors")
@staticmethod
def handle_command(cmd, check_rc=True, get_output=True, print_output=False, print_cmd=False, background=False):
"""
Executes command
:param cmd: command string to be executed
:return: rc, stdout, stderr
"""
stdout_flag = None
if get_output:
stdout_flag = subprocess.PIPE
if print_cmd:
ColorPrint.info("[handle_command] running {0}".format(cmd))
p = subprocess.Popen(cmd,
stdout=stdout_flag,
stderr=subprocess.STDOUT,
shell=True)
out, err = p.communicate()
p_status = p.wait()
if check_rc:
if p_status != 0:
ColorPrint.err("[handle_command] failed executing: {0}".format(cmd))
ColorPrint.err(str(err) + ' ' + str(out))
else:
if print_output:
ColorPrint.info("[handle_command] Command output: {0} ".format(str(out)))
abort_on_error = SncConfig().getboolean('envbuilder', 'abort_on_error')
if abort_on_error and p_status != 0:
ColorPrint.err("EnvironmentBuilder: Execution aborted due to error[s]")
exit(1)
return p_status, out, err
if __name__ == '__main__':
#Font Name: Big
#http://patorjk.com/software/taag
ColorPrint.blue_highlight("""
# ______ ____ _ _ _ __ _ _
# | ____| | _ \ (_) | | | /_ | || |
# | |__ _ ____ _| |_) |_ _ _| | __| | ___ _ __ | | || |_
# | __| | '_ \ \ / / _ <| | | | | |/ _` |/ _ \ '__| | |__ _|
# | |____| | | \ V /| |_) | |_| | | | (_| | __/ | | |_ | |
# |______|_| |_|\_/ |____/ \__,_|_|_|\__,_|\___|_| |_(_)|_|
#""");
parser = argparse.ArgumentParser(prog='envbuilder.py',
description='Build environment tool',
formatter_class=RawTextHelpFormatter)
parser.add_argument('-clone', help='Clone defined repositories in the conf file to the specifed release directory', action="store_true")
parser.add_argument('-pull', help='run git pull for all or specified repositories \n ./envbuilder.py -pull -r release',action="store_true")
parser.add_argument('-sw', help='switch all repositories to relevant track \n /envbuilder.py -sw -t trackname -r release', action="store_true")
parser.add_argument('-t', help='track to switch', nargs='?',dest="track")
parser.add_argument('-r', help='release name', nargs='?', dest="release")
parser.add_argument('-copy', help='Copy local release to the new one. Useful for Intellij developers', action="store_true")
parser.add_argument('-nr', help='new release name', nargs='?', dest="new_release")
parser.add_argument('-commits', help='Show my release commits', action="store_true")
parser.add_argument('-sha', help='SHA key as part of commit message', action="store_true")
parser.add_argument('-days', help='Commit since days ago', nargs='?',dest="since_days")
parser.add_argument('-status', help='Status of the current local branches', action="store_true")
parser.add_argument('-mvn', help='Run maven install -DskipTests for the specified release', action="store_true")
parser.add_argument('-mvn_clean', help='Run maven clean for the specified release', action="store_true")
parser.add_argument('-git', help='Run custom git command', nargs='?',dest="git_command")
config = SncConfig()
default_release = config.getstring('envbuilder', 'release')
pl = PluginsLoader(os.environ[ENVB_PATH] + os.sep + "plugins")
plugins = pl.load_plugins()
for flag in plugins:
plugin = plugins[flag]
if plugin['active'] is True:
parser.add_argument('-{0}'.format(plugin['flag']),
help='{0}'.format(plugin['description']), action="store_true")
args = parser.parse_args()
# print str(args)
if not args.release:
ColorPrint.info("The -r [release] option is not provided, using default [{0}] from envbuilder.conf".format(default_release))
if not default_release:
ColorPrint.err('\n' + "The [release] parameter is not defined under [enbuilder] section in enbuilder.conf")
args.release = default_release
if args.status and args.release:
EnvironmentBuilder.print_list_avalable_versions(args.release)
exit(0)
if args.status:
EnvironmentBuilder.print_list_avalable_versions(None)
exit(0)
if args.mvn and args.release:
builder = EnvironmentBuilder(args.release)
builder.mvn_build()
builder.print_execution_error_summary()
exit(0)
if args.mvn_clean and args.release:
builder = EnvironmentBuilder(args.release)
builder.mvn_clean()
builder.print_execution_error_summary()
exit(0)
if args.commits and args.release:
builder = EnvironmentBuilder(args.release)
builder.show_my_commits(args.sha, args.since_days)
exit(0)
if args.copy and args.release and args.new_release:
builder = EnvironmentBuilder(args.release)
builder.copy_local_env(args.new_release)
builder.print_execution_error_summary()
exit(0)
if args.sw and args.release and args.track:
builder = EnvironmentBuilder(args.release)
builder.switch_track(args.track)
builder.print_execution_error_summary()
exit(0)
if args.pull and args.release:
builder = EnvironmentBuilder(args.release)
builder.run_git_pull()
builder.print_execution_error_summary()
exit(0)
if args.git_command and args.release:
builder = EnvironmentBuilder(args.release)
builder.run_git_custom(args.git_command)
builder.print_execution_error_summary()
exit(0)
if args.clone and args.release:
builder = EnvironmentBuilder(args.release)
builder.clone_env()
if args.track:
builder.switch_track(args.track)
builder.print_execution_error_summary()
exit(0)
for option in plugins:
try:
current_arg = getattr(args, option)
if current_arg is True:
plugin = plugins[option]
builder = EnvironmentBuilder(args.release)
commands_to_run = plugin['commands']
if plugin['type'] == 'group':
plugins_to_run = plugin['plugins']
for run_plugin_flag in plugins_to_run:
run_plugin = plugins[run_plugin_flag]
commands_to_run.extend(run_plugin['commands'])
is_background = False
if plugin['background'] is True:
is_background = True
last_command = commands_to_run.pop()
final_status, final_output, final_error = builder.run_commands_in_current_release(commands_to_run)
if is_background:
builder.run_command_in_background(last_command)
if final_output is None:
final_output = ''
if final_error is None:
final_error = ''
if plugin['notify'] is True:
notifier = NotificationManager(None, None, None)
if final_status is True:
command_status = 'completed successfully'
final_result = final_output
else:
command_status = 'execution failed'
final_result = final_output + final_error
notif_msg = "Command: [{0}] Status: {1} Result: {2}".format(plugin['description'],
command_status, final_result)
notifier.send_notification(final_status,plugin['name'], notif_msg)
exit(0)
except AttributeError:
continue
else:
parser.print_help() | return getattr, (m.im_class, m.im_func.func_name) |
transport.go | package utp
import (
"bufio"
"context"
"crypto/tls"
"encoding/gob"
"net"
"github.com/anacrolix/utp"
"github.com/micro/go-micro/transport"
maddr "github.com/micro/misc/lib/addr"
mnet "github.com/micro/misc/lib/net"
mls "github.com/micro/misc/lib/tls"
)
func (u *utpTransport) Dial(addr string, opts ...transport.DialOption) (transport.Client, error) {
dopts := transport.DialOptions{
Timeout: transport.DefaultDialTimeout,
}
for _, opt := range opts {
opt(&dopts)
}
ctx, _ := context.WithTimeout(context.Background(), dopts.Timeout)
c, err := utp.DialContext(ctx, addr)
if err != nil {
return nil, err
}
if u.opts.Secure || u.opts.TLSConfig != nil {
config := u.opts.TLSConfig
if config == nil {
config = &tls.Config{
InsecureSkipVerify: true,
}
}
c = tls.Client(c, config)
}
encBuf := bufio.NewWriter(c)
return &utpClient{
dialOpts: dopts,
conn: c,
encBuf: encBuf,
enc: gob.NewEncoder(encBuf),
dec: gob.NewDecoder(c),
timeout: u.opts.Timeout,
}, nil
}
func (u *utpTransport) Listen(addr string, opts ...transport.ListenOption) (transport.Listener, error) {
var options transport.ListenOptions
for _, o := range opts {
o(&options)
}
var l net.Listener
var err error
if u.opts.Secure || u.opts.TLSConfig != nil {
config := u.opts.TLSConfig
fn := func(addr string) (net.Listener, error) {
if config == nil |
l, err := utp.Listen(addr)
if err != nil {
return nil, err
}
return tls.NewListener(l, config), nil
}
l, err = mnet.Listen(addr, fn)
} else {
l, err = mnet.Listen(addr, utp.Listen)
}
if err != nil {
return nil, err
}
return &utpListener{
t: u.opts.Timeout,
l: l,
opts: options,
}, nil
}
func (u *utpTransport) String() string {
return "utp"
}
| {
hosts := []string{addr}
// check if its a valid host:port
if host, _, err := net.SplitHostPort(addr); err == nil {
if len(host) == 0 {
hosts = maddr.IPs()
} else {
hosts = []string{host}
}
}
// generate a certificate
cert, err := mls.Certificate(hosts...)
if err != nil {
return nil, err
}
config = &tls.Config{Certificates: []tls.Certificate{cert}}
} |
exe_vbe.go | package exe
// http://lifeinhex.com/tag/vbe/
// https://en.wikipedia.org/wiki/VBScript
// http://fileformats.archiveteam.org/wiki/VBScript
// STATUS: 1%
import (
"os"
"github.com/martinlindhe/formats/parse"
)
// VBE parses the VBScript Encoded Script format
func VBE(c *parse.Checker) (*parse.ParsedLayout, error) {
if !isVBE(c.Header) {
return nil, nil
}
return parseVBE(c.File, c.ParsedLayout)
}
func isVBE(b []byte) bool {
// XXX just guessing
if b[0] != 0xff || b[1] != 0xfe || b[2] != 0x23 || b[3] != 0 {
return false
}
return true
}
func | (file *os.File, pl parse.ParsedLayout) (*parse.ParsedLayout, error) {
pos := int64(0)
pl.FileKind = parse.Executable
pl.Layout = []parse.Layout{{
Offset: pos,
Length: 4, // XXX
Info: "header",
Type: parse.Group,
Childs: []parse.Layout{
{Offset: pos, Length: 4, Info: "magic", Type: parse.Uint32le},
}}}
return &pl, nil
}
| parseVBE |
solution_test.go | package main
import (
"reflect"
"testing"
)
func runSample(t *testing.T, n int, P []int, V []int, Q [][]int, expect []int64) {
res := solve(n, V, P, Q)
if !reflect.DeepEqual(res, expect) {
t.Errorf("Sample expect %v, but got %v", expect, res)
}
}
func TestSample1(t *testing.T) {
n := 5
P := []int{1, 1, 2, 2}
V := []int{1, 2, 3, 4, 5}
Q := [][]int{ | {1, 2, 4},
{2, 4, 10},
{3, 2, 5},
}
expect := []int64{11, 20}
runSample(t, n, P, V, Q, expect)
} | {3, 4, 5},
{1, 4, 3},
{1, 5, 3}, |
mod.rs | // This file is part of linux-epoll. It is subject to the license terms in the COPYRIGHT file found in the top-level directory of this distribution and at https://raw.githubusercontent.com/lemonrock/linux-epoll/master/COPYRIGHT. No part of linux-epoll, including this file, may be copied, modified, propagated, or distributed except according to the terms contained in the COPYRIGHT file. |
include!("Dhcid.rs");
include!("DhcidDigest.rs");
include!("DhcidResourceRecordIgnoredBecauseReason.rs");
include!("IdentifierType.rs"); | // Copyright © 2019 The developers of linux-epoll. See the COPYRIGHT file in the top-level directory of this distribution and at https://raw.githubusercontent.com/lemonrock/linux-epoll/master/COPYRIGHT.
|
welcomemessages.ts | import {
Client,
GuildMember,
PartialGuildMember,
TextChannel
} from "discord.js";
import knex from "../../../db/knex";
type Guild = {
serverid?: string;
pinschannel?: string;
welcomechannel?: string;
auditchannel?: string;
usersquotes?: boolean;
};
const getWelcomeChannel = async (
guildid: string
): Promise<string | undefined> => {
const server = (
await knex("servers").where({ serverid: guildid })
)[0] as Guild;
return server.welcomechannel;
};
const joinMessage = async (
guildid: string,
client: Client,
member: GuildMember
) => {
const channelid = await getWelcomeChannel(guildid);
if (!channelid) return;
try {
const channel = (await client.channels.fetch(channelid)) as TextChannel;
channel.send({
content: `**<@${member.id}> has joined the server!**`,
allowedMentions: { users: [] }
});
} catch (error) {
console.log(error);
}
};
const leaveMessage = async (
guildid: string,
client: Client,
member: GuildMember | PartialGuildMember
) => {
const channelid = await getWelcomeChannel(guildid);
if (!channelid) return;
try {
const channel = (await client.channels.fetch(channelid)) as TextChannel;
channel.send({
content: `**<@${member.id}> has left the server!**`,
allowedMentions: { users: [] }
});
} catch (error) {
console.log(error);
}
};
export const welcomeEventsInitialiser = (client: Client) => {
client.on("guildMemberAdd", async (member) => {
joinMessage(member.guild.id, client, member);
});
client.on("guildMemberRemove", async (member) => {
leaveMessage(member.guild.id, client, member); | }; | }); |
icon.copy-js.min.js | (window.webpackJsonp=window.webpackJsonp||[]).push([[79],{2918:function(t,e,n){"use strict";n.r(e),n.d(e,"icon",(function(){return c}));n(11),n(2),n(6),n(8),n(5),n(9);var r=n(0),a=n.n(r);function o(){return(o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function | (t,e){if(null==t)return{};var n,r,a=function(t,e){if(null==t)return{};var n,r,a={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(a[n]=t[n]);return a}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(a[n]=t[n])}return a}var l=function(t){var e=t.title,n=t.titleId,r=i(t,["title","titleId"]);return a.a.createElement("svg",o({width:16,height:16,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":n},r),e?a.a.createElement("title",{id:n},e):null,a.a.createElement("path",{d:"M11.4 0c.235 0 .46.099.622.273l2.743 3c.151.162.235.378.235.602v9.25a.867.867 0 01-.857.875H3.857A.867.867 0 013 13.125V.875C3 .392 3.384 0 3.857 0H11.4zM14 4h-2.6a.4.4 0 01-.4-.4V1H4v12h10V4z"}),a.a.createElement("path",{d:"M3 1H2a1 1 0 00-1 1v13a1 1 0 001 1h10a1 1 0 001-1v-1h-1v1H2V2h1V1z"}))},c=l;l.__docgenInfo={description:"",methods:[],displayName:"EuiIconCopy"}}}]);
//# sourceMappingURL=icon.copy-js.min.js.map | i |
modules.py | import torch
import torch.nn as nn
import torch.nn.functional as F
class AddGate(nn.Module):
"""
Add gate similar to LSTM add gate: :math: `y = σ(W_mul * inp + b_mul) * tanh(W_add * inp + b_add)`
Outputs information that can be added to some state
where the network learns: if and how much of the input should be added
"""
def __init__(self, dim):
super().__init__()
self.W_mul = nn.Linear(dim, dim, bias=True)
self.W_add = nn.Linear(dim, dim, bias=True)
self.sigmoid = nn.Sigmoid()
def forward(self, inp):
out_mul = self.sigmoid(self.W_mul(inp))
out_add = torch.tanh(self.W_add(inp))
return out_mul * out_add
class PredictiveHidden(nn.Module):
"""
Computes a combined predictive hidden state from two hidden states: :math:`y = tanh(W1 * x1 + W2 * x2)`
"""
def __init__(self, dim):
super().__init__()
# Learnable parameter weights1 -> for calculating: W1 * inp1
self.W1 = nn.Linear(dim, dim, bias=True)
# Learnable parameter weights2 -> for calculating: W2 * inp2
self.W2 = nn.Linear(dim, dim, bias=True)
def forward(self, inp1, inp2):
# predictive hidden state: tanh(W1 * inp1 + W2 * inp2)
h_pred = torch.tanh(self.W1(inp1) + self.W2(inp2))
return h_pred
class TreeTopologyPred(nn.Module):
"""
Computes logits for depth, width and res predictions with linear transformations: dim -> 1
"""
def __init__(self, dim):
super().__init__()
# For topology prediction, we predict whether there are children
self.depth_pred = nn.Linear(dim, 1)
# For topology prediction, we predict whether there are successor siblings
self.width_pred = nn.Linear(dim, 1)
# For predicting whether a token is a reserved keyword of c++ or not
self.res_pred = nn.Linear(dim, 1)
def forward(self, inp):
depth_pred = self.depth_pred(inp)
width_pred = self.width_pred(inp)
res_pred = self.res_pred(inp)
return depth_pred, width_pred, res_pred
class LstmAttention(nn.Module):
"""
ATTENTION-BASED LSTM FOR PSYCHOLOGICAL STRESS DETECTION FROM SPOKEN
LANGUAGE USING DISTANT SUPERVISION
https://arxiv.org/abs/1805.12307
"""
def __init__(self, dim):
super().__init__()
self.attention_weights = nn.Linear(dim, dim)
self.softmax = nn.Softmax(dim=-1)
def forward(self, inp):
u = torch.tanh(self.attention_weights(inp))
a = self.softmax(u)
v = torch.sum(a * inp, dim=-1)
return u * inp
class MultiLayerLSTMCell(nn.Module):
"""
A long short-term memory (LSTM) cell with support for multiple layers.
input_size: The number of expected features in the input
hidden_size: The number of features in the hidden state
num_layers: Number of recurrent layers.
E.g., setting num_layers=2 would mean stacking two LSTM cells together
to form a stacked LSTM cell, with the second LSTM cell taking in outputs of
the first LSTM cell and computing the final results. Default: 1
"""
def __init__(self, input_size, hidden_size, num_layers = 1, recurrent_dropout=0):
super().__init__()
self.num_layers = num_layers
self.rnns = nn.ModuleList([])
self.dropout = nn.Dropout(recurrent_dropout)
# Initialize RNNs with num layers
for i in range(num_layers):
if i == 0:
self.rnns.append(nn.LSTMCell(input_size, hidden_size))
else:
self.rnns.append(nn.LSTMCell(hidden_size, hidden_size))
def forward(self, input, hidden_states):
n |
class Highway(nn.Module):
"""
Code from:
https://github.com/kefirski/pytorch_RVAE/blob/19103d1298d7d77423c6e7d76dcc190400d7256e/selfModules/highway.py#L5
Highway networks use learned gating mechanisms to regulate information flow, inspired by Long Short-Term Memory (LSTM) recurrent neural networks.
The gating mechanisms allow neural networks to have paths for information to follow across different layers ("information highways")
http://papers.nips.cc/paper/5850-training-very-deep-networks
"""
def __init__(self, size, num_layers, f):
super(Highway, self).__init__()
self.num_layers = num_layers
self.nonlinear = [nn.Linear(size, size) for _ in range(num_layers)]
for i, module in enumerate(self.nonlinear):
self._add_to_parameters(module.parameters(), 'nonlinear_module_{}'.format(i))
self.linear = [nn.Linear(size, size) for _ in range(num_layers)]
for i, module in enumerate(self.linear):
self._add_to_parameters(module.parameters(), 'linear_module_{}'.format(i))
self.gate = [nn.Linear(size, size) for _ in range(num_layers)]
for i, module in enumerate(self.gate):
self._add_to_parameters(module.parameters(), 'gate_module_{}'.format(i))
self.f = f
def forward(self, x):
"""
:param x: tensor with shape of [batch_size, size]
:return: tensor with shape of [batch_size, size]
applies σ(x) ⨀ (f(G(x))) + (1 - σ(x)) ⨀ (Q(x)) transformation | G and Q is affine transformation,
f is non-linear transformation, σ(x) is affine transformation with sigmoid non-linearition
and ⨀ is element-wise multiplication
"""
for layer in range(self.num_layers):
gate = F.sigmoid(self.gate[layer](x))
nonlinear = self.f(self.nonlinear[layer](x))
linear = self.linear[layer](x)
x = gate * nonlinear + (1 - gate) * linear
return x
def _add_to_parameters(self, parameters, name):
for i, parameter in enumerate(parameters):
self.register_parameter(name='{}-{}'.format(name, i), param=parameter)
| ew_hidden_states = []
for i in range(self.num_layers):
if i == 0:
h, c = self.rnns[i](input, hidden_states[i])
else:
h, c = self.rnns[i](h, hidden_states[i])
# apply recurrent dropout on the outputs of each LSTM cell hidden except the last layer
if i < self.num_layers - 1:
h = self.dropout(h)
new_hidden_states.append((h, c))
return new_hidden_states
|
consumer.go | package rabbit
import (
"github.com/sirupsen/logrus"
"github.com/streadway/amqp"
"golang.org/x/net/context"
)
type MessageHandler func(amqp.Table, []byte) error
func (mh MessageHandler) handle(headers amqp.Table, body []byte) error { return mh(headers, body) }
type consumer struct {
connection *Connection
workers map[int]*consumerWorker
}
func newConsumer(
ctx context.Context,
uri, user, password, name string,
prefetchCount, prefetchSize, count int,
handler MessageHandler,
logger logrus.FieldLogger,
) *consumer {
connection := NewConnection(ctx, uri, user, password, logger)
c := &consumer{
connection: connection,
workers: func() map[int]*consumerWorker {
workers := make(map[int]*consumerWorker, count)
for id := 0; id < count; id++ {
workers[id] = newConsumerWorker(
NewChannel(id+1, connection, prefetchCount, prefetchSize, logger),
id+1, name, handler, logger,
).run()
}
return workers
}(),
}
connection.Start()
return c
}
type RetryLimitReached func(exchange, queue string, routeKeys []interface{}, body []byte)
func (rlr RetryLimitReached) handle(exchange, queue string, routeKeys []interface{}, body []byte) {
rlr(exchange, queue, routeKeys, body)
}
type retryableConsumer struct {
*consumer
limit int
}
func | (
ctx context.Context,
uri, user, password, name string,
prefetchCount, prefetchSize, count, limit int,
handler MessageHandler,
rlr RetryLimitReached,
logger logrus.FieldLogger,
) *retryableConsumer {
retryableHandler := func() MessageHandler {
return func(headers amqp.Table, body []byte) error {
if xDeaths, ok := headers["x-death"]; ok {
xDeaths, _ := xDeaths.([]interface{})
xDeath, _ := xDeaths[1].(amqp.Table)
exchange, _ := xDeath["exchange"].(string)
queue, _ := xDeath["queue"].(string)
routeKeys, _ := xDeath["routing-keys"].([]interface{})
retried, _ := xDeath["count"].(int64)
if limit > 0 && int(retried) >= limit {
if rlr != nil {
rlr.handle(exchange, queue, routeKeys, body)
}
return nil
} else {
return handler.handle(headers, body)
}
} else {
return handler.handle(headers, body)
}
}
}
rc := &retryableConsumer{
consumer: newConsumer(ctx, uri, user, password, name, prefetchCount, prefetchSize,
count, retryableHandler(), logger.WithField("Retry", limit)),
limit: limit,
}
return rc
}
| RunConsumer |
flow-template.test.js | /* global it, describe */
import { expect } from 'chai';
import FlowTemplate from '../src/template/flow-template';
import card from './cards/card.json';
describe('Flow Template', () => {
describe('Constructor', () => {
it('Should construct an instance', () => {
let instance = new FlowTemplate({ localesPath: __dirname+'/locales' });
expect(instance).to.exist;
});
});
describe('Translate a phrase', () => {
it('Should translate using variables', () => {
| let view = {
user: {
name: 'Jesús'
}
};
let translated = instance.translatePhrase('Hello {{ user.name }}, how are you today?', 'es', view);
let expected = 'Hola Jesús, ¿cómo andas?';
expect(translated).to.equal(expected);
});
});
describe('Translate an object', () => {
it('Should translate an object using variables', () => {
let instance = new FlowTemplate({ localesPath: __dirname+'/locales' });
let view = {
user: {
name: 'Jesús'
}
};
let translated = instance.translate(card, 'es', view);
let expected = {
greet: 'Hola',
greetUser: 'Hola Jesús, ¿cómo andas?'
};
expect(translated).to.deep.equal(expected);
});
});
}); | let instance = new FlowTemplate({ localesPath: __dirname+'/locales' });
|
options.go | // Copyright (c) 2018 IoTeX
// This is an alpha (internal) release and is not suitable for production. This source code is provided 'as is' and no
// warranties are given as to title or non-infringement, merchantability or fitness for purpose and, to the extent
// permitted by law, all liability for your use of the code is disclaimed. This source code is governed by Apache
// License 2.0 that can be found in the LICENSE file.
package actpool
import (
"time"
"github.com/facebookgo/clock"
)
type clockOption struct{ c clock.Clock }
// WithClock returns an option to overwrite clock.
func WithClock(c clock.Clock) interface{ ActQueueOption } |
func (o *clockOption) SetActQueueOption(aq *actQueue) { aq.clock = o.c }
type ttlOption struct{ ttl time.Duration }
// WithTimeOut returns an option to overwrite time out setting.
func WithTimeOut(ttl time.Duration) interface{ ActQueueOption } {
return &ttlOption{ttl}
}
func (o *ttlOption) SetActQueueOption(aq *actQueue) { aq.ttl = o.ttl }
| {
return &clockOption{c}
} |
vendor.js | require=function e(t,n,r){function o(s,a){if(!n[s]){if(!t[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(i)return i(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[s]={exports:{}};t[s][0].call(c.exports,function(e){var n=t[s][1][e];return o(n?n:e)},c,c.exports,e,t,n,r)}return n[s].exports}for(var i="function"==typeof require&&require,s=0;s<r.length;s++)o(r[s]);return o}({1:[function(e,t,n){(function(e,t,r,o,i,s,a,u,l){var c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(e){"use strict";function t(e){var t=e.charCodeAt(0);return t===i||t===f?62:t===s||t===d?63:a>t?-1:a+10>t?t-a+26+26:l+26>t?t-l:u+26>t?t-u+26:void 0}function n(e){function n(e){l[f++]=e}var r,i,s,a,u,l;if(e.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var c=e.length;u="="===e.charAt(c-2)?2:"="===e.charAt(c-1)?1:0,l=new o(3*e.length/4-u),s=u>0?e.length-4:e.length;var f=0;for(r=0,i=0;s>r;r+=4,i+=3)a=t(e.charAt(r))<<18|t(e.charAt(r+1))<<12|t(e.charAt(r+2))<<6|t(e.charAt(r+3)),n((16711680&a)>>16),n((65280&a)>>8),n(255&a);return 2===u?(a=t(e.charAt(r))<<2|t(e.charAt(r+1))>>4,n(255&a)):1===u&&(a=t(e.charAt(r))<<10|t(e.charAt(r+1))<<4|t(e.charAt(r+2))>>2,n(a>>8&255),n(255&a)),l}function r(e){function t(e){return c.charAt(e)}function n(e){return t(e>>18&63)+t(e>>12&63)+t(e>>6&63)+t(63&e)}var r,o,i,s=e.length%3,a="";for(r=0,i=e.length-s;i>r;r+=3)o=(e[r]<<16)+(e[r+1]<<8)+e[r+2],a+=n(o);switch(s){case 1:o=e[e.length-1],a+=t(o>>2),a+=t(o<<4&63),a+="==";break;case 2:o=(e[e.length-2]<<8)+e[e.length-1],a+=t(o>>10),a+=t(o>>4&63),a+=t(o<<2&63),a+="="}return a}var o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="+".charCodeAt(0),s="/".charCodeAt(0),a="0".charCodeAt(0),u="a".charCodeAt(0),l="A".charCodeAt(0),f="-".charCodeAt(0),d="_".charCodeAt(0);e.toByteArray=n,e.fromByteArray=r}("undefined"==typeof n?this.base64js={}:n)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/base64-js/lib/b64.js","/node_modules/base64-js/lib")},{_process:43,buffer:3}],2:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){function c(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function f(e){return"function"==typeof e}function d(e){return"number"==typeof e}function p(e){return"object"==typeof e&&null!==e}function h(e){return void 0===e}t.exports=c,c.EventEmitter=c,c.prototype._events=void 0,c.prototype._maxListeners=void 0,c.defaultMaxListeners=10,c.prototype.setMaxListeners=function(e){if(!d(e)||0>e||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},c.prototype.emit=function(e){var t,n,r,o,i,s;if(this._events||(this._events={}),"error"===e&&(!this._events.error||p(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;throw TypeError('Uncaught, unspecified "error" event.')}if(n=this._events[e],h(n))return!1;if(f(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(r=arguments.length,o=new Array(r-1),i=1;r>i;i++)o[i-1]=arguments[i];n.apply(this,o)}else if(p(n)){for(r=arguments.length,o=new Array(r-1),i=1;r>i;i++)o[i-1]=arguments[i];for(s=n.slice(),r=s.length,i=0;r>i;i++)s[i].apply(this,o)}return!0},c.prototype.addListener=function(e,t){var n;if(!f(t))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,f(t.listener)?t.listener:t),this._events[e]?p(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,p(this._events[e])&&!this._events[e].warned){var n;n=h(this._maxListeners)?c.defaultMaxListeners:this._maxListeners,n&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())}return this},c.prototype.on=c.prototype.addListener,c.prototype.once=function(e,t){function n(){this.removeListener(e,n),r||(r=!0,t.apply(this,arguments))}if(!f(t))throw TypeError("listener must be a function");var r=!1;return n.listener=t,this.on(e,n),this},c.prototype.removeListener=function(e,t){var n,r,o,i;if(!f(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],o=n.length,r=-1,n===t||f(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(p(n)){for(i=o;i-- >0;)if(n[i]===t||n[i].listener&&n[i].listener===t){r=i;break}if(0>r)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},c.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],f(n))this.removeListener(e,n);else for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},c.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?f(this._events[e])?[this._events[e]]:this._events[e].slice():[]},c.listenerCount=function(e,t){var n;return n=e._events&&e._events[t]?f(e._events[t])?1:e._events[t].length:0}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/browserify/node_modules/events/events.js","/node_modules/browserify/node_modules/events")},{_process:43,buffer:3}],3:[function(e,t,n){(function(t,r,o,i,s,a,u,l,c){"use strict";function f(){function e(){}try{var t=new Uint8Array(1);return t.foo=function(){return 42},t.constructor=e,42===t.foo()&&t.constructor===e&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(n){return!1}}function d(){return o.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(e){return this instanceof o?(o.TYPED_ARRAY_SUPPORT||(this.length=0,this.parent=void 0),"number"==typeof e?p(this,e):"string"==typeof e?h(this,e,arguments.length>1?arguments[1]:"utf8"):m(this,e)):arguments.length>1?new o(e,arguments[1]):new o(e)}function p(e,t){if(e=T(e,0>t?0:0|E(t)),!o.TYPED_ARRAY_SUPPORT)for(var n=0;t>n;n++)e[n]=0;return e}function h(e,t,n){("string"!=typeof n||""===n)&&(n="utf8");var r=0|S(t,n);return e=T(e,r),e.write(t,n),e}function m(e,t){if(o.isBuffer(t))return g(e,t);if(re(t))return y(e,t);if(null==t)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(t.buffer instanceof ArrayBuffer)return v(e,t);if(t instanceof ArrayBuffer)return b(e,t)}return t.length?_(e,t):w(e,t)}function g(e,t){var n=0|E(t.length);return e=T(e,n),t.copy(e,0,0,n),e}function y(e,t){var n=0|E(t.length);e=T(e,n);for(var r=0;n>r;r+=1)e[r]=255&t[r];return e}function v(e,t){var n=0|E(t.length);e=T(e,n);for(var r=0;n>r;r+=1)e[r]=255&t[r];return e}function b(e,t){return o.TYPED_ARRAY_SUPPORT?(t.byteLength,e=o._augment(new Uint8Array(t))):e=v(e,new Uint8Array(t)),e}function _(e,t){var n=0|E(t.length);e=T(e,n);for(var r=0;n>r;r+=1)e[r]=255&t[r];return e}function w(e,t){var n,r=0;"Buffer"===t.type&&re(t.data)&&(n=t.data,r=0|E(n.length)),e=T(e,r);for(var o=0;r>o;o+=1)e[o]=255&n[o];return e}function T(e,t){o.TYPED_ARRAY_SUPPORT?(e=o._augment(new Uint8Array(t)),e.__proto__=o.prototype):(e.length=t,e._isBuffer=!0);var n=0!==t&&t<=o.poolSize>>>1;return n&&(e.parent=oe),e}function E(e){if(e>=d())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+d().toString(16)+" bytes");return 0|e}function x(e,t){if(!(this instanceof x))return new x(e,t);var n=new o(e,t);return delete n.parent,n}function S(e,t){"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"binary":case"raw":case"raws":return n;case"utf8":case"utf-8":return Q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return J(e).length;default:if(r)return Q(e).length;t=(""+t).toLowerCase(),r=!0}}function C(e,t,n){var r=!1;if(t=0|t,n=void 0===n||n===1/0?this.length:0|n,e||(e="utf8"),0>t&&(t=0),n>this.length&&(n=this.length),t>=n)return"";for(;;)switch(e){case"hex":return j(this,t,n);case"utf8":case"utf-8":return I(this,t,n);case"ascii":return k(this,t,n);case"binary":return L(this,t,n);case"base64":return A(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return G(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function P(e,t,n,r){n=Number(n)||0;var o=e.length-n;r?(r=Number(r),r>o&&(r=o)):r=o;var i=t.length;if(i%2!==0)throw new Error("Invalid hex string");r>i/2&&(r=i/2);for(var s=0;r>s;s++){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))throw new Error("Invalid hex string");e[n+s]=a}return s}function M(e,t,n,r){return ee(Q(t,e.length-n),e,n,r)}function R(e,t,n,r){return ee($(t),e,n,r)}function D(e,t,n,r){return R(e,t,n,r)}function O(e,t,n,r){return ee(J(t),e,n,r)}function N(e,t,n,r){return ee(Z(t,e.length-n),e,n,r)}function A(e,t,n){return 0===t&&n===e.length?te.fromByteArray(e):te.fromByteArray(e.slice(t,n))}function I(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;n>o;){var i=e[o],s=null,a=i>239?4:i>223?3:i>191?2:1;if(n>=o+a){var u,l,c,f;switch(a){case 1:128>i&&(s=i);break;case 2:u=e[o+1],128===(192&u)&&(f=(31&i)<<6|63&u,f>127&&(s=f));break;case 3:u=e[o+1],l=e[o+2],128===(192&u)&&128===(192&l)&&(f=(15&i)<<12|(63&u)<<6|63&l,f>2047&&(55296>f||f>57343)&&(s=f));break;case 4:u=e[o+1],l=e[o+2],c=e[o+3],128===(192&u)&&128===(192&l)&&128===(192&c)&&(f=(15&i)<<18|(63&u)<<12|(63&l)<<6|63&c,f>65535&&1114112>f&&(s=f))}}null===s?(s=65533,a=1):s>65535&&(s-=65536,r.push(s>>>10&1023|55296),s=56320|1023&s),r.push(s),o+=a}return B(r)}function B(e){var t=e.length;if(ie>=t)return String.fromCharCode.apply(String,e);for(var n="",r=0;t>r;)n+=String.fromCharCode.apply(String,e.slice(r,r+=ie));return n}function k(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;n>o;o++)r+=String.fromCharCode(127&e[o]);return r}function L(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;n>o;o++)r+=String.fromCharCode(e[o]);return r}function j(e,t,n){var r=e.length;(!t||0>t)&&(t=0),(!n||0>n||n>r)&&(n=r);for(var o="",i=t;n>i;i++)o+=K(e[i]);return o}function G(e,t,n){for(var r=e.slice(t,n),o="",i=0;i<r.length;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}function H(e,t,n){if(e%1!==0||0>e)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function V(e,t,n,r,i,s){if(!o.isBuffer(e))throw new TypeError("buffer must be a Buffer instance");if(t>i||s>t)throw new RangeError("value is out of bounds");if(n+r>e.length)throw new RangeError("index out of range")}function U(e,t,n,r){0>t&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);i>o;o++)e[n+o]=(t&255<<8*(r?o:1-o))>>>8*(r?o:1-o)}function F(e,t,n,r){0>t&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);i>o;o++)e[n+o]=t>>>8*(r?o:3-o)&255}function W(e,t,n,r,o,i){if(t>o||i>t)throw new RangeError("value is out of bounds");if(n+r>e.length)throw new RangeError("index out of range");if(0>n)throw new RangeError("index out of range")}function q(e,t,n,r,o){return o||W(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),ne.write(e,t,n,r,23,4),n+4}function X(e,t,n,r,o){return o||W(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),ne.write(e,t,n,r,52,8),n+8}function z(e){if(e=Y(e).replace(ae,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function Y(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function K(e){return 16>e?"0"+e.toString(16):e.toString(16)}function Q(e,t){t=t||1/0;for(var n,r=e.length,o=null,i=[],s=0;r>s;s++){if(n=e.charCodeAt(s),n>55295&&57344>n){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(56320>n){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=(o-55296<<10|n-56320)+65536}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,128>n){if((t-=1)<0)break;i.push(n)}else if(2048>n){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(65536>n){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(1114112>n))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function $(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t}function Z(e,t){for(var n,r,o,i=[],s=0;s<e.length&&!((t-=2)<0);s++)n=e.charCodeAt(s),r=n>>8,o=n%256,i.push(o),i.push(r);return i}function J(e){return te.toByteArray(z(e))}function ee(e,t,n,r){for(var o=0;r>o&&!(o+n>=t.length||o>=e.length);o++)t[o+n]=e[o];return o}var te=e("base64-js"),ne=e("ieee754"),re=e("isarray");n.Buffer=o,n.SlowBuffer=x,n.INSPECT_MAX_BYTES=50,o.poolSize=8192;var oe={};o.TYPED_ARRAY_SUPPORT=void 0!==r.TYPED_ARRAY_SUPPORT?r.TYPED_ARRAY_SUPPORT:f(),o.TYPED_ARRAY_SUPPORT?(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array):(o.prototype.length=void 0,o.prototype.parent=void 0),o.isBuffer=function(e){return!(null==e||!e._isBuffer)},o.compare=function(e,t){if(!o.isBuffer(e)||!o.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,s=Math.min(n,r);s>i&&e[i]===t[i];)++i;return i!==s&&(n=e[i],r=t[i]),r>n?-1:n>r?1:0},o.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(e,t){if(!re(e))throw new TypeError("list argument must be an Array of Buffers.");if(0===e.length)return new o(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;n++)t+=e[n].length;var r=new o(t),i=0;for(n=0;n<e.length;n++){var s=e[n];s.copy(r,i),i+=s.length}return r},o.byteLength=S,o.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?I(this,0,e):C.apply(this,arguments)},o.prototype.equals=function(e){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:0===o.compare(this,e)},o.prototype.inspect=function(){var e="",t=n.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},o.prototype.compare=function(e){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?0:o.compare(this,e)},o.prototype.indexOf=function(e,t){function n(e,t,n){for(var r=-1,o=0;n+o<e.length;o++)if(e[n+o]===t[-1===r?0:o-r]){if(-1===r&&(r=o),o-r+1===t.length)return n+r}else r=-1;return-1}if(t>2147483647?t=2147483647:-2147483648>t&&(t=-2147483648),t>>=0,0===this.length)return-1;if(t>=this.length)return-1;if(0>t&&(t=Math.max(this.length+t,0)),"string"==typeof e)return 0===e.length?-1:String.prototype.indexOf.call(this,e,t);if(o.isBuffer(e))return n(this,e,t);if("number"==typeof e)return o.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,e,t):n(this,[e],t);throw new TypeError("val must be string, number or Buffer")},o.prototype.get=function(e){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(e)},o.prototype.set=function(e,t){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(e,t)},o.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else if(isFinite(t))t=0|t,isFinite(n)?(n=0|n,void 0===r&&(r="utf8")):(r=n,n=void 0);else{var o=r;r=t,t=0|n,n=o}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(0>n||0>t)||t>this.length)throw new RangeError("attempt to write outside buffer bounds");r||(r="utf8");for(var s=!1;;)switch(r){case"hex":return P(this,e,t,n);case"utf8":case"utf-8":return M(this,e,t,n);case"ascii":return R(this,e,t,n);case"binary":return D(this,e,t,n);case"base64":return O(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,e,t,n);default:if(s)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),s=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var ie=4096;o.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,0>e?(e+=n,0>e&&(e=0)):e>n&&(e=n),0>t?(t+=n,0>t&&(t=0)):t>n&&(t=n),e>t&&(t=e);var r;if(o.TYPED_ARRAY_SUPPORT)r=o._augment(this.subarray(e,t));else{var i=t-e;r=new o(i,void 0);for(var s=0;i>s;s++)r[s]=this[s+e]}return r.length&&(r.parent=this.parent||this),r},o.prototype.readUIntLE=function(e,t,n){e=0|e,t=0|t,n||H(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r},o.prototype.readUIntBE=function(e,t,n){e=0|e,t=0|t,n||H(e,t,this.length);for(var r=this[e+--t],o=1;t>0&&(o*=256);)r+=this[e+--t]*o;return r},o.prototype.readUInt8=function(e,t){return t||H(e,1,this.length),this[e]},o.prototype.readUInt16LE=function(e,t){return t||H(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUInt16BE=function(e,t){return t||H(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUInt32LE=function(e,t){return t||H(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUInt32BE=function(e,t){return t||H(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readIntLE=function(e,t,n){e=0|e,t=0|t,n||H(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return o*=128,r>=o&&(r-=Math.pow(2,8*t)),r},o.prototype.readIntBE=function(e,t,n){e=0|e,t=0|t,n||H(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i},o.prototype.readInt8=function(e,t){return t||H(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},o.prototype.readInt16LE=function(e,t){t||H(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt16BE=function(e,t){t||H(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt32LE=function(e,t){return t||H(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return t||H(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readFloatLE=function(e,t){return t||H(e,4,this.length),ne.read(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return t||H(e,4,this.length),ne.read(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return t||H(e,8,this.length),ne.read(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return t||H(e,8,this.length),ne.read(this,e,!1,52,8)},o.prototype.writeUIntLE=function(e,t,n,r){e=+e,t=0|t,n=0|n,r||V(this,e,t,n,Math.pow(2,8*n),0);var o=1,i=0;for(this[t]=255&e;++i<n&&(o*=256);)this[t+i]=e/o&255;return t+n},o.prototype.writeUIntBE=function(e,t,n,r){e=+e,t=0|t,n=0|n,r||V(this,e,t,n,Math.pow(2,8*n),0);var o=n-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+n},o.prototype.writeUInt8=function(e,t,n){return e=+e,t=0|t,n||V(this,e,t,1,255,0),o.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},o.prototype.writeUInt16LE=function(e,t,n){return e=+e,t=0|t,n||V(this,e,t,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):U(this,e,t,!0),t+2},o.prototype.writeUInt16BE=function(e,t,n){return e=+e,t=0|t,n||V(this,e,t,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):U(this,e,t,!1),t+2},o.prototype.writeUInt32LE=function(e,t,n){return e=+e,t=0|t,n||V(this,e,t,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):F(this,e,t,!0),t+4},o.prototype.writeUInt32BE=function(e,t,n){return e=+e,t=0|t,n||V(this,e,t,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):F(this,e,t,!1),t+4},o.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t=0|t,!r){var o=Math.pow(2,8*n-1);V(this,e,t,n,o-1,-o)}var i=0,s=1,a=0>e?1:0;for(this[t]=255&e;++i<n&&(s*=256);)this[t+i]=(e/s>>0)-a&255;return t+n},o.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t=0|t,!r){var o=Math.pow(2,8*n-1);V(this,e,t,n,o-1,-o)}var i=n-1,s=1,a=0>e?1:0;for(this[t+i]=255&e;--i>=0&&(s*=256);)this[t+i]=(e/s>>0)-a&255;return t+n},o.prototype.writeInt8=function(e,t,n){return e=+e,t=0|t,n||V(this,e,t,1,127,-128),o.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),0>e&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,n){return e=+e,t=0|t,n||V(this,e,t,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):U(this,e,t,!0),t+2},o.prototype.writeInt16BE=function(e,t,n){return e=+e,t=0|t,n||V(this,e,t,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):U(this,e,t,!1),t+2},o.prototype.writeInt32LE=function(e,t,n){return e=+e,t=0|t,n||V(this,e,t,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):F(this,e,t,!0),t+4},o.prototype.writeInt32BE=function(e,t,n){return e=+e,t=0|t,n||V(this,e,t,4,2147483647,-2147483648),0>e&&(e=4294967295+e+1),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):F(this,e,t,!1),t+4},o.prototype.writeFloatLE=function(e,t,n){return q(this,e,t,!0,n)},o.prototype.writeFloatBE=function(e,t,n){return q(this,e,t,!1,n)},o.prototype.writeDoubleLE=function(e,t,n){return X(this,e,t,!0,n)},o.prototype.writeDoubleBE=function(e,t,n){return X(this,e,t,!1,n)},o.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&n>r&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(0>t)throw new RangeError("targetStart out of bounds");if(0>n||n>=this.length)throw new RangeError("sourceStart out of bounds");if(0>r)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,s=r-n;if(this===e&&t>n&&r>t)for(i=s-1;i>=0;i--)e[i+t]=this[i+n];else if(1e3>s||!o.TYPED_ARRAY_SUPPORT)for(i=0;s>i;i++)e[i+t]=this[i+n];else e._set(this.subarray(n,n+s),t);return s},o.prototype.fill=function(e,t,n){if(e||(e=0),t||(t=0),n||(n=this.length),t>n)throw new RangeError("end < start");if(n!==t&&0!==this.length){if(0>t||t>=this.length)throw new RangeError("start out of bounds");if(0>n||n>this.length)throw new RangeError("end out of bounds");var r;if("number"==typeof e)for(r=t;n>r;r++)this[r]=e;else{var o=Q(e.toString()),i=o.length;for(r=t;n>r;r++)this[r]=o[r%i]}return this}},o.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(o.TYPED_ARRAY_SUPPORT)return new o(this).buffer;for(var e=new Uint8Array(this.length),t=0,n=e.length;n>t;t+=1)e[t]=this[t];return e.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var se=o.prototype;o._augment=function(e){return e.constructor=o,e._isBuffer=!0,e._set=e.set,e.get=se.get,e.set=se.set,e.write=se.write,e.toString=se.toString,e.toLocaleString=se.toString,e.toJSON=se.toJSON,e.equals=se.equals,e.compare=se.compare,e.indexOf=se.indexOf,e.copy=se.copy,e.slice=se.slice,e.readUIntLE=se.readUIntLE,e.readUIntBE=se.readUIntBE,e.readUInt8=se.readUInt8,e.readUInt16LE=se.readUInt16LE,e.readUInt16BE=se.readUInt16BE,e.readUInt32LE=se.readUInt32LE,e.readUInt32BE=se.readUInt32BE,e.readIntLE=se.readIntLE,e.readIntBE=se.readIntBE,e.readInt8=se.readInt8,e.readInt16LE=se.readInt16LE,e.readInt16BE=se.readInt16BE,e.readInt32LE=se.readInt32LE,e.readInt32BE=se.readInt32BE,e.readFloatLE=se.readFloatLE,e.readFloatBE=se.readFloatBE,e.readDoubleLE=se.readDoubleLE,e.readDoubleBE=se.readDoubleBE,e.writeUInt8=se.writeUInt8,e.writeUIntLE=se.writeUIntLE,e.writeUIntBE=se.writeUIntBE,e.writeUInt16LE=se.writeUInt16LE,e.writeUInt16BE=se.writeUInt16BE,e.writeUInt32LE=se.writeUInt32LE,e.writeUInt32BE=se.writeUInt32BE,e.writeIntLE=se.writeIntLE,e.writeIntBE=se.writeIntBE,e.writeInt8=se.writeInt8,e.writeInt16LE=se.writeInt16LE,e.writeInt16BE=se.writeInt16BE,e.writeInt32LE=se.writeInt32LE,e.writeInt32BE=se.writeInt32BE,e.writeFloatLE=se.writeFloatLE,e.writeFloatBE=se.writeFloatBE,e.writeDoubleLE=se.writeDoubleLE,e.writeDoubleBE=se.writeDoubleBE,e.fill=se.fill,e.inspect=se.inspect,e.toArrayBuffer=se.toArrayBuffer,e};var ae=/[^+\/0-9A-Za-z-_]/g}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/buffer/index.js","/node_modules/buffer")},{_process:43,"base64-js":1,buffer:3,ieee754:32,isarray:4}],4:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){var c={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==c.call(e)}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/buffer/node_modules/isarray/index.js","/node_modules/buffer/node_modules/isarray")},{_process:43,buffer:3}],5:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){function f(){var e=d("//f.vimeocdn.com/js/froogaloop2.min.js");return e}var d=e("require-sdk");t.exports=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/common-vimeo/lib/load-api.js","/node_modules/common-vimeo/lib")},{_process:43,buffer:3,"require-sdk":200}],6:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){function c(e){var t=document.getElementById(e);if(!p(t))throw new Error("embed must be an iframe");f(t)}function f(e){d(e)||(e.src+="?api=1&player_id="+e.id)}function d(e){var t="/?api=1&player_id="+e.id;return t=new RegExp(t),t.test(e.src)}function p(e){return e&&"IFRAME"===e.tagName}t.exports=c}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/common-vimeo/lib/prepare-embed.js","/node_modules/common-vimeo/lib")},{_process:43,buffer:3}],7:[function(e,t,n){(function(t,r,o,i,s,a,u,l,c){var f=e("closest"),d=e("event");n.bind=function(e,t,n,r,o){return d.bind(e,n,function(n){var o=n.target||n.srcElement;n.delegateTarget=f(o,t,!0,e),n.delegateTarget&&r.call(e,n)},o)},n.unbind=function(e,t,n,r){d.unbind(e,t,n,r)}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/component-delegate/index.js","/node_modules/component-delegate")},{_process:43,buffer:3,closest:12,event:8}],8:[function(e,t,n){(function(e,t,r,o,i,s,a,u,l){var c=window.addEventListener?"addEventListener":"attachEvent",f=window.removeEventListener?"removeEventListener":"detachEvent",d="addEventListener"!==c?"on":"";n.bind=function(e,t,n,r){return e[c](d+t,n,r||!1),n},n.unbind=function(e,t,n,r){return e[f](d+t,n,r||!1),n}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/component-event/index.js","/node_modules/component-event")},{_process:43,buffer:3}],9:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){function f(e,t){if(!e||1!==e.nodeType)return!1;if(h)return h.call(e,t);for(var n=d.all(t,e.parentNode),r=0;r<n.length;++r)if(n[r]==e)return!0;return!1}var d=e("query"),p=Element.prototype,h=p.matches||p.webkitMatchesSelector||p.mozMatchesSelector||p.msMatchesSelector||p.oMatchesSelector;t.exports=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/component-matches-selector/index.js","/node_modules/component-matches-selector")},{_process:43,buffer:3,query:10}],10:[function(e,t,n){(function(e,r,o,i,s,a,u,l,c){function f(e,t){return t.querySelector(e)}n=t.exports=function(e,t){return t=t||document,f(e,t)},n.all=function(e,t){return t=t||document,t.querySelectorAll(e)},n.engine=function(e){if(!e.one)throw new Error(".one callback required");if(!e.all)throw new Error(".all callback required");return f=e.one,n.all=e.all,n}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/component-query/index.js","/node_modules/component-query")},{_process:43,buffer:3}],11:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){var c=Object.prototype.toString;t.exports=function(e){switch(c.call(e)){case"[object Date]":return"date";case"[object RegExp]":return"regexp";case"[object Arguments]":return"arguments";case"[object Array]":return"array";case"[object Error]":return"error"}return null===e?"null":void 0===e?"undefined":e!==e?"nan":e&&1===e.nodeType?"element":"undefined"!=typeof r&&r.isBuffer(e)?"buffer":(e=e.valueOf?e.valueOf():Object.prototype.valueOf.apply(e),typeof e)}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/component-type/index.js","/node_modules/component-type")},{_process:43,buffer:3}],12:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){var f=e("matches-selector");t.exports=function(e,t,n,r){for(e=n?{parentNode:e}:e,r=r||document;(e=e.parentNode)&&e!==document;){if(f(e,t))return e;if(e===r)return}}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/discore-closest/index.js","/node_modules/discore-closest")},{_process:43,buffer:3,"matches-selector":9}],13:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){function f(e){if(e.classList)return e.classList;var t=e.className.replace(/^\s+|\s+$/g,""),n=t.split(v);return""===n[0]&&n.shift(),n}function d(e,t){if(e.classList)return void e.classList.add(t);var n=f(e),r=y(n,t);~r||n.push(t),e.className=n.join(" ")}function p(e,t){return e.classList?e.classList.contains(t):!!~y(f(e),t)}function h(e,t){if("[object RegExp]"==b.call(t))return m(e,t);if(e.classList)return void e.classList.remove(t);var n=f(e),r=y(n,t);~r&&n.splice(r,1),e.className=n.join(" ")}function m(e,t,n){for(var r=Array.prototype.slice.call(f(e)),o=0;o<r.length;o++)t.test(r[o])&&h(e,r[o])}function g(e,t){return e.classList?e.classList.toggle(t):void(p(e,t)?h(e,t):d(e,t))}var y=e("indexof"),v=/\s+/,b=Object.prototype.toString;t.exports=f,t.exports.add=d,t.exports.contains=p,t.exports.has=p,t.exports.toggle=g,t.exports.remove=h,t.exports.removeMatching=m}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/dom-classes/index.js","/node_modules/dom-classes")},{_process:43,buffer:3,indexof:33}],14:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){function c(e,t,n,r){return!e.addEventListener&&(t="on"+t),(e.addEventListener||e.attachEvent).call(e,t,n,r),n}function f(e,t,n,r){return!e.removeEventListener&&(t="on"+t),
(e.removeEventListener||e.detachEvent).call(e,t,n,r),n}t.exports=c,t.exports.on=c,t.exports.off=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/dom-event/index.js","/node_modules/dom-event")},{_process:43,buffer:3}],15:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){function f(e,t){return p(e,t)}function d(e,t){return f(e,t)[0]}var p=e("qwery");t.exports={one:d,all:f}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/dom-select/fallback.js","/node_modules/dom-select")},{_process:43,buffer:3,qwery:45}],16:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){function f(e,t){return t||(t=document),t.querySelector?t.querySelector(e):p.one(e,t)}function d(e,t){return t||(t=document),t.querySelectorAll?t.querySelectorAll(e):p.all(e,t)}var p=e("./fallback");t.exports=f,t.exports.all=d}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/dom-select/index.js","/node_modules/dom-select")},{"./fallback":15,_process:43,buffer:3}],17:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){function f(e,t){var n;for(n in t)p(e,n,t[n])}function d(e,t){return function(n,r){h(n,e,arguments.length>1?r:t)}}function p(e,t,n){e.style[m("float"==t?"cssFloat":t)]=n}function h(e){return 3==arguments.length?p(e,arguments[1],arguments[2]):f(e,arguments[1])}var m=e("to-camel-case");t.exports=h,t.exports.hide=d("display","none"),t.exports.show=d("display","initial")}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/dom-style/index.js","/node_modules/dom-style")},{_process:43,buffer:3,"to-camel-case":204}],18:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){function f(e,t,n){b(e).appendChild(v(t,n))}function d(e,t){var n=b(arguments[arguments.length-1],e).nextSibling,r=arguments.length>3?arguments[2]:void 0;return null==n?f(e,t,r):void p(e,t,r,n)}function p(e,t){var n=arguments[arguments.length-1],r=arguments.length>3?arguments[2]:void 0;b(e).insertBefore(v(t,r),b(n,e))}function h(e){var t=arguments[arguments.length-1],n=arguments.length>2?arguments[1]:void 0;f(b(t),e,n)}function m(e,t,n,r){b(e).replaceChild(b(v(n,r)),b(t,e))}function g(e,t){var n,r;if(1==arguments.length&&"string"!=typeof e)return e.parentNode.removeChild(e);for(r=arguments.length>1?b.all(t,e):b.all(e),n=r.length;n--;)r[n].parentNode.removeChild(r[n])}function y(e){return function(t,n){Array.isArray(n)||(n=[n]);for(var r=-1,o=n.length,i=Array.prototype.slice.call(arguments);++r<o;)i[1]=n[r],e.apply(void 0,i)}}var v=e("./new-element"),b=e("./select");t.exports={add:y(f),addAfter:y(d),addBefore:y(p),insert:h,replace:m,remove:g}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/dom-tree/index.js","/node_modules/dom-tree")},{"./new-element":19,"./select":20,_process:43,buffer:3}],19:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){function f(e,t){return d(e)?p(e,t):e}function d(e){return"string"==typeof e&&"<"==e.charAt(0)}var p=e("new-element");t.exports=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/dom-tree/new-element.js","/node_modules/dom-tree")},{_process:43,buffer:3,"new-element":42}],20:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){function f(e,t){return Array.isArray(e)&&(e=e[0]),"string"!=typeof e?e:("string"==typeof t&&(t=p(t,document)),p(e,t))}function d(e,t){return Array.isArray(e)&&(e=e[0]),"string"!=typeof e?[e]:("string"==typeof t&&(t=p(t,document)),p.all(e,t))}var p=e("dom-select");t.exports=f,t.exports.all=d}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/dom-tree/select.js","/node_modules/dom-tree")},{_process:43,buffer:3,"dom-select":16}],21:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){function f(e){switch(p(e)){case"checkbox":case"radio":if(e.checked){var t=e.getAttribute("value");return null==t?!0:t}return!1;case"radiogroup":for(var n,r=0;n=e[r];r++)if(n.checked)return n.value;break;case"select":for(var o,r=0;o=e.options[r];r++)if(o.selected)return o.value;break;default:return e.value}}function d(e,t){switch(p(e)){case"checkbox":case"radio":t?e.checked=!0:e.checked=!1;break;case"radiogroup":for(var n,r=0;n=e[r];r++)n.checked=n.value===t;break;case"select":for(var o,r=0;o=e.options[r];r++)o.selected=o.value===t;break;default:e.value=t}}function p(e){var t="array"==h(e)||"object"==h(e);t&&(e=e[0]);var n=e.nodeName.toLowerCase(),r=e.getAttribute("type");return t&&r&&"radio"==r.toLowerCase()?"radiogroup":"input"==n&&r&&"checkbox"==r.toLowerCase()?"checkbox":"input"==n&&r&&"radio"==r.toLowerCase()?"radio":"select"==n?"select":n}var h=e("component-type");t.exports=function(e,t){return 2==arguments.length?d(e,t):f(e)}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/dom-value/index.js","/node_modules/dom-value")},{_process:43,buffer:3,"component-type":11}],22:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){function c(e){if("string"!=typeof e)throw new TypeError("String expected");var t=/<([\w:]+)/.exec(e);if(!t)throw new Error("No elements were generated.");var n=t[1];if("body"==n){var r=document.createElement("html");return r.innerHTML=e,r.removeChild(r.lastChild)}var o=f[n]||f._default,i=o[0],s=o[1],a=o[2],r=document.createElement("div");for(r.innerHTML=s+e+a;i--;)r=r.lastChild;var u=r.children;if(1==u.length)return r.removeChild(u[0]);for(var l=document.createDocumentFragment();u.length;)l.appendChild(r.removeChild(u[0]));return l}t.exports=c;var f={option:[1,'<select multiple="multiple">',"</select>"],optgroup:[1,'<select multiple="multiple">',"</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tbody:[1,"<table>","</table>"],tfoot:[1,"<table>","</table>"],colgroup:[1,"<table>","</table>"],caption:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],th:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],_default:[0,"",""]}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/domify/index.js","/node_modules/domify")},{_process:43,buffer:3}],23:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){function c(e){return function(t,n,r){return 2==arguments.length?t.getAttribute(n):(t.setAttribute(n,r),e)}}t.exports=c}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/domquery/lib/attr.js","/node_modules/domquery/lib")},{_process:43,buffer:3}],24:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){function f(e){return function(t,n){return p(t,e,n)}}function d(e,t,n,r){return 4==arguments.length?y.unbind(e,n,t,r):(r=n,void g.off(e,t,r))}function p(e,t,n,r){return 3==arguments.length&&(r=n),4==arguments.length?y.bind(e,n,t,r):void g.on(e,t,r)}function h(e,t,n){v.on(e,t,n)}function m(e,t,n){v.off(e,t,n)}var g=e("dom-event"),y=e("component-delegate"),v=e("key-event");e("trim");t.exports={change:f("change"),click:f("click"),keydown:f("keydown"),keyup:f("keyup"),keypress:f("keypress"),mousedown:f("mousedown"),mouseover:f("mouseover"),mouseup:f("mouseup"),resize:f("resize"),on:p,off:d,onKey:h,offKey:m}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/domquery/lib/events.js","/node_modules/domquery/lib")},{_process:43,buffer:3,"component-delegate":7,"dom-event":14,"key-event":35,trim:207}],25:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){function f(e){return function(t,n,r){return arguments.length>1?(t.innerHTML=arguments.length>2?d(n,r):n,e):t.innerHTML}}var d=e("format-text");t.exports=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/domquery/lib/html.js","/node_modules/domquery/lib")},{_process:43,buffer:3,"format-text":31}],26:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){function f(e){var t,n,r,o;o="string"==typeof e&&"<"==e.charAt(0)?[b(e,arguments[1])]:"string"==typeof e?Array.prototype.slice.call(_(e,arguments[1])):e==document?[document.documentElement]:1==arguments.length&&Array.isArray(arguments[0])?arguments[0]:Array.prototype.slice.call(arguments),r={addClass:h(y.add,o),removeClass:h(y.remove,o),toggleClass:h(y.toggle,o),show:h(w.show,o),hide:h(w.hide,o),style:h(w,o)};for(t in S)r[t]=h(S[t],o);for(t in v)r[t]=h(v[t],o);return n=g.from(o)(r),n.attr=h(x(n),o),n.classes=h(y,o),n.hasClass=h(y.has,o),n.html=h(C(n),o),n.text=h(P(n),o),n.val=h(M(n),o),n.value=h(M(n),o),n.parent=m(d,o),n.select=m(p,o),n.siblings=m(E,o),n}function d(e,t){return t?T(e,t):e.parentNode}function p(e,t){return f(t,e)}function h(e,t){if(!e)throw new Error("Undefined function.");return function(){var n,r,o,i,o;for(r=t.length,n=-1,i=[void 0].concat(Array.prototype.slice.call(arguments));++n<r;)i[0]=t[n],o=e.apply(void 0,i);return o}}function m(e,t){return function(){for(var n,r,o,i=[],s=[void 0].concat(Array.prototype.slice.call(arguments)),a=t.length,u=-1;++u<a;)if(s[0]=t[u],n=e.apply(void 0,s),Array.isArray(n))for(o=n.length,r=-1;++r<o;)-1==i.indexOf(n[r])&&i.push(n[r]);else n&&-1==i.indexOf(n)&&i.push(n);return f(i)}}var g=e("new-chain"),y=(e("format-text"),e("dom-classes")),v=e("dom-tree"),b=e("new-element"),_=e("dom-select").all,w=e("dom-style"),T=e("discore-closest"),E=e("siblings"),x=e("./attr"),S=e("./events"),C=e("./html"),P=e("./text"),M=e("./value");t.exports=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/domquery/lib/select.js","/node_modules/domquery/lib")},{"./attr":23,"./events":24,"./html":25,"./text":27,"./value":28,_process:43,buffer:3,"discore-closest":12,"dom-classes":13,"dom-select":16,"dom-style":17,"dom-tree":18,"format-text":31,"new-chain":41,"new-element":42,siblings:201}],27:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){function f(e){return function(t,n,r){return arguments.length>1?(t.textContent=arguments.length>2?d(n,r):n,e):t.textContent}}var d=e("format-text");t.exports=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/domquery/lib/text.js","/node_modules/domquery/lib")},{_process:43,buffer:3,"format-text":31}],28:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){function f(e){return function(t,n){return 2==arguments.length?(d(t,n),e):d(t)}}var d=e("dom-value");t.exports=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/domquery/lib/value.js","/node_modules/domquery/lib")},{_process:43,buffer:3,"dom-value":21}],29:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){"use strict";var c=function(t,n,r,o,i,s,a,u){if("production"!==e.env.NODE_ENV&&void 0===n)throw new Error("invariant requires an error message argument");if(!t){var l;if(void 0===n)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[r,o,i,s,a,u],f=0;l=new Error("Invariant Violation: "+n.replace(/%s/g,function(){return c[f++]}))}throw l.framesToPop=1,l}};t.exports=c}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/fbjs/lib/invariant.js","/node_modules/fbjs/lib")},{_process:43,buffer:3}],30:[function(e,t,n){(function(r,o,i,s,a,u,l,c,f){"use strict";function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var p=e("fbjs/lib/invariant"),h="ID_",m=function(){function e(){d(this,e),this._callbacks={},this._isDispatching=!1,this._isHandled={},this._isPending={},this._lastID=1}return e.prototype.register=function(e){var t=h+this._lastID++;return this._callbacks[t]=e,t},e.prototype.unregister=function(e){this._callbacks[e]?void 0:"production"!==r.env.NODE_ENV?p(!1,"Dispatcher.unregister(...): `%s` does not map to a registered callback.",e):p(!1),delete this._callbacks[e]},e.prototype.waitFor=function(e){this._isDispatching?void 0:"production"!==r.env.NODE_ENV?p(!1,"Dispatcher.waitFor(...): Must be invoked while dispatching."):p(!1);for(var t=0;t<e.length;t++){var n=e[t];this._isPending[n]?this._isHandled[n]?void 0:"production"!==r.env.NODE_ENV?p(!1,"Dispatcher.waitFor(...): Circular dependency detected while waiting for `%s`.",n):p(!1):(this._callbacks[n]?void 0:"production"!==r.env.NODE_ENV?p(!1,"Dispatcher.waitFor(...): `%s` does not map to a registered callback.",n):p(!1),this._invokeCallback(n))}},e.prototype.dispatch=function(e){this._isDispatching?"production"!==r.env.NODE_ENV?p(!1,"Dispatch.dispatch(...): Cannot dispatch in the middle of a dispatch."):p(!1):void 0,this._startDispatching(e);try{for(var t in this._callbacks)this._isPending[t]||this._invokeCallback(t)}finally{this._stopDispatching()}},e.prototype.isDispatching=function(){return this._isDispatching},e.prototype._invokeCallback=function(e){this._isPending[e]=!0,this._callbacks[e](this._pendingPayload),this._isHandled[e]=!0},e.prototype._startDispatching=function(e){for(var t in this._callbacks)this._isPending[t]=!1,this._isHandled[t]=!1;this._pendingPayload=e,this._isDispatching=!0},e.prototype._stopDispatching=function(){delete this._pendingPayload,this._isDispatching=!1},e}();t.exports=m}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/flux/lib/Dispatcher.js","/node_modules/flux/lib")},{_process:43,buffer:3,"fbjs/lib/invariant":29}],31:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){function c(e){var t;return t="object"==typeof arguments[1]&&arguments[1]?arguments[1]:Array.prototype.slice.call(arguments,1),String(e).replace(/\{?\{([^{}]+)}}?/g,f(t))}function f(e,t){return function(t,n){return"{{"==t.substring(0,2)&&"}}"==t.substring(t.length-2)?"{"+n+"}":e.hasOwnProperty(n)?"function"==typeof e[n]?e[n]():e[n]:t}}t.exports=c}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/format-text/index.js","/node_modules/format-text")},{_process:43,buffer:3}],32:[function(e,t,n){(function(e,t,r,o,i,s,a,u,l){n.read=function(e,t,n,r,o){var i,s,a=8*o-r-1,u=(1<<a)-1,l=u>>1,c=-7,f=n?o-1:0,d=n?-1:1,p=e[t+f];for(f+=d,i=p&(1<<-c)-1,p>>=-c,c+=a;c>0;i=256*i+e[t+f],f+=d,c-=8);for(s=i&(1<<-c)-1,i>>=-c,c+=r;c>0;s=256*s+e[t+f],f+=d,c-=8);if(0===i)i=1-l;else{if(i===u)return s?NaN:(p?-1:1)*(1/0);s+=Math.pow(2,r),i-=l}return(p?-1:1)*s*Math.pow(2,i-r)},n.write=function(e,t,n,r,o,i){var s,a,u,l=8*i-o-1,c=(1<<l)-1,f=c>>1,d=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:i-1,h=r?1:-1,m=0>t||0===t&&0>1/t?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=c):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),t+=s+f>=1?d/u:d*Math.pow(2,1-f),t*u>=2&&(s++,u/=2),s+f>=c?(a=0,s=c):s+f>=1?(a=(t*u-1)*Math.pow(2,o),s+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,o),s=0));o>=8;e[n+p]=255&a,p+=h,a/=256,o-=8);for(s=s<<o|a,l+=o;l>0;e[n+p]=255&s,p+=h,s/=256,l-=8);e[n+p-h]|=128*m}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/ieee754/index.js","/node_modules/ieee754")},{_process:43,buffer:3}],33:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){var c=[].indexOf;t.exports=function(e,t){if(c)return e.indexOf(t);for(var n=0;n<e.length;++n)if(e[n]===t)return n;return-1}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/indexof/index.js","/node_modules/indexof")},{_process:43,buffer:3}],34:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/inherits/inherits_browser.js","/node_modules/inherits")},{_process:43,buffer:3}],35:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){function f(e,t,n){var r=p(t),o=m.on(e,"keyup",function(e){(e.ctrlKey||void 0)==r.ctrl&&(e.altKey||void 0)==r.alt&&(e.shiftKey||void 0)==r.shift&&h(e.keyCode)==r.key&&n(e)});return n["cb-"+t]=o,n}function d(e,t,n){m.off(e,"keyup",n["cb-"+t])}function p(e){var t={};e=e.split(/[^\w]+/);for(var n,r=e.length;r--;)n=e[r].trim(),"ctrl"!=n?"alt"!=n?"shift"!=n?t.key=n.trim():t.shift=!0:t.alt=!0:t.ctrl=!0;return t}var h=e("keyname-of"),m=e("dom-event");t.exports=f,t.exports.on=f,t.exports.off=d}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/key-event/index.js","/node_modules/key-event")},{_process:43,buffer:3,"dom-event":36,"keyname-of":37}],36:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){function c(e,t,n,r){return(e.addEventListener||e.attachEvent).call(e,t,n,r),n}function f(e,t,n,r){return(e.removeEventListener||e.detachEvent).call(e,t,n,r),n}t.exports=c,t.exports.on=c,t.exports.off=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/key-event/node_modules/dom-event/index.js","/node_modules/key-event/node_modules/dom-event")},{_process:43,buffer:3}],37:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){function f(e){return d[e]||String.fromCharCode(e).toLowerCase()}var d=e("keynames");t.exports=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/keyname-of/index.js","/node_modules/keyname-of")},{_process:43,buffer:3,keynames:38}],38:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){t.exports={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/keynames/index.js","/node_modules/keynames")},{_process:43,buffer:3}],39:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){function c(e,t){for(var n in t)e.setAttribute(n,t[n])}function f(e,t){e.onload=function(){this.onerror=this.onload=null,t(null,e)},e.onerror=function(){this.onerror=this.onload=null,t(new Error("Failed to load "+this.src),e)}}function d(e,t){e.onreadystatechange=function(){("complete"==this.readyState||"loaded"==this.readyState)&&(this.onreadystatechange=null,t(null,e))}}t.exports=function(e,t,n){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("script");"function"==typeof t&&(n=t,t={}),t=t||{},n=n||function(){},o.type=t.type||"text/javascript",o.charset=t.charset||"utf8",o.async="async"in t?!!t.async:!0,o.src=e,t.attrs&&c(o,t.attrs),t.text&&(o.text=""+t.text);var i="onload"in o?f:d;i(o,n),o.onload||f(o,n),r.appendChild(o)}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/load-script/index.js","/node_modules/load-script")},{_process:43,buffer:3}],40:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){"use strict";function c(e,t){if(d)return d.call(e,t);for(var n=e.parentNode.querySelectorAll(t),r=0;r<n.length;r++)if(n[r]==e)return!0;return!1}var f=Element.prototype,d=f.matches||f.matchesSelector||f.webkitMatchesSelector||f.mozMatchesSelector||f.msMatchesSelector||f.oMatchesSelector;t.exports=c}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/matches-selector/index.js","/node_modules/matches-selector")},{_process:43,buffer:3}],41:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){function c(e){return function(){var t,n;for(t=f.apply(void 0,arguments),n=t.length;n--;)e[t[n].name]=t[n].fn;return t.forEach(function(t){e[t.name]=function(){return t.fn.apply(this,arguments),e}}),e}}function f(){var e,t,n,r,o;for(e=Array.prototype.slice.call(arguments),r=[],n=e.length;n--;)if(t=e[n],"function"!=typeof t){if("object"==typeof t)for(o in t)r.push({name:o,fn:t[o]})}else r.push({name:t.name,fn:t});return r}function d(){return c({}).apply(void 0,arguments)}t.exports=d,t.exports.from=c}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/new-chain/index.js","/node_modules/new-chain")},{_process:43,buffer:3}],42:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){function f(e,t){return d(1==arguments.length?e:p(e,t))}var d=e("domify"),p=e("format-text");t.exports=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/new-element/index.js","/node_modules/new-element")},{_process:43,buffer:3,domify:22,"format-text":31}],43:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){function c(){g=!1,h.length?m=h.concat(m):y=-1,m.length&&f()}function f(){if(!g){var e=setTimeout(c);g=!0;for(var t=m.length;t;){for(h=m,m=[];++y<t;)h&&h[y].run();y=-1,t=m.length}h=null,g=!1,clearTimeout(e)}}function d(e,t){this.fun=e,this.array=t}function p(){}var h,e=t.exports={},m=[],g=!1,y=-1;e.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];m.push(new d(e,t)),1!==m.length||g||setTimeout(f,0)},d.prototype.run=function(){this.fun.apply(null,this.array)},e.title="browser",e.browser=!0,e.env={},e.argv=[],e.version="",e.versions={},e.on=p,e.addListener=p,e.once=p,e.off=p,e.removeListener=p,e.removeAllListeners=p,e.emit=p,e.binding=function(e){throw new Error("process.binding is not supported")},e.cwd=function(){return"/"},e.chdir=function(e){throw new Error("process.chdir is not supported")},e.umask=function(){return 0}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/process/browser.js","/node_modules/process")},{_process:43,buffer:3}],44:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){function c(e){function t(e){d(s,e)}function n(e){p(s,e)}function r(e){m(s,e)}function o(e){h(s,e)}function i(){var e=[s];Array.prototype.push.apply(e,arguments),f.apply(void 0,e)}var s=e||function(){arguments.length&&t.apply(void 0,arguments)};return s.subscribers=[],s.subscribersForOnce=[],s.subscribe=t,s.subscribe.once=n,s.unsubscribe=o,s.unsubscribe.once=r,s.publish=i,s}function f(e){var t=Array.prototype.slice.call(arguments,1);e&&e.subscribers&&e.subscribers.length>0&&e.subscribers.forEach(function(e,n){if(e)try{e.apply(void 0,t)}catch(r){setTimeout(function(){throw r},0)}}),e&&e.subscribersForOnce&&e.subscribersForOnce.length>0&&(e.subscribersForOnce.forEach(function(e,n){if(e)try{e.apply(void 0,t)}catch(r){setTimeout(function(){throw r},0)}}),e.subscribersForOnce=[])}function d(e,t){return t?e.subscribers.push(t):!1}function p(e,t){return t?e.subscribersForOnce.push(t):!1}function h(e,t){for(var n=e.subscribers.length;n--;)if(e.subscribers[n]&&e.subscribers[n]==t)return e.subscribers[n]=void 0,n;return!1}function m(e,t){for(var n=e.subscribersForOnce.length;n--;)if(e.subscribersForOnce[n]&&e.subscribersForOnce[n]==t)return e.subscribersForOnce[n]=void 0,n;return!1}t.exports=c}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/pubsub/index.js","/node_modules/pubsub")},{_process:43,buffer:3}],45:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){!function(e,n,r){"undefined"!=typeof t&&t.exports?t.exports=r():"function"==typeof define&&define.amd?define(r):n[e]=r()}("qwery",this,function(){function e(){this.c={}}function t(e){return Y.g(e)||Y.s(e,"(^|\\s+)"+e+"(\\s+|$)",1)}function n(e,t){for(var n=0,r=e.length;r>n;n++)t(e[n])}function r(e){for(var t=[],n=0,r=e.length;r>n;++n)m(e[n])?t=t.concat(e[n]):t[t.length]=e[n];return t}function o(e){for(var t=0,n=e.length,r=[];n>t;t++)r[t]=e[t];return r}function i(e){for(;(e=e.previousSibling)&&1!=e[M];);return e}function s(e){return e.match(X)}function a(e,n,r,o,i,s,a,u,c,f,d){var p,h,m,g,y;if(1!==this[M])return!1;if(n&&"*"!==n&&this[P]&&this[P].toLowerCase()!==n)return!1;if(r&&(h=r.match(R))&&h[1]!==this.id)return!1;if(r&&(y=r.match(D)))for(p=y.length;p--;)if(!t(y[p].slice(1)).test(this.className))return!1;if(c&&v.pseudos[c]&&!v.pseudos[c](this,d))return!1;if(o&&!a){g=this.attributes;for(m in g)if(Object.prototype.hasOwnProperty.call(g,m)&&(g[m].name||m)==i)return this}return o&&!l(s,J(this,i)||"",a)?!1:this}function u(e){return K.g(e)||K.s(e,e.replace(G,"\\$1"))}function l(e,t,n){switch(e){case"=":return t==n;case"^=":return t.match(Q.g("^="+n)||Q.s("^="+n,"^"+u(n),1));case"$=":return t.match(Q.g("$="+n)||Q.s("$="+n,u(n)+"$",1));case"*=":return t.match(Q.g(n)||Q.s(n,u(n),1));case"~=":return t.match(Q.g("~="+n)||Q.s("~="+n,"(?:^|\\s+)"+u(n)+"(?:\\s+|$)",1));case"|=":return t.match(Q.g("|="+n)||Q.s("|="+n,"^"+u(n)+"(-|$)",1))}return 0}function c(e,t){var r,o,i,u,l,c,f,p=[],h=[],m=t,g=$.g(e)||$.s(e,e.split(q)),v=e.match(W);if(!g.length)return p;if(u=(g=g.slice(0)).pop(),g.length&&(i=g[g.length-1].match(O))&&(m=y(t,i[1])),!m)return p;for(c=s(u),l=m!==t&&9!==m[M]&&v&&/^[+~]$/.test(v[v.length-1])?function(e){for(;m=m.nextSibling;)1==m[M]&&(c[1]?c[1]==m[P].toLowerCase():1)&&(e[e.length]=m);return e}([]):m[x](c[1]||"*"),r=0,o=l.length;o>r;r++)(f=a.apply(l[r],c))&&(p[p.length]=f);return g.length?(n(p,function(e){d(e,g,v)&&(h[h.length]=e)}),h):p}function f(e,t,n){if(p(t))return e==t;if(m(t))return!!~r(t).indexOf(e);for(var o,i,u=t.split(",");t=u.pop();)if(o=$.g(t)||$.s(t,t.split(q)),i=t.match(W),o=o.slice(0),a.apply(e,s(o.pop()))&&(!o.length||d(e,o,i,n)))return!0;return!1}function d(e,t,n,r){function o(e,r,u){for(;u=z[n[r]](u,e);)if(p(u)&&a.apply(u,s(t[r]))){if(!r)return u;if(i=o(u,r-1,u))return i}}var i;return(i=o(e,t.length-1,e))&&(!r||Z(i,r))}function p(e,t){return e&&"object"==typeof e&&(t=e[M])&&(1==t||9==t)}function h(e){var t,n,r=[];e:for(t=0;t<e.length;++t){for(n=0;n<r.length;++n)if(r[n]==e[t])continue e;r[r.length]=e[t]}return r}function m(e){return"object"==typeof e&&isFinite(e.length)}function g(e){return e?"string"==typeof e?v(e)[0]:!e[M]&&m(e)?e[0]:e:w}function y(e,t,n){return 9===e[M]?e.getElementById(t):e.ownerDocument&&((n=e.ownerDocument.getElementById(t))&&Z(n,e)&&n||!Z(e,e.ownerDocument)&&_('[id="'+t+'"]',e)[0])}function v(e,t){var n,i,s=g(t);if(!s||!e)return[];if(e===window||p(e))return!t||e!==window&&p(s)&&Z(e,s)?[e]:[];if(e&&m(e))return r(e);if(n=e.match(F)){if(n[1])return(i=y(s,n[1]))?[i]:[];if(n[2])return o(s[x](n[2]));if(ee&&n[3])return o(s[E](n[3]))}return _(e,s)}function b(e,t){return function(n){var r,o;return B.test(n)?void(9!==e[M]&&((o=r=e.getAttribute("id"))||e.setAttribute("id",o="__qwerymeupscotty"),n='[id="'+o+'"]'+n,t(e.parentNode||e,n,!0),r||e.removeAttribute("id"))):void(n.length&&t(e,n,!1))}}var _,w=document,T=w.documentElement,E="getElementsByClassName",x="getElementsByTagName",S="querySelectorAll",C="useNativeQSA",P="tagName",M="nodeType",R=/#([\w\-]+)/,D=/\.[\w\-]+/g,O=/^#([\w\-]+)$/,N=/^\.([\w\-]+)$/,A=/^([\w\-]+)$/,I=/^([\w]+)?\.([\w\-]+)$/,B=/(^|,)\s*[>~+]/,k=/^\s+|\s*([,\s\+\~>]|$)\s*/g,L=/[\s\>\+\~]/,j=/(?![\s\w\-\/\?\&\=\:\.\(\)\!,@#%<>\{\}\$\*\^'"]*\]|[\s\w\+\-]*\))/,G=/([.*+?\^=!:${}()|\[\]\/\\])/g,H=/^(\*|[a-z0-9]+)?(?:([\.\#]+[\w\-\.#]+)?)/,V=/\[([\w\-]+)(?:([\|\^\$\*\~]?\=)['"]?([ \w\-\/\?\&\=\:\.\(\)\!,@#%<>\{\}\$\*\^]+)["']?)?\]/,U=/:([\w\-]+)(\(['"]?([^()]+)['"]?\))?/,F=new RegExp(O.source+"|"+A.source+"|"+N.source),W=new RegExp("("+L.source+")"+j.source,"g"),q=new RegExp(L.source+j.source),X=new RegExp(H.source+"("+V.source+")?("+U.source+")?"),z={" ":function(e){return e&&e!==T&&e.parentNode},">":function(e,t){return e&&e.parentNode==t.parentNode&&e.parentNode},"~":function(e){return e&&e.previousSibling},"+":function(e,t,n,r){return e?(n=i(e))&&(r=i(t))&&n==r&&n:!1}};e.prototype={g:function(e){return this.c[e]||void 0},s:function(e,t,n){return t=n?new RegExp(t):t,this.c[e]=t}};var Y=new e,K=new e,Q=new e,$=new e,Z="compareDocumentPosition"in T?function(e,t){return 16==(16&t.compareDocumentPosition(e))}:"contains"in T?function(e,t){return t=9===t[M]||t==window?T:t,t!==e&&t.contains(e)}:function(e,t){for(;e=e.parentNode;)if(e===t)return 1;return 0},J=function(){var e=w.createElement("p");return(e.innerHTML='<a href="#x">x</a>')&&"#x"!=e.firstChild.getAttribute("href")?function(e,t){return"class"===t?e.className:"href"===t||"src"===t?e.getAttribute(t,2):e.getAttribute(t)}:function(e,t){return e.getAttribute(t)}}(),ee=!!w[E],te=w.querySelector&&w[S],ne=function(e,t){var r,i,s=[];try{return 9!==t[M]&&B.test(e)?(n(r=e.split(","),b(t,function(e,t){i=e[S](t),1==i.length?s[s.length]=i.item(0):i.length&&(s=s.concat(o(i)))})),r.length>1&&s.length>1?h(s):s):o(t[S](e));
}catch(a){}return re(e,t)},re=function(e,r){var o,i,s,a,u,l,f=[];if(e=e.replace(k,"$1"),i=e.match(I)){for(u=t(i[2]),o=r[x](i[1]||"*"),s=0,a=o.length;a>s;s++)u.test(o[s].className)&&(f[f.length]=o[s]);return f}return n(l=e.split(","),b(r,function(e,t,n){for(u=c(t,e),s=0,a=u.length;a>s;s++)(9===e[M]||n||Z(u[s],r))&&(f[f.length]=u[s])})),l.length>1&&f.length>1?h(f):f},oe=function(e){"undefined"!=typeof e[C]&&(_=e[C]&&te?ne:re)};return oe({useNativeQSA:!0}),v.configure=oe,v.uniq=h,v.is=f,v.pseudos={},v})}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/qwery/qwery.js","/node_modules/qwery")},{_process:43,buffer:3}],46:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";var f=e("./focusNode"),d={componentDidMount:function(){this.props.autoFocus&&f(this.getDOMNode())}};t.exports=d}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/AutoFocusMixin.js","/node_modules/react/lib")},{"./focusNode":164,_process:43,buffer:3}],47:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(){var e=window.opera;return"object"==typeof e&&"function"==typeof e.version&&parseInt(e.version(),10)<=12}function d(e){return(e.ctrlKey||e.altKey||e.metaKey)&&!(e.ctrlKey&&e.altKey)}function p(e){switch(e){case k.topCompositionStart:return L.compositionStart;case k.topCompositionEnd:return L.compositionEnd;case k.topCompositionUpdate:return L.compositionUpdate}}function h(e,t){return e===k.topKeyDown&&t.keyCode===R}function m(e,t){switch(e){case k.topKeyUp:return-1!==M.indexOf(t.keyCode);case k.topKeyDown:return t.keyCode!==R;case k.topKeyPress:case k.topMouseDown:case k.topBlur:return!0;default:return!1}}function g(e){var t=e.detail;return"object"==typeof t&&"data"in t?t.data:null}function y(e,t,n,r){var o,i;if(D?o=p(e):G?m(e,r)&&(o=L.compositionEnd):h(e,r)&&(o=L.compositionStart),!o)return null;A&&(G||o!==L.compositionStart?o===L.compositionEnd&&G&&(i=G.getData()):G=x.getPooled(t));var s=S.getPooled(o,n,r);if(i)s.data=i;else{var a=g(r);null!==a&&(s.data=a)}return T.accumulateTwoPhaseDispatches(s),s}function v(e,t){switch(e){case k.topCompositionEnd:return g(t);case k.topKeyPress:var n=t.which;return n!==I?null:(j=!0,B);case k.topTextInput:var r=t.data;return r===B&&j?null:r;default:return null}}function b(e,t){if(G){if(e===k.topCompositionEnd||m(e,t)){var n=G.getData();return x.release(G),G=null,n}return null}switch(e){case k.topPaste:return null;case k.topKeyPress:return t.which&&!d(t)?String.fromCharCode(t.which):null;case k.topCompositionEnd:return A?null:t.data;default:return null}}function _(e,t,n,r){var o;if(o=N?v(e,r):b(e,r),!o)return null;var i=C.getPooled(L.beforeInput,n,r);return i.data=o,T.accumulateTwoPhaseDispatches(i),i}var w=e("./EventConstants"),T=e("./EventPropagators"),E=e("./ExecutionEnvironment"),x=e("./FallbackCompositionState"),S=e("./SyntheticCompositionEvent"),C=e("./SyntheticInputEvent"),P=e("./keyOf"),M=[9,13,27,32],R=229,D=E.canUseDOM&&"CompositionEvent"in window,O=null;E.canUseDOM&&"documentMode"in document&&(O=document.documentMode);var N=E.canUseDOM&&"TextEvent"in window&&!O&&!f(),A=E.canUseDOM&&(!D||O&&O>8&&11>=O),I=32,B=String.fromCharCode(I),k=w.topLevelTypes,L={beforeInput:{phasedRegistrationNames:{bubbled:P({onBeforeInput:null}),captured:P({onBeforeInputCapture:null})},dependencies:[k.topCompositionEnd,k.topKeyPress,k.topTextInput,k.topPaste]},compositionEnd:{phasedRegistrationNames:{bubbled:P({onCompositionEnd:null}),captured:P({onCompositionEndCapture:null})},dependencies:[k.topBlur,k.topCompositionEnd,k.topKeyDown,k.topKeyPress,k.topKeyUp,k.topMouseDown]},compositionStart:{phasedRegistrationNames:{bubbled:P({onCompositionStart:null}),captured:P({onCompositionStartCapture:null})},dependencies:[k.topBlur,k.topCompositionStart,k.topKeyDown,k.topKeyPress,k.topKeyUp,k.topMouseDown]},compositionUpdate:{phasedRegistrationNames:{bubbled:P({onCompositionUpdate:null}),captured:P({onCompositionUpdateCapture:null})},dependencies:[k.topBlur,k.topCompositionUpdate,k.topKeyDown,k.topKeyPress,k.topKeyUp,k.topMouseDown]}},j=!1,G=null,H={eventTypes:L,extractEvents:function(e,t,n,r){return[y(e,t,n,r),_(e,t,n,r)]}};t.exports=H}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/BeforeInputEventPlugin.js","/node_modules/react/lib")},{"./EventConstants":59,"./EventPropagators":64,"./ExecutionEnvironment":65,"./FallbackCompositionState":66,"./SyntheticCompositionEvent":138,"./SyntheticInputEvent":142,"./keyOf":186,_process:43,buffer:3}],48:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){"use strict";function c(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var f={boxFlex:!0,boxFlexGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,strokeDashoffset:!0,strokeOpacity:!0,strokeWidth:!0},d=["Webkit","ms","Moz","O"];Object.keys(f).forEach(function(e){d.forEach(function(t){f[c(t,e)]=f[e]})});var p={background:{backgroundImage:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundColor:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0}},h={isUnitlessNumber:f,shorthandPropertyExpansions:p};t.exports=h}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/CSSProperty.js","/node_modules/react/lib")},{_process:43,buffer:3}],49:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";var f=e("./CSSProperty"),d=e("./ExecutionEnvironment"),p=e("./camelizeStyleName"),h=e("./dangerousStyleValue"),m=e("./hyphenateStyleName"),g=e("./memoizeStringOnly"),y=e("./warning"),v=g(function(e){return m(e)}),b="cssFloat";if(d.canUseDOM&&void 0===document.documentElement.style.cssFloat&&(b="styleFloat"),"production"!==n.env.NODE_ENV)var _=/^(?:webkit|moz|o)[A-Z]/,w=/;\s*$/,T={},E={},x=function(e){T.hasOwnProperty(e)&&T[e]||(T[e]=!0,"production"!==n.env.NODE_ENV?y(!1,"Unsupported style property %s. Did you mean %s?",e,p(e)):null)},S=function(e){T.hasOwnProperty(e)&&T[e]||(T[e]=!0,"production"!==n.env.NODE_ENV?y(!1,"Unsupported vendor-prefixed style property %s. Did you mean %s?",e,e.charAt(0).toUpperCase()+e.slice(1)):null)},C=function(e,t){E.hasOwnProperty(t)&&E[t]||(E[t]=!0,"production"!==n.env.NODE_ENV?y(!1,'Style property values shouldn\'t contain a semicolon. Try "%s: %s" instead.',e,t.replace(w,"")):null)},P=function(e,t){e.indexOf("-")>-1?x(e):_.test(e)?S(e):w.test(t)&&C(e,t)};var M={createMarkupForStyles:function(e){var t="";for(var r in e)if(e.hasOwnProperty(r)){var o=e[r];"production"!==n.env.NODE_ENV&&P(r,o),null!=o&&(t+=v(r)+":",t+=h(r,o)+";")}return t||null},setValueForStyles:function(e,t){var r=e.style;for(var o in t)if(t.hasOwnProperty(o)){"production"!==n.env.NODE_ENV&&P(o,t[o]);var i=h(o,t[o]);if("float"===o&&(o=b),i)r[o]=i;else{var s=f.shorthandPropertyExpansions[o];if(s)for(var a in s)r[a]="";else r[o]=""}}}};t.exports=M}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/CSSPropertyOperations.js","/node_modules/react/lib")},{"./CSSProperty":48,"./ExecutionEnvironment":65,"./camelizeStyleName":153,"./dangerousStyleValue":158,"./hyphenateStyleName":178,"./memoizeStringOnly":188,"./warning":199,_process:43,buffer:3}],50:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(){this._callbacks=null,this._contexts=null}var d=e("./PooledClass"),p=e("./Object.assign"),h=e("./invariant");p(f.prototype,{enqueue:function(e,t){this._callbacks=this._callbacks||[],this._contexts=this._contexts||[],this._callbacks.push(e),this._contexts.push(t)},notifyAll:function(){var e=this._callbacks,t=this._contexts;if(e){"production"!==n.env.NODE_ENV?h(e.length===t.length,"Mismatched list of contexts in callback queue"):h(e.length===t.length),this._callbacks=null,this._contexts=null;for(var r=0,o=e.length;o>r;r++)e[r].call(t[r]);e.length=0,t.length=0}},reset:function(){this._callbacks=null,this._contexts=null},destructor:function(){this.reset()}}),d.addPoolingTo(f),t.exports=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/CallbackQueue.js","/node_modules/react/lib")},{"./Object.assign":71,"./PooledClass":72,"./invariant":180,_process:43,buffer:3}],51:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e){return"SELECT"===e.nodeName||"INPUT"===e.nodeName&&"file"===e.type}function d(e){var t=O.getPooled(k.change,j,e);M.accumulateTwoPhaseDispatches(t),D.batchedUpdates(p,t)}function p(e){P.enqueueEvents(e),P.processEventQueue()}function h(e,t){L=e,j=t,L.attachEvent("onchange",d)}function m(){L&&(L.detachEvent("onchange",d),L=null,j=null)}function g(e,t,n){return e===B.topChange?n:void 0}function y(e,t,n){e===B.topFocus?(m(),h(t,n)):e===B.topBlur&&m()}function v(e,t){L=e,j=t,G=e.value,H=Object.getOwnPropertyDescriptor(e.constructor.prototype,"value"),Object.defineProperty(L,"value",F),L.attachEvent("onpropertychange",_)}function b(){L&&(delete L.value,L.detachEvent("onpropertychange",_),L=null,j=null,G=null,H=null)}function _(e){if("value"===e.propertyName){var t=e.srcElement.value;t!==G&&(G=t,d(e))}}function w(e,t,n){return e===B.topInput?n:void 0}function T(e,t,n){e===B.topFocus?(b(),v(t,n)):e===B.topBlur&&b()}function E(e,t,n){return e!==B.topSelectionChange&&e!==B.topKeyUp&&e!==B.topKeyDown||!L||L.value===G?void 0:(G=L.value,j)}function x(e){return"INPUT"===e.nodeName&&("checkbox"===e.type||"radio"===e.type)}function S(e,t,n){return e===B.topClick?n:void 0}var C=e("./EventConstants"),P=e("./EventPluginHub"),M=e("./EventPropagators"),R=e("./ExecutionEnvironment"),D=e("./ReactUpdates"),O=e("./SyntheticEvent"),N=e("./isEventSupported"),A=e("./isTextInputElement"),I=e("./keyOf"),B=C.topLevelTypes,k={change:{phasedRegistrationNames:{bubbled:I({onChange:null}),captured:I({onChangeCapture:null})},dependencies:[B.topBlur,B.topChange,B.topClick,B.topFocus,B.topInput,B.topKeyDown,B.topKeyUp,B.topSelectionChange]}},L=null,j=null,G=null,H=null,V=!1;R.canUseDOM&&(V=N("change")&&(!("documentMode"in document)||document.documentMode>8));var U=!1;R.canUseDOM&&(U=N("input")&&(!("documentMode"in document)||document.documentMode>9));var F={get:function(){return H.get.call(this)},set:function(e){G=""+e,H.set.call(this,e)}},W={eventTypes:k,extractEvents:function(e,t,n,r){var o,i;if(f(t)?V?o=g:i=y:A(t)?U?o=w:(o=E,i=T):x(t)&&(o=S),o){var s=o(e,t,n);if(s){var a=O.getPooled(k.change,s,r);return M.accumulateTwoPhaseDispatches(a),a}}i&&i(e,t,n)}};t.exports=W}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ChangeEventPlugin.js","/node_modules/react/lib")},{"./EventConstants":59,"./EventPluginHub":61,"./EventPropagators":64,"./ExecutionEnvironment":65,"./ReactUpdates":132,"./SyntheticEvent":140,"./isEventSupported":181,"./isTextInputElement":183,"./keyOf":186,_process:43,buffer:3}],52:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){"use strict";var c=0,f={createReactRootIndex:function(){return c++}};t.exports=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ClientReactRootIndex.js","/node_modules/react/lib")},{_process:43,buffer:3}],53:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e,t,n){e.insertBefore(t,e.childNodes[n]||null)}var d=e("./Danger"),p=e("./ReactMultiChildUpdateTypes"),h=e("./setTextContent"),m=e("./invariant"),g={dangerouslyReplaceNodeWithMarkup:d.dangerouslyReplaceNodeWithMarkup,updateTextContent:h,processUpdates:function(e,t){for(var r,o=null,i=null,s=0;s<e.length;s++)if(r=e[s],r.type===p.MOVE_EXISTING||r.type===p.REMOVE_NODE){var a=r.fromIndex,u=r.parentNode.childNodes[a],l=r.parentID;"production"!==n.env.NODE_ENV?m(u,"processUpdates(): Unable to find child %s of element. This probably means the DOM was unexpectedly mutated (e.g., by the browser), usually due to forgetting a <tbody> when using tables, nesting tags like <form>, <p>, or <a>, or using non-SVG elements in an <svg> parent. Try inspecting the child nodes of the element with React ID `%s`.",a,l):m(u),o=o||{},o[l]=o[l]||[],o[l][a]=u,i=i||[],i.push(u)}var c=d.dangerouslyRenderMarkup(t);if(i)for(var g=0;g<i.length;g++)i[g].parentNode.removeChild(i[g]);for(var y=0;y<e.length;y++)switch(r=e[y],r.type){case p.INSERT_MARKUP:f(r.parentNode,c[r.markupIndex],r.toIndex);break;case p.MOVE_EXISTING:f(r.parentNode,o[r.parentID][r.fromIndex],r.toIndex);break;case p.TEXT_CONTENT:h(r.parentNode,r.textContent);break;case p.REMOVE_NODE:}}};t.exports=g}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/DOMChildrenOperations.js","/node_modules/react/lib")},{"./Danger":56,"./ReactMultiChildUpdateTypes":117,"./invariant":180,"./setTextContent":194,_process:43,buffer:3}],54:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e,t){return(e&t)===t}var d=e("./invariant"),p={MUST_USE_ATTRIBUTE:1,MUST_USE_PROPERTY:2,HAS_SIDE_EFFECTS:4,HAS_BOOLEAN_VALUE:8,HAS_NUMERIC_VALUE:16,HAS_POSITIVE_NUMERIC_VALUE:48,HAS_OVERLOADED_BOOLEAN_VALUE:64,injectDOMPropertyConfig:function(e){var t=e.Properties||{},r=e.DOMAttributeNames||{},o=e.DOMPropertyNames||{},i=e.DOMMutationMethods||{};e.isCustomAttribute&&m._isCustomAttributeFunctions.push(e.isCustomAttribute);for(var s in t){"production"!==n.env.NODE_ENV?d(!m.isStandardName.hasOwnProperty(s),"injectDOMPropertyConfig(...): You're trying to inject DOM property '%s' which has already been injected. You may be accidentally injecting the same DOM property config twice, or you may be injecting two configs that have conflicting property names.",s):d(!m.isStandardName.hasOwnProperty(s)),m.isStandardName[s]=!0;var a=s.toLowerCase();if(m.getPossibleStandardName[a]=s,r.hasOwnProperty(s)){var u=r[s];m.getPossibleStandardName[u]=s,m.getAttributeName[s]=u}else m.getAttributeName[s]=a;m.getPropertyName[s]=o.hasOwnProperty(s)?o[s]:s,i.hasOwnProperty(s)?m.getMutationMethod[s]=i[s]:m.getMutationMethod[s]=null;var l=t[s];m.mustUseAttribute[s]=f(l,p.MUST_USE_ATTRIBUTE),m.mustUseProperty[s]=f(l,p.MUST_USE_PROPERTY),m.hasSideEffects[s]=f(l,p.HAS_SIDE_EFFECTS),m.hasBooleanValue[s]=f(l,p.HAS_BOOLEAN_VALUE),m.hasNumericValue[s]=f(l,p.HAS_NUMERIC_VALUE),m.hasPositiveNumericValue[s]=f(l,p.HAS_POSITIVE_NUMERIC_VALUE),m.hasOverloadedBooleanValue[s]=f(l,p.HAS_OVERLOADED_BOOLEAN_VALUE),"production"!==n.env.NODE_ENV?d(!m.mustUseAttribute[s]||!m.mustUseProperty[s],"DOMProperty: Cannot require using both attribute and property: %s",s):d(!m.mustUseAttribute[s]||!m.mustUseProperty[s]),"production"!==n.env.NODE_ENV?d(m.mustUseProperty[s]||!m.hasSideEffects[s],"DOMProperty: Properties that have side effects must use property: %s",s):d(m.mustUseProperty[s]||!m.hasSideEffects[s]),"production"!==n.env.NODE_ENV?d(!!m.hasBooleanValue[s]+!!m.hasNumericValue[s]+!!m.hasOverloadedBooleanValue[s]<=1,"DOMProperty: Value can be one of boolean, overloaded boolean, or numeric value, but not a combination: %s",s):d(!!m.hasBooleanValue[s]+!!m.hasNumericValue[s]+!!m.hasOverloadedBooleanValue[s]<=1)}}},h={},m={ID_ATTRIBUTE_NAME:"data-reactid",isStandardName:{},getPossibleStandardName:{},getAttributeName:{},getPropertyName:{},getMutationMethod:{},mustUseAttribute:{},mustUseProperty:{},hasSideEffects:{},hasBooleanValue:{},hasNumericValue:{},hasPositiveNumericValue:{},hasOverloadedBooleanValue:{},_isCustomAttributeFunctions:[],isCustomAttribute:function(e){for(var t=0;t<m._isCustomAttributeFunctions.length;t++){var n=m._isCustomAttributeFunctions[t];if(n(e))return!0}return!1},getDefaultValueForProperty:function(e,t){var n,r=h[e];return r||(h[e]=r={}),t in r||(n=document.createElement(e),r[t]=n[t]),r[t]},injection:p};t.exports=m}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/DOMProperty.js","/node_modules/react/lib")},{"./invariant":180,_process:43,buffer:3}],55:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e,t){return null==t||d.hasBooleanValue[e]&&!t||d.hasNumericValue[e]&&isNaN(t)||d.hasPositiveNumericValue[e]&&1>t||d.hasOverloadedBooleanValue[e]&&t===!1}var d=e("./DOMProperty"),p=e("./quoteAttributeValueForBrowser"),h=e("./warning");if("production"!==n.env.NODE_ENV)var m={children:!0,dangerouslySetInnerHTML:!0,key:!0,ref:!0},g={},y=function(e){if(!(m.hasOwnProperty(e)&&m[e]||g.hasOwnProperty(e)&&g[e])){g[e]=!0;var t=e.toLowerCase(),r=d.isCustomAttribute(t)?t:d.getPossibleStandardName.hasOwnProperty(t)?d.getPossibleStandardName[t]:null;"production"!==n.env.NODE_ENV?h(null==r,"Unknown DOM property %s. Did you mean %s?",e,r):null}};var v={createMarkupForID:function(e){return d.ID_ATTRIBUTE_NAME+"="+p(e)},createMarkupForProperty:function(e,t){if(d.isStandardName.hasOwnProperty(e)&&d.isStandardName[e]){if(f(e,t))return"";var r=d.getAttributeName[e];return d.hasBooleanValue[e]||d.hasOverloadedBooleanValue[e]&&t===!0?r:r+"="+p(t)}return d.isCustomAttribute(e)?null==t?"":e+"="+p(t):("production"!==n.env.NODE_ENV&&y(e),null)},setValueForProperty:function(e,t,r){if(d.isStandardName.hasOwnProperty(t)&&d.isStandardName[t]){var o=d.getMutationMethod[t];if(o)o(e,r);else if(f(t,r))this.deleteValueForProperty(e,t);else if(d.mustUseAttribute[t])e.setAttribute(d.getAttributeName[t],""+r);else{var i=d.getPropertyName[t];d.hasSideEffects[t]&&""+e[i]==""+r||(e[i]=r)}}else d.isCustomAttribute(t)?null==r?e.removeAttribute(t):e.setAttribute(t,""+r):"production"!==n.env.NODE_ENV&&y(t)},deleteValueForProperty:function(e,t){if(d.isStandardName.hasOwnProperty(t)&&d.isStandardName[t]){var r=d.getMutationMethod[t];if(r)r(e,void 0);else if(d.mustUseAttribute[t])e.removeAttribute(d.getAttributeName[t]);else{var o=d.getPropertyName[t],i=d.getDefaultValueForProperty(e.nodeName,o);d.hasSideEffects[t]&&""+e[o]===i||(e[o]=i)}}else d.isCustomAttribute(t)?e.removeAttribute(t):"production"!==n.env.NODE_ENV&&y(t)}};t.exports=v}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/DOMPropertyOperations.js","/node_modules/react/lib")},{"./DOMProperty":54,"./quoteAttributeValueForBrowser":192,"./warning":199,_process:43,buffer:3}],56:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e){return e.substring(1,e.indexOf(" "))}var d=e("./ExecutionEnvironment"),p=e("./createNodesFromMarkup"),h=e("./emptyFunction"),m=e("./getMarkupWrap"),g=e("./invariant"),y=/^(<[^ \/>]+)/,v="data-danger-index",b={dangerouslyRenderMarkup:function(e){"production"!==n.env.NODE_ENV?g(d.canUseDOM,"dangerouslyRenderMarkup(...): Cannot render markup in a worker thread. Make sure `window` and `document` are available globally before requiring React when unit testing or use React.renderToString for server rendering."):g(d.canUseDOM);for(var t,r={},o=0;o<e.length;o++)"production"!==n.env.NODE_ENV?g(e[o],"dangerouslyRenderMarkup(...): Missing markup."):g(e[o]),t=f(e[o]),t=m(t)?t:"*",r[t]=r[t]||[],r[t][o]=e[o];var i=[],s=0;for(t in r)if(r.hasOwnProperty(t)){var a,u=r[t];for(a in u)if(u.hasOwnProperty(a)){var l=u[a];u[a]=l.replace(y,"$1 "+v+'="'+a+'" ')}for(var c=p(u.join(""),h),b=0;b<c.length;++b){var _=c[b];_.hasAttribute&&_.hasAttribute(v)?(a=+_.getAttribute(v),_.removeAttribute(v),"production"!==n.env.NODE_ENV?g(!i.hasOwnProperty(a),"Danger: Assigning to an already-occupied result index."):g(!i.hasOwnProperty(a)),i[a]=_,s+=1):"production"!==n.env.NODE_ENV&&console.error("Danger: Discarding unexpected node:",_)}}return"production"!==n.env.NODE_ENV?g(s===i.length,"Danger: Did not assign to every index of resultList."):g(s===i.length),"production"!==n.env.NODE_ENV?g(i.length===e.length,"Danger: Expected markup to render %s nodes, but rendered %s.",e.length,i.length):g(i.length===e.length),i},dangerouslyReplaceNodeWithMarkup:function(e,t){"production"!==n.env.NODE_ENV?g(d.canUseDOM,"dangerouslyReplaceNodeWithMarkup(...): Cannot render markup in a worker thread. Make sure `window` and `document` are available globally before requiring React when unit testing or use React.renderToString for server rendering."):g(d.canUseDOM),"production"!==n.env.NODE_ENV?g(t,"dangerouslyReplaceNodeWithMarkup(...): Missing markup."):g(t),"production"!==n.env.NODE_ENV?g("html"!==e.tagName.toLowerCase(),"dangerouslyReplaceNodeWithMarkup(...): Cannot replace markup of the <html> node. This is because browser quirks make this unreliable and/or slow. If you want to render to the root you must use server rendering. See React.renderToString()."):g("html"!==e.tagName.toLowerCase());var r=p(t,h)[0];e.parentNode.replaceChild(r,e)}};t.exports=b}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/Danger.js","/node_modules/react/lib")},{"./ExecutionEnvironment":65,"./createNodesFromMarkup":157,"./emptyFunction":159,"./getMarkupWrap":172,"./invariant":180,_process:43,buffer:3}],57:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";var f=e("./keyOf"),d=[f({ResponderEventPlugin:null}),f({SimpleEventPlugin:null}),f({TapEventPlugin:null}),f({EnterLeaveEventPlugin:null}),f({ChangeEventPlugin:null}),f({SelectEventPlugin:null}),f({BeforeInputEventPlugin:null}),f({AnalyticsEventPlugin:null}),f({MobileSafariClickEventPlugin:null})];t.exports=d}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/DefaultEventPluginOrder.js","/node_modules/react/lib")},{"./keyOf":186,_process:43,buffer:3}],58:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";var f=e("./EventConstants"),d=e("./EventPropagators"),p=e("./SyntheticMouseEvent"),h=e("./ReactMount"),m=e("./keyOf"),g=f.topLevelTypes,y=h.getFirstReactDOM,v={mouseEnter:{registrationName:m({onMouseEnter:null}),dependencies:[g.topMouseOut,g.topMouseOver]},mouseLeave:{registrationName:m({onMouseLeave:null}),dependencies:[g.topMouseOut,g.topMouseOver]}},b=[null,null],_={eventTypes:v,extractEvents:function(e,t,n,r){if(e===g.topMouseOver&&(r.relatedTarget||r.fromElement))return null;if(e!==g.topMouseOut&&e!==g.topMouseOver)return null;var o;if(t.window===t)o=t;else{var i=t.ownerDocument;o=i?i.defaultView||i.parentWindow:window}var s,a;if(e===g.topMouseOut?(s=t,a=y(r.relatedTarget||r.toElement)||o):(s=o,a=t),s===a)return null;var u=s?h.getID(s):"",l=a?h.getID(a):"",c=p.getPooled(v.mouseLeave,u,r);c.type="mouseleave",c.target=s,c.relatedTarget=a;var f=p.getPooled(v.mouseEnter,l,r);return f.type="mouseenter",f.target=a,f.relatedTarget=s,d.accumulateEnterLeaveDispatches(c,f,u,l),b[0]=c,b[1]=f,b}};t.exports=_}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/EnterLeaveEventPlugin.js","/node_modules/react/lib")},{"./EventConstants":59,"./EventPropagators":64,"./ReactMount":115,"./SyntheticMouseEvent":144,"./keyOf":186,_process:43,buffer:3}],59:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";var f=e("./keyMirror"),d=f({bubbled:null,captured:null}),p=f({topBlur:null,topChange:null,topClick:null,topCompositionEnd:null,topCompositionStart:null,topCompositionUpdate:null,topContextMenu:null,topCopy:null,topCut:null,topDoubleClick:null,topDrag:null,topDragEnd:null,topDragEnter:null,topDragExit:null,topDragLeave:null,topDragOver:null,topDragStart:null,topDrop:null,topError:null,topFocus:null,topInput:null,topKeyDown:null,topKeyPress:null,topKeyUp:null,topLoad:null,topMouseDown:null,topMouseMove:null,topMouseOut:null,topMouseOver:null,topMouseUp:null,topPaste:null,topReset:null,topScroll:null,topSelectionChange:null,topSubmit:null,topTextInput:null,topTouchCancel:null,topTouchEnd:null,topTouchMove:null,topTouchStart:null,topWheel:null}),h={topLevelTypes:p,PropagationPhases:d};t.exports=h}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/EventConstants.js","/node_modules/react/lib")},{"./keyMirror":185,_process:43,buffer:3}],60:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){var f=e("./emptyFunction"),d={listen:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!1),{remove:function(){e.removeEventListener(t,n,!1)}}):e.attachEvent?(e.attachEvent("on"+t,n),{remove:function(){e.detachEvent("on"+t,n)}}):void 0},capture:function(e,t,r){return e.addEventListener?(e.addEventListener(t,r,!0),{remove:function(){e.removeEventListener(t,r,!0)}}):("production"!==n.env.NODE_ENV&&console.error("Attempted to listen to events during the capture phase on a browser that does not support the capture phase. Your application will not receive some events."),{remove:f})},registerDefault:function(){}};t.exports=d}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/EventListener.js","/node_modules/react/lib")},{"./emptyFunction":159,_process:43,buffer:3}],61:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(){var e=_&&_.traverseTwoPhase&&_.traverseEnterLeave;"production"!==n.env.NODE_ENV?g(e,"InstanceHandle not injected before use!"):g(e)}var d=e("./EventPluginRegistry"),p=e("./EventPluginUtils"),h=e("./accumulateInto"),m=e("./forEachAccumulated"),g=e("./invariant"),y={},v=null,b=function(e){if(e){var t=p.executeDispatch,n=d.getPluginModuleForEvent(e);n&&n.executeDispatch&&(t=n.executeDispatch),p.executeDispatchesInOrder(e,t),e.isPersistent()||e.constructor.release(e)}},_=null,w={injection:{injectMount:p.injection.injectMount,injectInstanceHandle:function(e){_=e,"production"!==n.env.NODE_ENV&&f()},getInstanceHandle:function(){return"production"!==n.env.NODE_ENV&&f(),_},injectEventPluginOrder:d.injectEventPluginOrder,injectEventPluginsByName:d.injectEventPluginsByName},eventNameDispatchConfigs:d.eventNameDispatchConfigs,registrationNameModules:d.registrationNameModules,putListener:function(e,t,r){"production"!==n.env.NODE_ENV?g(!r||"function"==typeof r,"Expected %s listener to be a function, instead got type %s",t,typeof r):g(!r||"function"==typeof r);var o=y[t]||(y[t]={});o[e]=r},getListener:function(e,t){var n=y[t];return n&&n[e]},deleteListener:function(e,t){var n=y[t];n&&delete n[e]},deleteAllListeners:function(e){for(var t in y)delete y[t][e]},extractEvents:function(e,t,n,r){for(var o,i=d.plugins,s=0,a=i.length;a>s;s++){var u=i[s];if(u){var l=u.extractEvents(e,t,n,r);l&&(o=h(o,l))}}return o},enqueueEvents:function(e){e&&(v=h(v,e))},processEventQueue:function(){var e=v;v=null,m(e,b),"production"!==n.env.NODE_ENV?g(!v,"processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented."):g(!v)},__purge:function(){y={}},__getListenerBank:function(){return y}};t.exports=w}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/EventPluginHub.js","/node_modules/react/lib")},{"./EventPluginRegistry":62,"./EventPluginUtils":63,"./accumulateInto":150,"./forEachAccumulated":165,"./invariant":180,_process:43,buffer:3}],62:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(){if(m)for(var e in g){var t=g[e],r=m.indexOf(e);if("production"!==n.env.NODE_ENV?h(r>-1,"EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.",e):h(r>-1),!y.plugins[r]){"production"!==n.env.NODE_ENV?h(t.extractEvents,"EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.",e):h(t.extractEvents),y.plugins[r]=t;var o=t.eventTypes;for(var i in o)"production"!==n.env.NODE_ENV?h(d(o[i],t,i),"EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.",i,e):h(d(o[i],t,i))}}}function d(e,t,r){"production"!==n.env.NODE_ENV?h(!y.eventNameDispatchConfigs.hasOwnProperty(r),"EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.",r):h(!y.eventNameDispatchConfigs.hasOwnProperty(r)),y.eventNameDispatchConfigs[r]=e;var o=e.phasedRegistrationNames;if(o){for(var i in o)if(o.hasOwnProperty(i)){var s=o[i];p(s,t,r)}return!0}return e.registrationName?(p(e.registrationName,t,r),!0):!1}function p(e,t,r){"production"!==n.env.NODE_ENV?h(!y.registrationNameModules[e],"EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.",e):h(!y.registrationNameModules[e]),y.registrationNameModules[e]=t,y.registrationNameDependencies[e]=t.eventTypes[r].dependencies}var h=e("./invariant"),m=null,g={},y={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},injectEventPluginOrder:function(e){"production"!==n.env.NODE_ENV?h(!m,"EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React."):h(!m),m=Array.prototype.slice.call(e),f()},injectEventPluginsByName:function(e){var t=!1;for(var r in e)if(e.hasOwnProperty(r)){var o=e[r];g.hasOwnProperty(r)&&g[r]===o||("production"!==n.env.NODE_ENV?h(!g[r],"EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.",r):h(!g[r]),g[r]=o,t=!0)}t&&f()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return y.registrationNameModules[t.registrationName]||null;for(var n in t.phasedRegistrationNames)if(t.phasedRegistrationNames.hasOwnProperty(n)){var r=y.registrationNameModules[t.phasedRegistrationNames[n]];if(r)return r}return null},_resetEventPlugins:function(){m=null;for(var e in g)g.hasOwnProperty(e)&&delete g[e];y.plugins.length=0;var t=y.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var r=y.registrationNameModules;for(var o in r)r.hasOwnProperty(o)&&delete r[o]}};t.exports=y;
}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/EventPluginRegistry.js","/node_modules/react/lib")},{"./invariant":180,_process:43,buffer:3}],63:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e){return e===S.topMouseUp||e===S.topTouchEnd||e===S.topTouchCancel}function d(e){return e===S.topMouseMove||e===S.topTouchMove}function p(e){return e===S.topMouseDown||e===S.topTouchStart}function h(e,t){var r=e._dispatchListeners,o=e._dispatchIDs;if("production"!==n.env.NODE_ENV&&w(e),Array.isArray(r))for(var i=0;i<r.length&&!e.isPropagationStopped();i++)t(e,r[i],o[i]);else r&&t(e,r,o)}function m(e,t,n){e.currentTarget=x.Mount.getNode(n);var r=t(e,n);return e.currentTarget=null,r}function g(e,t){h(e,t),e._dispatchListeners=null,e._dispatchIDs=null}function y(e){var t=e._dispatchListeners,r=e._dispatchIDs;if("production"!==n.env.NODE_ENV&&w(e),Array.isArray(t)){for(var o=0;o<t.length&&!e.isPropagationStopped();o++)if(t[o](e,r[o]))return r[o]}else if(t&&t(e,r))return r;return null}function v(e){var t=y(e);return e._dispatchIDs=null,e._dispatchListeners=null,t}function b(e){"production"!==n.env.NODE_ENV&&w(e);var t=e._dispatchListeners,r=e._dispatchIDs;"production"!==n.env.NODE_ENV?E(!Array.isArray(t),"executeDirectDispatch(...): Invalid `event`."):E(!Array.isArray(t));var o=t?t(e,r):null;return e._dispatchListeners=null,e._dispatchIDs=null,o}function _(e){return!!e._dispatchListeners}var w,T=e("./EventConstants"),E=e("./invariant"),x={Mount:null,injectMount:function(e){x.Mount=e,"production"!==n.env.NODE_ENV&&("production"!==n.env.NODE_ENV?E(e&&e.getNode,"EventPluginUtils.injection.injectMount(...): Injected Mount module is missing getNode."):E(e&&e.getNode))}},S=T.topLevelTypes;"production"!==n.env.NODE_ENV&&(w=function(e){var t=e._dispatchListeners,r=e._dispatchIDs,o=Array.isArray(t),i=Array.isArray(r),s=i?r.length:r?1:0,a=o?t.length:t?1:0;"production"!==n.env.NODE_ENV?E(i===o&&s===a,"EventPluginUtils: Invalid `event`."):E(i===o&&s===a)});var C={isEndish:f,isMoveish:d,isStartish:p,executeDirectDispatch:b,executeDispatch:m,executeDispatchesInOrder:g,executeDispatchesInOrderStopAtTrue:v,hasDispatches:_,injection:x,useTouchEvents:!1};t.exports=C}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/EventPluginUtils.js","/node_modules/react/lib")},{"./EventConstants":59,"./invariant":180,_process:43,buffer:3}],64:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e,t,n){var r=t.dispatchConfig.phasedRegistrationNames[n];return x(e,r)}function d(e,t,r){if("production"!==n.env.NODE_ENV&&!e)throw new Error("Dispatching id must not be null");var o=t?E.bubbled:E.captured,i=f(e,r,o);i&&(r._dispatchListeners=w(r._dispatchListeners,i),r._dispatchIDs=w(r._dispatchIDs,e))}function p(e){e&&e.dispatchConfig.phasedRegistrationNames&&_.injection.getInstanceHandle().traverseTwoPhase(e.dispatchMarker,d,e)}function h(e,t,n){if(n&&n.dispatchConfig.registrationName){var r=n.dispatchConfig.registrationName,o=x(e,r);o&&(n._dispatchListeners=w(n._dispatchListeners,o),n._dispatchIDs=w(n._dispatchIDs,e))}}function m(e){e&&e.dispatchConfig.registrationName&&h(e.dispatchMarker,null,e)}function g(e){T(e,p)}function y(e,t,n,r){_.injection.getInstanceHandle().traverseEnterLeave(n,r,h,e,t)}function v(e){T(e,m)}var b=e("./EventConstants"),_=e("./EventPluginHub"),w=e("./accumulateInto"),T=e("./forEachAccumulated"),E=b.PropagationPhases,x=_.getListener,S={accumulateTwoPhaseDispatches:g,accumulateDirectDispatches:v,accumulateEnterLeaveDispatches:y};t.exports=S}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/EventPropagators.js","/node_modules/react/lib")},{"./EventConstants":59,"./EventPluginHub":61,"./accumulateInto":150,"./forEachAccumulated":165,_process:43,buffer:3}],65:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){"use strict";var c=!("undefined"==typeof window||!window.document||!window.document.createElement),f={canUseDOM:c,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:c&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:c&&!!window.screen,isInWorker:!c};t.exports=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ExecutionEnvironment.js","/node_modules/react/lib")},{_process:43,buffer:3}],66:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e){this._root=e,this._startText=this.getText(),this._fallbackText=null}var d=e("./PooledClass"),p=e("./Object.assign"),h=e("./getTextContentAccessor");p(f.prototype,{getText:function(){return"value"in this._root?this._root.value:this._root[h()]},getData:function(){if(this._fallbackText)return this._fallbackText;var e,t,n=this._startText,r=n.length,o=this.getText(),i=o.length;for(e=0;r>e&&n[e]===o[e];e++);var s=r-e;for(t=1;s>=t&&n[r-t]===o[i-t];t++);var a=t>1?1-t:void 0;return this._fallbackText=o.slice(e,a),this._fallbackText}}),d.addPoolingTo(f),t.exports=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/FallbackCompositionState.js","/node_modules/react/lib")},{"./Object.assign":71,"./PooledClass":72,"./getTextContentAccessor":175,_process:43,buffer:3}],67:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";var f,d=e("./DOMProperty"),p=e("./ExecutionEnvironment"),h=d.injection.MUST_USE_ATTRIBUTE,m=d.injection.MUST_USE_PROPERTY,g=d.injection.HAS_BOOLEAN_VALUE,y=d.injection.HAS_SIDE_EFFECTS,v=d.injection.HAS_NUMERIC_VALUE,b=d.injection.HAS_POSITIVE_NUMERIC_VALUE,_=d.injection.HAS_OVERLOADED_BOOLEAN_VALUE;if(p.canUseDOM){var w=document.implementation;f=w&&w.hasFeature&&w.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")}var T={isCustomAttribute:RegExp.prototype.test.bind(/^(data|aria)-[a-z_][a-z\d_.\-]*$/),Properties:{accept:null,acceptCharset:null,accessKey:null,action:null,allowFullScreen:h|g,allowTransparency:h,alt:null,async:g,autoComplete:null,autoPlay:g,cellPadding:null,cellSpacing:null,charSet:h,checked:m|g,classID:h,className:f?h:m,cols:h|b,colSpan:null,content:null,contentEditable:null,contextMenu:h,controls:m|g,coords:null,crossOrigin:null,data:null,dateTime:h,defer:g,dir:null,disabled:h|g,download:_,draggable:null,encType:null,form:h,formAction:h,formEncType:h,formMethod:h,formNoValidate:g,formTarget:h,frameBorder:h,headers:null,height:h,hidden:h|g,high:null,href:null,hrefLang:null,htmlFor:null,httpEquiv:null,icon:null,id:m,label:null,lang:null,list:h,loop:m|g,low:null,manifest:h,marginHeight:null,marginWidth:null,max:null,maxLength:h,media:h,mediaGroup:null,method:null,min:null,multiple:m|g,muted:m|g,name:null,noValidate:g,open:g,optimum:null,pattern:null,placeholder:null,poster:null,preload:null,radioGroup:null,readOnly:m|g,rel:null,required:g,role:h,rows:h|b,rowSpan:null,sandbox:null,scope:null,scoped:g,scrolling:null,seamless:h|g,selected:m|g,shape:null,size:h|b,sizes:h,span:b,spellCheck:null,src:null,srcDoc:m,srcSet:h,start:v,step:null,style:null,tabIndex:null,target:null,title:null,type:null,useMap:null,value:m|y,width:h,wmode:h,autoCapitalize:null,autoCorrect:null,itemProp:h,itemScope:h|g,itemType:h,itemID:h,itemRef:h,property:null,unselectable:h},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{autoCapitalize:"autocapitalize",autoComplete:"autocomplete",autoCorrect:"autocorrect",autoFocus:"autofocus",autoPlay:"autoplay",encType:"encoding",hrefLang:"hreflang",radioGroup:"radiogroup",spellCheck:"spellcheck",srcDoc:"srcdoc",srcSet:"srcset"}};t.exports=T}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/HTMLDOMPropertyConfig.js","/node_modules/react/lib")},{"./DOMProperty":54,"./ExecutionEnvironment":65,_process:43,buffer:3}],68:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e){"production"!==n.env.NODE_ENV?y(null==e.props.checkedLink||null==e.props.valueLink,"Cannot provide a checkedLink and a valueLink. If you want to use checkedLink, you probably don't want to use valueLink and vice versa."):y(null==e.props.checkedLink||null==e.props.valueLink)}function d(e){f(e),"production"!==n.env.NODE_ENV?y(null==e.props.value&&null==e.props.onChange,"Cannot provide a valueLink and a value or onChange event. If you want to use value or onChange, you probably don't want to use valueLink."):y(null==e.props.value&&null==e.props.onChange)}function p(e){f(e),"production"!==n.env.NODE_ENV?y(null==e.props.checked&&null==e.props.onChange,"Cannot provide a checkedLink and a checked property or onChange event. If you want to use checked or onChange, you probably don't want to use checkedLink"):y(null==e.props.checked&&null==e.props.onChange)}function h(e){this.props.valueLink.requestChange(e.target.value)}function m(e){this.props.checkedLink.requestChange(e.target.checked)}var g=e("./ReactPropTypes"),y=e("./invariant"),v={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0},b={Mixin:{propTypes:{value:function(e,t,n){return!e[t]||v[e.type]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")},checked:function(e,t,n){return!e[t]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")},onChange:g.func}},getValue:function(e){return e.props.valueLink?(d(e),e.props.valueLink.value):e.props.value},getChecked:function(e){return e.props.checkedLink?(p(e),e.props.checkedLink.value):e.props.checked},getOnChange:function(e){return e.props.valueLink?(d(e),h):e.props.checkedLink?(p(e),m):e.props.onChange}};t.exports=b}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/LinkedValueUtils.js","/node_modules/react/lib")},{"./ReactPropTypes":123,"./invariant":180,_process:43,buffer:3}],69:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e){e.remove()}var d=e("./ReactBrowserEventEmitter"),p=e("./accumulateInto"),h=e("./forEachAccumulated"),m=e("./invariant"),g={trapBubbledEvent:function(e,t){"production"!==n.env.NODE_ENV?m(this.isMounted(),"Must be mounted to trap events"):m(this.isMounted());var r=this.getDOMNode();"production"!==n.env.NODE_ENV?m(r,"LocalEventTrapMixin.trapBubbledEvent(...): Requires node to be rendered."):m(r);var o=d.trapBubbledEvent(e,t,r);this._localEventListeners=p(this._localEventListeners,o)},componentWillUnmount:function(){this._localEventListeners&&h(this._localEventListeners,f)}};t.exports=g}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/LocalEventTrapMixin.js","/node_modules/react/lib")},{"./ReactBrowserEventEmitter":75,"./accumulateInto":150,"./forEachAccumulated":165,"./invariant":180,_process:43,buffer:3}],70:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";var f=e("./EventConstants"),d=e("./emptyFunction"),p=f.topLevelTypes,h={eventTypes:null,extractEvents:function(e,t,n,r){if(e===p.topTouchStart){var o=r.target;o&&!o.onclick&&(o.onclick=d)}}};t.exports=h}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/MobileSafariClickEventPlugin.js","/node_modules/react/lib")},{"./EventConstants":59,"./emptyFunction":159,_process:43,buffer:3}],71:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){"use strict";function c(e,t){if(null==e)throw new TypeError("Object.assign target cannot be null or undefined");for(var n=Object(e),r=Object.prototype.hasOwnProperty,o=1;o<arguments.length;o++){var i=arguments[o];if(null!=i){var s=Object(i);for(var a in s)r.call(s,a)&&(n[a]=s[a])}}return n}t.exports=c}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/Object.assign.js","/node_modules/react/lib")},{_process:43,buffer:3}],72:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";var f=e("./invariant"),d=function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)},p=function(e,t){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,e,t),r}return new n(e,t)},h=function(e,t,n){var r=this;if(r.instancePool.length){var o=r.instancePool.pop();return r.call(o,e,t,n),o}return new r(e,t,n)},m=function(e,t,n,r,o){var i=this;if(i.instancePool.length){var s=i.instancePool.pop();return i.call(s,e,t,n,r,o),s}return new i(e,t,n,r,o)},g=function(e){var t=this;"production"!==n.env.NODE_ENV?f(e instanceof t,"Trying to release an instance into a pool of a different type."):f(e instanceof t),e.destructor&&e.destructor(),t.instancePool.length<t.poolSize&&t.instancePool.push(e)},y=10,v=d,b=function(e,t){var n=e;return n.instancePool=[],n.getPooled=t||v,n.poolSize||(n.poolSize=y),n.release=g,n},_={addPoolingTo:b,oneArgumentPooler:d,twoArgumentPooler:p,threeArgumentPooler:h,fiveArgumentPooler:m};t.exports=_}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/PooledClass.js","/node_modules/react/lib")},{"./invariant":180,_process:43,buffer:3}],73:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";var f=e("./EventPluginUtils"),d=e("./ReactChildren"),p=e("./ReactComponent"),h=e("./ReactClass"),m=e("./ReactContext"),g=e("./ReactCurrentOwner"),y=e("./ReactElement"),v=e("./ReactElementValidator"),b=e("./ReactDOM"),_=e("./ReactDOMTextComponent"),w=e("./ReactDefaultInjection"),T=e("./ReactInstanceHandles"),E=e("./ReactMount"),x=e("./ReactPerf"),S=e("./ReactPropTypes"),C=e("./ReactReconciler"),P=e("./ReactServerRendering"),M=e("./Object.assign"),R=e("./findDOMNode"),D=e("./onlyChild");w.inject();var O=y.createElement,N=y.createFactory,A=y.cloneElement;"production"!==n.env.NODE_ENV&&(O=v.createElement,N=v.createFactory,A=v.cloneElement);var I=x.measure("React","render",E.render),B={Children:{map:d.map,forEach:d.forEach,count:d.count,only:D},Component:p,DOM:b,PropTypes:S,initializeTouchEvents:function(e){f.useTouchEvents=e},createClass:h.createClass,createElement:O,cloneElement:A,createFactory:N,createMixin:function(e){return e},constructAndRenderComponent:E.constructAndRenderComponent,constructAndRenderComponentByID:E.constructAndRenderComponentByID,findDOMNode:R,render:I,renderToString:P.renderToString,renderToStaticMarkup:P.renderToStaticMarkup,unmountComponentAtNode:E.unmountComponentAtNode,isValidElement:y.isValidElement,withContext:m.withContext,__spread:M};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({CurrentOwner:g,InstanceHandles:T,Mount:E,Reconciler:C,TextComponent:_}),"production"!==n.env.NODE_ENV){var k=e("./ExecutionEnvironment");if(k.canUseDOM&&window.top===window.self){navigator.userAgent.indexOf("Chrome")>-1&&"undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&console.debug("Download the React DevTools for a better development experience: https://fb.me/react-devtools");for(var L=[Array.isArray,Array.prototype.every,Array.prototype.forEach,Array.prototype.indexOf,Array.prototype.map,Date.now,Function.prototype.bind,Object.keys,String.prototype.split,String.prototype.trim,Object.create,Object.freeze],j=0;j<L.length;j++)if(!L[j]){console.error("One or more ES5 shim/shams expected by React are not available: https://fb.me/react-warning-polyfills");break}}}B.version="0.13.3",t.exports=B}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/React.js","/node_modules/react/lib")},{"./EventPluginUtils":63,"./ExecutionEnvironment":65,"./Object.assign":71,"./ReactChildren":77,"./ReactClass":78,"./ReactComponent":79,"./ReactContext":83,"./ReactCurrentOwner":84,"./ReactDOM":85,"./ReactDOMTextComponent":96,"./ReactDefaultInjection":99,"./ReactElement":102,"./ReactElementValidator":103,"./ReactInstanceHandles":111,"./ReactMount":115,"./ReactPerf":120,"./ReactPropTypes":123,"./ReactReconciler":126,"./ReactServerRendering":129,"./findDOMNode":162,"./onlyChild":189,_process:43,buffer:3}],74:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";var f=e("./findDOMNode"),d={getDOMNode:function(){return f(this)}};t.exports=d}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactBrowserComponentMixin.js","/node_modules/react/lib")},{"./findDOMNode":162,_process:43,buffer:3}],75:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e){return Object.prototype.hasOwnProperty.call(e,E)||(e[E]=w++,b[e[E]]={}),b[e[E]]}var d=e("./EventConstants"),p=e("./EventPluginHub"),h=e("./EventPluginRegistry"),m=e("./ReactEventEmitterMixin"),g=e("./ViewportMetrics"),y=e("./Object.assign"),v=e("./isEventSupported"),b={},_=!1,w=0,T={topBlur:"blur",topChange:"change",topClick:"click",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topScroll:"scroll",topSelectionChange:"selectionchange",topTextInput:"textInput",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topWheel:"wheel"},E="_reactListenersID"+String(Math.random()).slice(2),x=y({},m,{ReactEventListener:null,injection:{injectReactEventListener:function(e){e.setHandleTopLevel(x.handleTopLevel),x.ReactEventListener=e}},setEnabled:function(e){x.ReactEventListener&&x.ReactEventListener.setEnabled(e)},isEnabled:function(){return!(!x.ReactEventListener||!x.ReactEventListener.isEnabled())},listenTo:function(e,t){for(var n=t,r=f(n),o=h.registrationNameDependencies[e],i=d.topLevelTypes,s=0,a=o.length;a>s;s++){var u=o[s];r.hasOwnProperty(u)&&r[u]||(u===i.topWheel?v("wheel")?x.ReactEventListener.trapBubbledEvent(i.topWheel,"wheel",n):v("mousewheel")?x.ReactEventListener.trapBubbledEvent(i.topWheel,"mousewheel",n):x.ReactEventListener.trapBubbledEvent(i.topWheel,"DOMMouseScroll",n):u===i.topScroll?v("scroll",!0)?x.ReactEventListener.trapCapturedEvent(i.topScroll,"scroll",n):x.ReactEventListener.trapBubbledEvent(i.topScroll,"scroll",x.ReactEventListener.WINDOW_HANDLE):u===i.topFocus||u===i.topBlur?(v("focus",!0)?(x.ReactEventListener.trapCapturedEvent(i.topFocus,"focus",n),x.ReactEventListener.trapCapturedEvent(i.topBlur,"blur",n)):v("focusin")&&(x.ReactEventListener.trapBubbledEvent(i.topFocus,"focusin",n),x.ReactEventListener.trapBubbledEvent(i.topBlur,"focusout",n)),r[i.topBlur]=!0,r[i.topFocus]=!0):T.hasOwnProperty(u)&&x.ReactEventListener.trapBubbledEvent(u,T[u],n),r[u]=!0)}},trapBubbledEvent:function(e,t,n){return x.ReactEventListener.trapBubbledEvent(e,t,n)},trapCapturedEvent:function(e,t,n){return x.ReactEventListener.trapCapturedEvent(e,t,n)},ensureScrollValueMonitoring:function(){if(!_){var e=g.refreshScrollValues;x.ReactEventListener.monitorScrollValue(e),_=!0}},eventNameDispatchConfigs:p.eventNameDispatchConfigs,registrationNameModules:p.registrationNameModules,putListener:p.putListener,getListener:p.getListener,deleteListener:p.deleteListener,deleteAllListeners:p.deleteAllListeners});t.exports=x}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactBrowserEventEmitter.js","/node_modules/react/lib")},{"./EventConstants":59,"./EventPluginHub":61,"./EventPluginRegistry":62,"./Object.assign":71,"./ReactEventEmitterMixin":106,"./ViewportMetrics":149,"./isEventSupported":181,_process:43,buffer:3}],76:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";var f=e("./ReactReconciler"),d=e("./flattenChildren"),p=e("./instantiateReactComponent"),h=e("./shouldUpdateReactComponent"),m={instantiateChildren:function(e,t,n){var r=d(e);for(var o in r)if(r.hasOwnProperty(o)){var i=r[o],s=p(i,null);r[o]=s}return r},updateChildren:function(e,t,n,r){var o=d(t);if(!o&&!e)return null;var i;for(i in o)if(o.hasOwnProperty(i)){var s=e&&e[i],a=s&&s._currentElement,u=o[i];if(h(a,u))f.receiveComponent(s,u,n,r),o[i]=s;else{s&&f.unmountComponent(s,i);var l=p(u,null);o[i]=l}}for(i in e)!e.hasOwnProperty(i)||o&&o.hasOwnProperty(i)||f.unmountComponent(e[i]);return o},unmountChildren:function(e){for(var t in e){var n=e[t];f.unmountComponent(n)}}};t.exports=m}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactChildReconciler.js","/node_modules/react/lib")},{"./ReactReconciler":126,"./flattenChildren":163,"./instantiateReactComponent":179,"./shouldUpdateReactComponent":196,_process:43,buffer:3}],77:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e,t){this.forEachFunction=e,this.forEachContext=t}function d(e,t,n,r){var o=e;o.forEachFunction.call(o.forEachContext,t,r)}function p(e,t,n){if(null==e)return e;var r=f.getPooled(t,n);w(e,d,r),f.release(r)}function h(e,t,n){this.mapResult=e,this.mapFunction=t,this.mapContext=n}function m(e,t,r,o){var i=e,s=i.mapResult,a=!s.hasOwnProperty(r);if("production"!==n.env.NODE_ENV&&("production"!==n.env.NODE_ENV?T(a,"ReactChildren.map(...): Encountered two children with the same key, `%s`. Child keys must be unique; when two children share a key, only the first child will be used.",r):null),a){var u=i.mapFunction.call(i.mapContext,t,o);s[r]=u}}function g(e,t,n){if(null==e)return e;var r={},o=h.getPooled(r,t,n);return w(e,m,o),h.release(o),_.create(r)}function y(e,t,n,r){return null}function v(e,t){return w(e,y,null)}var b=e("./PooledClass"),_=e("./ReactFragment"),w=e("./traverseAllChildren"),T=e("./warning"),E=b.twoArgumentPooler,x=b.threeArgumentPooler;b.addPoolingTo(f,E),b.addPoolingTo(h,x);var S={forEach:p,map:g,count:v};t.exports=S}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactChildren.js","/node_modules/react/lib")},{"./PooledClass":72,"./ReactFragment":108,"./traverseAllChildren":198,"./warning":199,_process:43,buffer:3}],78:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e,t,r){for(var o in t)t.hasOwnProperty(o)&&("production"!==n.env.NODE_ENV?A("function"==typeof t[o],"%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.",e.displayName||"ReactClass",P[r],o):null)}function d(e,t){var r=L.hasOwnProperty(t)?L[t]:null;H.hasOwnProperty(t)&&("production"!==n.env.NODE_ENV?D(r===B.OVERRIDE_BASE,"ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.",t):D(r===B.OVERRIDE_BASE)),e.hasOwnProperty(t)&&("production"!==n.env.NODE_ENV?D(r===B.DEFINE_MANY||r===B.DEFINE_MANY_MERGED,"ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",t):D(r===B.DEFINE_MANY||r===B.DEFINE_MANY_MERGED))}function p(e,t){if(t){"production"!==n.env.NODE_ENV?D("function"!=typeof t,"ReactClass: You're attempting to use a component class as a mixin. Instead, just use a regular object."):D("function"!=typeof t),"production"!==n.env.NODE_ENV?D(!T.isValidElement(t),"ReactClass: You're attempting to use a component as a mixin. Instead, just use a regular object."):D(!T.isValidElement(t));var r=e.prototype;t.hasOwnProperty(I)&&j.mixins(e,t.mixins);for(var o in t)if(t.hasOwnProperty(o)&&o!==I){var i=t[o];if(d(r,o),j.hasOwnProperty(o))j[o](e,i);else{var s=L.hasOwnProperty(o),a=r.hasOwnProperty(o),u=i&&i.__reactDontBind,l="function"==typeof i,c=l&&!s&&!a&&!u;if(c)r.__reactAutoBindMap||(r.__reactAutoBindMap={}),r.__reactAutoBindMap[o]=i,r[o]=i;else if(a){var f=L[o];"production"!==n.env.NODE_ENV?D(s&&(f===B.DEFINE_MANY_MERGED||f===B.DEFINE_MANY),"ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.",f,o):D(s&&(f===B.DEFINE_MANY_MERGED||f===B.DEFINE_MANY)),f===B.DEFINE_MANY_MERGED?r[o]=g(r[o],i):f===B.DEFINE_MANY&&(r[o]=y(r[o],i))}else r[o]=i,"production"!==n.env.NODE_ENV&&"function"==typeof i&&t.displayName&&(r[o].displayName=t.displayName+"_"+o)}}}}function h(e,t){if(t)for(var r in t){var o=t[r];if(t.hasOwnProperty(r)){var i=r in j;"production"!==n.env.NODE_ENV?D(!i,'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.',r):D(!i);var s=r in e;"production"!==n.env.NODE_ENV?D(!s,"ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",r):D(!s),e[r]=o}}}function m(e,t){"production"!==n.env.NODE_ENV?D(e&&t&&"object"==typeof e&&"object"==typeof t,"mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects."):D(e&&t&&"object"==typeof e&&"object"==typeof t);for(var r in t)t.hasOwnProperty(r)&&("production"!==n.env.NODE_ENV?D(void 0===e[r],"mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.",r):D(void 0===e[r]),e[r]=t[r]);return e}function g(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);if(null==n)return r;if(null==r)return n;var o={};return m(o,n),m(o,r),o}}function y(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function v(e,t){var r=t.bind(e);if("production"!==n.env.NODE_ENV){r.__reactBoundContext=e,r.__reactBoundMethod=t,r.__reactBoundArguments=null;var o=e.constructor.displayName,i=r.bind;r.bind=function(s){for(var a=[],u=1,l=arguments.length;l>u;u++)a.push(arguments[u]);if(s!==e&&null!==s)"production"!==n.env.NODE_ENV?A(!1,"bind(): React component methods may only be bound to the component instance. See %s",o):null;else if(!a.length)return"production"!==n.env.NODE_ENV?A(!1,"bind(): You are binding a component method to the component. React does this for you automatically in a high-performance way, so you can safely remove this call. See %s",o):null,r;var c=i.apply(r,arguments);return c.__reactBoundContext=e,c.__reactBoundMethod=t,c.__reactBoundArguments=a,c}}return r}function b(e){for(var t in e.__reactAutoBindMap)if(e.__reactAutoBindMap.hasOwnProperty(t)){var n=e.__reactAutoBindMap[t];e[t]=v(e,E.guard(n,e.constructor.displayName+"."+t))}}var _=e("./ReactComponent"),w=e("./ReactCurrentOwner"),T=e("./ReactElement"),E=e("./ReactErrorUtils"),x=e("./ReactInstanceMap"),S=e("./ReactLifeCycle"),C=e("./ReactPropTypeLocations"),P=e("./ReactPropTypeLocationNames"),M=e("./ReactUpdateQueue"),R=e("./Object.assign"),D=e("./invariant"),O=e("./keyMirror"),N=e("./keyOf"),A=e("./warning"),I=N({mixins:null}),B=O({DEFINE_ONCE:null,DEFINE_MANY:null,OVERRIDE_BASE:null,DEFINE_MANY_MERGED:null}),k=[],L={mixins:B.DEFINE_MANY,statics:B.DEFINE_MANY,propTypes:B.DEFINE_MANY,contextTypes:B.DEFINE_MANY,childContextTypes:B.DEFINE_MANY,getDefaultProps:B.DEFINE_MANY_MERGED,getInitialState:B.DEFINE_MANY_MERGED,getChildContext:B.DEFINE_MANY_MERGED,render:B.DEFINE_ONCE,componentWillMount:B.DEFINE_MANY,componentDidMount:B.DEFINE_MANY,componentWillReceiveProps:B.DEFINE_MANY,shouldComponentUpdate:B.DEFINE_ONCE,componentWillUpdate:B.DEFINE_MANY,componentDidUpdate:B.DEFINE_MANY,componentWillUnmount:B.DEFINE_MANY,updateComponent:B.OVERRIDE_BASE},j={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n<t.length;n++)p(e,t[n])},childContextTypes:function(e,t){"production"!==n.env.NODE_ENV&&f(e,t,C.childContext),e.childContextTypes=R({},e.childContextTypes,t)},contextTypes:function(e,t){"production"!==n.env.NODE_ENV&&f(e,t,C.context),e.contextTypes=R({},e.contextTypes,t)},getDefaultProps:function(e,t){e.getDefaultProps?e.getDefaultProps=g(e.getDefaultProps,t):e.getDefaultProps=t},propTypes:function(e,t){"production"!==n.env.NODE_ENV&&f(e,t,C.prop),e.propTypes=R({},e.propTypes,t)},statics:function(e,t){h(e,t)}},G={enumerable:!1,get:function(){var e=this.displayName||this.name||"Component";return"production"!==n.env.NODE_ENV?A(!1,"%s.type is deprecated. Use %s directly to access the class.",e,e):null,Object.defineProperty(this,"type",{value:this}),this}},H={replaceState:function(e,t){M.enqueueReplaceState(this,e),t&&M.enqueueCallback(this,t)},isMounted:function(){if("production"!==n.env.NODE_ENV){var e=w.current;null!==e&&("production"!==n.env.NODE_ENV?A(e._warnedAboutRefsInRender,"%s is accessing isMounted inside its render() function. render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",e.getName()||"A component"):null,e._warnedAboutRefsInRender=!0)}var t=x.get(this);return t&&t!==S.currentlyMountingInstance},setProps:function(e,t){M.enqueueSetProps(this,e),t&&M.enqueueCallback(this,t)},replaceProps:function(e,t){M.enqueueReplaceProps(this,e),t&&M.enqueueCallback(this,t)}},V=function(){};R(V.prototype,_.prototype,H);var U={createClass:function(e){var t=function(e,r){"production"!==n.env.NODE_ENV&&("production"!==n.env.NODE_ENV?A(this instanceof t,"Something is calling a React component directly. Use a factory or JSX instead. See: https://fb.me/react-legacyfactory"):null),this.__reactAutoBindMap&&b(this),this.props=e,this.context=r,this.state=null;var o=this.getInitialState?this.getInitialState():null;
"production"!==n.env.NODE_ENV&&"undefined"==typeof o&&this.getInitialState._isMockFunction&&(o=null),"production"!==n.env.NODE_ENV?D("object"==typeof o&&!Array.isArray(o),"%s.getInitialState(): must return an object or null",t.displayName||"ReactCompositeComponent"):D("object"==typeof o&&!Array.isArray(o)),this.state=o};t.prototype=new V,t.prototype.constructor=t,k.forEach(p.bind(null,t)),p(t,e),t.getDefaultProps&&(t.defaultProps=t.getDefaultProps()),"production"!==n.env.NODE_ENV&&(t.getDefaultProps&&(t.getDefaultProps.isReactClassApproved={}),t.prototype.getInitialState&&(t.prototype.getInitialState.isReactClassApproved={})),"production"!==n.env.NODE_ENV?D(t.prototype.render,"createClass(...): Class specification must implement a `render` method."):D(t.prototype.render),"production"!==n.env.NODE_ENV&&("production"!==n.env.NODE_ENV?A(!t.prototype.componentShouldUpdate,"%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",e.displayName||"A component"):null);for(var r in L)t.prototype[r]||(t.prototype[r]=null);if(t.type=t,"production"!==n.env.NODE_ENV)try{Object.defineProperty(t,"type",G)}catch(o){}return t},injection:{injectMixin:function(e){k.push(e)}}};t.exports=U}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactClass.js","/node_modules/react/lib")},{"./Object.assign":71,"./ReactComponent":79,"./ReactCurrentOwner":84,"./ReactElement":102,"./ReactErrorUtils":105,"./ReactInstanceMap":112,"./ReactLifeCycle":113,"./ReactPropTypeLocationNames":121,"./ReactPropTypeLocations":122,"./ReactUpdateQueue":131,"./invariant":180,"./keyMirror":185,"./keyOf":186,"./warning":199,_process:43,buffer:3}],79:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e,t){this.props=e,this.context=t}var d=e("./ReactUpdateQueue"),p=e("./invariant"),h=e("./warning");if(f.prototype.setState=function(e,t){"production"!==n.env.NODE_ENV?p("object"==typeof e||"function"==typeof e||null==e,"setState(...): takes an object of state variables to update or a function which returns an object of state variables."):p("object"==typeof e||"function"==typeof e||null==e),"production"!==n.env.NODE_ENV&&("production"!==n.env.NODE_ENV?h(null!=e,"setState(...): You passed an undefined or null state object; instead, use forceUpdate()."):null),d.enqueueSetState(this,e),t&&d.enqueueCallback(this,t)},f.prototype.forceUpdate=function(e){d.enqueueForceUpdate(this),e&&d.enqueueCallback(this,e)},"production"!==n.env.NODE_ENV){var m={getDOMNode:["getDOMNode","Use React.findDOMNode(component) instead."],isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceProps:["replaceProps","Instead, call React.render again at the top level."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."],setProps:["setProps","Instead, call React.render again at the top level."]},g=function(e,t){try{Object.defineProperty(f.prototype,e,{get:function(){"production"!==n.env.NODE_ENV?h(!1,"%s(...) is deprecated in plain JavaScript React classes. %s",t[0],t[1]):null}})}catch(r){}};for(var y in m)m.hasOwnProperty(y)&&g(y,m[y])}t.exports=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactComponent.js","/node_modules/react/lib")},{"./ReactUpdateQueue":131,"./invariant":180,"./warning":199,_process:43,buffer:3}],80:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";var f=e("./ReactDOMIDOperations"),d=e("./ReactMount"),p={processChildrenUpdates:f.dangerouslyProcessChildrenUpdates,replaceNodeWithMarkupByID:f.dangerouslyReplaceNodeWithMarkupByID,unmountIDFromEnvironment:function(e){d.purgeID(e)}};t.exports=p}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactComponentBrowserEnvironment.js","/node_modules/react/lib")},{"./ReactDOMIDOperations":89,"./ReactMount":115,_process:43,buffer:3}],81:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";var f=e("./invariant"),d=!1,p={unmountIDFromEnvironment:null,replaceNodeWithMarkupByID:null,processChildrenUpdates:null,injection:{injectEnvironment:function(e){"production"!==n.env.NODE_ENV?f(!d,"ReactCompositeComponent: injectEnvironment() can only be called once."):f(!d),p.unmountIDFromEnvironment=e.unmountIDFromEnvironment,p.replaceNodeWithMarkupByID=e.replaceNodeWithMarkupByID,p.processChildrenUpdates=e.processChildrenUpdates,d=!0}}};t.exports=p}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactComponentEnvironment.js","/node_modules/react/lib")},{"./invariant":180,_process:43,buffer:3}],82:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e){var t=e._currentElement._owner||null;if(t){var n=t.getName();if(n)return" Check the render method of `"+n+"`."}return""}var d=e("./ReactComponentEnvironment"),p=e("./ReactContext"),h=e("./ReactCurrentOwner"),m=e("./ReactElement"),g=e("./ReactElementValidator"),y=e("./ReactInstanceMap"),v=e("./ReactLifeCycle"),b=e("./ReactNativeComponent"),_=e("./ReactPerf"),w=e("./ReactPropTypeLocations"),T=e("./ReactPropTypeLocationNames"),E=e("./ReactReconciler"),x=e("./ReactUpdates"),S=e("./Object.assign"),C=e("./emptyObject"),P=e("./invariant"),M=e("./shouldUpdateReactComponent"),R=e("./warning"),D=1,O={construct:function(e){this._currentElement=e,this._rootNodeID=null,this._instance=null,this._pendingElement=null,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._renderedComponent=null,this._context=null,this._mountOrder=0,this._isTopLevel=!1,this._pendingCallbacks=null},mountComponent:function(e,t,r){this._context=r,this._mountOrder=D++,this._rootNodeID=e;var o=this._processProps(this._currentElement.props),i=this._processContext(this._currentElement._context),s=b.getComponentClassForElement(this._currentElement),a=new s(o,i);"production"!==n.env.NODE_ENV&&("production"!==n.env.NODE_ENV?R(null!=a.render,"%s(...): No `render` method found on the returned component instance: you may have forgotten to define `render` in your component or you may have accidentally tried to render an element whose type is a function that isn't a React component.",s.displayName||s.name||"Component"):null),a.props=o,a.context=i,a.refs=C,this._instance=a,y.set(a,this),"production"!==n.env.NODE_ENV&&this._warnIfContextsDiffer(this._currentElement._context,r),"production"!==n.env.NODE_ENV&&("production"!==n.env.NODE_ENV?R(!a.getInitialState||a.getInitialState.isReactClassApproved,"getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",this.getName()||"a component"):null,"production"!==n.env.NODE_ENV?R(!a.getDefaultProps||a.getDefaultProps.isReactClassApproved,"getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",this.getName()||"a component"):null,"production"!==n.env.NODE_ENV?R(!a.propTypes,"propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.",this.getName()||"a component"):null,"production"!==n.env.NODE_ENV?R(!a.contextTypes,"contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.",this.getName()||"a component"):null,"production"!==n.env.NODE_ENV?R("function"!=typeof a.componentShouldUpdate,"%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",this.getName()||"A component"):null);var u=a.state;void 0===u&&(a.state=u=null),"production"!==n.env.NODE_ENV?P("object"==typeof u&&!Array.isArray(u),"%s.state: must be set to an object or null",this.getName()||"ReactCompositeComponent"):P("object"==typeof u&&!Array.isArray(u)),this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1;var l,c,f=v.currentlyMountingInstance;v.currentlyMountingInstance=this;try{a.componentWillMount&&(a.componentWillMount(),this._pendingStateQueue&&(a.state=this._processPendingState(a.props,a.context))),l=this._getValidatedChildContext(r),c=this._renderValidatedComponent(l)}finally{v.currentlyMountingInstance=f}this._renderedComponent=this._instantiateReactComponent(c,this._currentElement.type);var d=E.mountComponent(this._renderedComponent,e,t,this._mergeChildContext(r,l));return a.componentDidMount&&t.getReactMountReady().enqueue(a.componentDidMount,a),d},unmountComponent:function(){var e=this._instance;if(e.componentWillUnmount){var t=v.currentlyUnmountingInstance;v.currentlyUnmountingInstance=this;try{e.componentWillUnmount()}finally{v.currentlyUnmountingInstance=t}}E.unmountComponent(this._renderedComponent),this._renderedComponent=null,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._pendingCallbacks=null,this._pendingElement=null,this._context=null,this._rootNodeID=null,y.remove(e)},_setPropsInternal:function(e,t){var n=this._pendingElement||this._currentElement;this._pendingElement=m.cloneAndReplaceProps(n,S({},n.props,e)),x.enqueueUpdate(this,t)},_maskContext:function(e){var t=null;if("string"==typeof this._currentElement.type)return C;var n=this._currentElement.type.contextTypes;if(!n)return C;t={};for(var r in n)t[r]=e[r];return t},_processContext:function(e){var t=this._maskContext(e);if("production"!==n.env.NODE_ENV){var r=b.getComponentClassForElement(this._currentElement);r.contextTypes&&this._checkPropTypes(r.contextTypes,t,w.context)}return t},_getValidatedChildContext:function(e){var t=this._instance,r=t.getChildContext&&t.getChildContext();if(r){"production"!==n.env.NODE_ENV?P("object"==typeof t.constructor.childContextTypes,"%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",this.getName()||"ReactCompositeComponent"):P("object"==typeof t.constructor.childContextTypes),"production"!==n.env.NODE_ENV&&this._checkPropTypes(t.constructor.childContextTypes,r,w.childContext);for(var o in r)"production"!==n.env.NODE_ENV?P(o in t.constructor.childContextTypes,'%s.getChildContext(): key "%s" is not defined in childContextTypes.',this.getName()||"ReactCompositeComponent",o):P(o in t.constructor.childContextTypes);return r}return null},_mergeChildContext:function(e,t){return t?S({},e,t):e},_processProps:function(e){if("production"!==n.env.NODE_ENV){var t=b.getComponentClassForElement(this._currentElement);t.propTypes&&this._checkPropTypes(t.propTypes,e,w.prop)}return e},_checkPropTypes:function(e,t,r){var o=this.getName();for(var i in e)if(e.hasOwnProperty(i)){var s;try{"production"!==n.env.NODE_ENV?P("function"==typeof e[i],"%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.",o||"React class",T[r],i):P("function"==typeof e[i]),s=e[i](t,i,o,r)}catch(a){s=a}if(s instanceof Error){var u=f(this);r===w.prop?"production"!==n.env.NODE_ENV?R(!1,"Failed Composite propType: %s%s",s.message,u):null:"production"!==n.env.NODE_ENV?R(!1,"Failed Context Types: %s%s",s.message,u):null}}},receiveComponent:function(e,t,n){var r=this._currentElement,o=this._context;this._pendingElement=null,this.updateComponent(t,r,e,o,n)},performUpdateIfNecessary:function(e){null!=this._pendingElement&&E.receiveComponent(this,this._pendingElement||this._currentElement,e,this._context),(null!==this._pendingStateQueue||this._pendingForceUpdate)&&("production"!==n.env.NODE_ENV&&g.checkAndWarnForMutatedProps(this._currentElement),this.updateComponent(e,this._currentElement,this._currentElement,this._context,this._context))},_warnIfContextsDiffer:function(e,t){e=this._maskContext(e),t=this._maskContext(t);for(var r=Object.keys(t).sort(),o=this.getName()||"ReactCompositeComponent",i=0;i<r.length;i++){var s=r[i];"production"!==n.env.NODE_ENV?R(e[s]===t[s],"owner-based and parent-based contexts differ (values: `%s` vs `%s`) for key (%s) while mounting %s (see: http://fb.me/react-context-by-parent)",e[s],t[s],s,o):null}},updateComponent:function(e,t,r,o,i){var s=this._instance,a=s.context,u=s.props;t!==r&&(a=this._processContext(r._context),u=this._processProps(r.props),"production"!==n.env.NODE_ENV&&null!=i&&this._warnIfContextsDiffer(r._context,i),s.componentWillReceiveProps&&s.componentWillReceiveProps(u,a));var l=this._processPendingState(u,a),c=this._pendingForceUpdate||!s.shouldComponentUpdate||s.shouldComponentUpdate(u,l,a);"production"!==n.env.NODE_ENV&&("production"!==n.env.NODE_ENV?R("undefined"!=typeof c,"%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",this.getName()||"ReactCompositeComponent"):null),c?(this._pendingForceUpdate=!1,this._performComponentUpdate(r,u,l,a,e,i)):(this._currentElement=r,this._context=i,s.props=u,s.state=l,s.context=a)},_processPendingState:function(e,t){var n=this._instance,r=this._pendingStateQueue,o=this._pendingReplaceState;if(this._pendingReplaceState=!1,this._pendingStateQueue=null,!r)return n.state;if(o&&1===r.length)return r[0];for(var i=S({},o?r[0]:n.state),s=o?1:0;s<r.length;s++){var a=r[s];S(i,"function"==typeof a?a.call(n,i,e,t):a)}return i},_performComponentUpdate:function(e,t,n,r,o,i){var s=this._instance,a=s.props,u=s.state,l=s.context;s.componentWillUpdate&&s.componentWillUpdate(t,n,r),this._currentElement=e,this._context=i,s.props=t,s.state=n,s.context=r,this._updateRenderedComponent(o,i),s.componentDidUpdate&&o.getReactMountReady().enqueue(s.componentDidUpdate.bind(s,a,u,l),s)},_updateRenderedComponent:function(e,t){var n=this._renderedComponent,r=n._currentElement,o=this._getValidatedChildContext(),i=this._renderValidatedComponent(o);if(M(r,i))E.receiveComponent(n,i,e,this._mergeChildContext(t,o));else{var s=this._rootNodeID,a=n._rootNodeID;E.unmountComponent(n),this._renderedComponent=this._instantiateReactComponent(i,this._currentElement.type);var u=E.mountComponent(this._renderedComponent,s,e,this._mergeChildContext(t,o));this._replaceNodeWithMarkupByID(a,u)}},_replaceNodeWithMarkupByID:function(e,t){d.replaceNodeWithMarkupByID(e,t)},_renderValidatedComponentWithoutOwnerOrContext:function(){var e=this._instance,t=e.render();return"production"!==n.env.NODE_ENV&&"undefined"==typeof t&&e.render._isMockFunction&&(t=null),t},_renderValidatedComponent:function(e){var t,r=p.current;p.current=this._mergeChildContext(this._currentElement._context,e),h.current=this;try{t=this._renderValidatedComponentWithoutOwnerOrContext()}finally{p.current=r,h.current=null}return"production"!==n.env.NODE_ENV?P(null===t||t===!1||m.isValidElement(t),"%s.render(): A valid ReactComponent must be returned. You may have returned undefined, an array or some other invalid object.",this.getName()||"ReactCompositeComponent"):P(null===t||t===!1||m.isValidElement(t)),t},attachRef:function(e,t){var n=this.getPublicInstance(),r=n.refs===C?n.refs={}:n.refs;r[e]=t.getPublicInstance()},detachRef:function(e){var t=this.getPublicInstance().refs;delete t[e]},getName:function(){var e=this._currentElement.type,t=this._instance&&this._instance.constructor;return e.displayName||t&&t.displayName||e.name||t&&t.name||null},getPublicInstance:function(){return this._instance},_instantiateReactComponent:null};_.measureMethods(O,"ReactCompositeComponent",{mountComponent:"mountComponent",updateComponent:"updateComponent",_renderValidatedComponent:"_renderValidatedComponent"});var N={Mixin:O};t.exports=N}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactCompositeComponent.js","/node_modules/react/lib")},{"./Object.assign":71,"./ReactComponentEnvironment":81,"./ReactContext":83,"./ReactCurrentOwner":84,"./ReactElement":102,"./ReactElementValidator":103,"./ReactInstanceMap":112,"./ReactLifeCycle":113,"./ReactNativeComponent":118,"./ReactPerf":120,"./ReactPropTypeLocationNames":121,"./ReactPropTypeLocations":122,"./ReactReconciler":126,"./ReactUpdates":132,"./emptyObject":160,"./invariant":180,"./shouldUpdateReactComponent":196,"./warning":199,_process:43,buffer:3}],83:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";var f=e("./Object.assign"),d=e("./emptyObject"),p=e("./warning"),h=!1,m={current:d,withContext:function(e,t){"production"!==n.env.NODE_ENV&&("production"!==n.env.NODE_ENV?p(h,"withContext is deprecated and will be removed in a future version. Use a wrapper component with getChildContext instead."):null,h=!0);var r,o=m.current;m.current=f({},o,e);try{r=t()}finally{m.current=o}return r}};t.exports=m}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactContext.js","/node_modules/react/lib")},{"./Object.assign":71,"./emptyObject":160,"./warning":199,_process:43,buffer:3}],84:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){"use strict";var c={current:null};t.exports=c}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactCurrentOwner.js","/node_modules/react/lib")},{_process:43,buffer:3}],85:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e){return"production"!==n.env.NODE_ENV?p.createFactory(e):d.createFactory(e)}var d=e("./ReactElement"),p=e("./ReactElementValidator"),h=e("./mapObject"),m=h({a:"a",abbr:"abbr",address:"address",area:"area",article:"article",aside:"aside",audio:"audio",b:"b",base:"base",bdi:"bdi",bdo:"bdo",big:"big",blockquote:"blockquote",body:"body",br:"br",button:"button",canvas:"canvas",caption:"caption",cite:"cite",code:"code",col:"col",colgroup:"colgroup",data:"data",datalist:"datalist",dd:"dd",del:"del",details:"details",dfn:"dfn",dialog:"dialog",div:"div",dl:"dl",dt:"dt",em:"em",embed:"embed",fieldset:"fieldset",figcaption:"figcaption",figure:"figure",footer:"footer",form:"form",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",head:"head",header:"header",hr:"hr",html:"html",i:"i",iframe:"iframe",img:"img",input:"input",ins:"ins",kbd:"kbd",keygen:"keygen",label:"label",legend:"legend",li:"li",link:"link",main:"main",map:"map",mark:"mark",menu:"menu",menuitem:"menuitem",meta:"meta",meter:"meter",nav:"nav",noscript:"noscript",object:"object",ol:"ol",optgroup:"optgroup",option:"option",output:"output",p:"p",param:"param",picture:"picture",pre:"pre",progress:"progress",q:"q",rp:"rp",rt:"rt",ruby:"ruby",s:"s",samp:"samp",script:"script",section:"section",select:"select",small:"small",source:"source",span:"span",strong:"strong",style:"style",sub:"sub",summary:"summary",sup:"sup",table:"table",tbody:"tbody",td:"td",textarea:"textarea",tfoot:"tfoot",th:"th",thead:"thead",time:"time",title:"title",tr:"tr",track:"track",u:"u",ul:"ul","var":"var",video:"video",wbr:"wbr",circle:"circle",clipPath:"clipPath",defs:"defs",ellipse:"ellipse",g:"g",line:"line",linearGradient:"linearGradient",mask:"mask",path:"path",pattern:"pattern",polygon:"polygon",polyline:"polyline",radialGradient:"radialGradient",rect:"rect",stop:"stop",svg:"svg",text:"text",tspan:"tspan"},f);t.exports=m}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactDOM.js","/node_modules/react/lib")},{"./ReactElement":102,"./ReactElementValidator":103,"./mapObject":187,_process:43,buffer:3}],86:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";var f=e("./AutoFocusMixin"),d=e("./ReactBrowserComponentMixin"),p=e("./ReactClass"),h=e("./ReactElement"),m=e("./keyMirror"),g=h.createFactory("button"),y=m({onClick:!0,onDoubleClick:!0,onMouseDown:!0,onMouseMove:!0,onMouseUp:!0,onClickCapture:!0,onDoubleClickCapture:!0,onMouseDownCapture:!0,onMouseMoveCapture:!0,onMouseUpCapture:!0}),v=p.createClass({displayName:"ReactDOMButton",tagName:"BUTTON",mixins:[f,d],render:function(){var e={};for(var t in this.props)!this.props.hasOwnProperty(t)||this.props.disabled&&y[t]||(e[t]=this.props[t]);return g(e,this.props.children)}});t.exports=v}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactDOMButton.js","/node_modules/react/lib")},{"./AutoFocusMixin":46,"./ReactBrowserComponentMixin":74,"./ReactClass":78,"./ReactElement":102,"./keyMirror":185,_process:43,buffer:3}],87:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e){e&&(null!=e.dangerouslySetInnerHTML&&("production"!==n.env.NODE_ENV?S(null==e.children,"Can only set one of `children` or `props.dangerouslySetInnerHTML`."):S(null==e.children),"production"!==n.env.NODE_ENV?S("object"==typeof e.dangerouslySetInnerHTML&&"__html"in e.dangerouslySetInnerHTML,"`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information."):S("object"==typeof e.dangerouslySetInnerHTML&&"__html"in e.dangerouslySetInnerHTML)),"production"!==n.env.NODE_ENV&&("production"!==n.env.NODE_ENV?M(null==e.innerHTML,"Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."):null,"production"!==n.env.NODE_ENV?M(!e.contentEditable||null==e.children,"A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional."):null),"production"!==n.env.NODE_ENV?S(null==e.style||"object"==typeof e.style,"The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX."):S(null==e.style||"object"==typeof e.style))}function d(e,t,r,o){"production"!==n.env.NODE_ENV&&("production"!==n.env.NODE_ENV?M("onScroll"!==t||C("scroll",!0),"This browser doesn't support the `onScroll` event"):null);var i=_.findReactContainerForID(e);if(i){var s=i.nodeType===I?i.ownerDocument:i;D(t,s)}o.getPutListenerQueue().enqueuePutListener(e,t,r)}function p(e){G.call(j,e)||("production"!==n.env.NODE_ENV?S(L.test(e),"Invalid tag: %s",e):S(L.test(e)),j[e]=!0)}function h(e){p(e),this._tag=e,this._renderedChildren=null,this._previousStyleCopy=null,this._rootNodeID=null}var m=e("./CSSPropertyOperations"),g=e("./DOMProperty"),y=e("./DOMPropertyOperations"),v=e("./ReactBrowserEventEmitter"),b=e("./ReactComponentBrowserEnvironment"),_=e("./ReactMount"),w=e("./ReactMultiChild"),T=e("./ReactPerf"),E=e("./Object.assign"),x=e("./escapeTextContentForBrowser"),S=e("./invariant"),C=e("./isEventSupported"),P=e("./keyOf"),M=e("./warning"),R=v.deleteListener,D=v.listenTo,O=v.registrationNameModules,N={string:!0,number:!0},A=P({style:null}),I=1,B=null,k={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},L=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,j={},G={}.hasOwnProperty;h.displayName="ReactDOMComponent",h.Mixin={construct:function(e){this._currentElement=e},mountComponent:function(e,t,n){this._rootNodeID=e,f(this._currentElement.props);var r=k[this._tag]?"":"</"+this._tag+">";return this._createOpenTagMarkupAndPutListeners(t)+this._createContentMarkup(t,n)+r},_createOpenTagMarkupAndPutListeners:function(e){var t=this._currentElement.props,n="<"+this._tag;for(var r in t)if(t.hasOwnProperty(r)){var o=t[r];if(null!=o)if(O.hasOwnProperty(r))d(this._rootNodeID,r,o,e);else{r===A&&(o&&(o=this._previousStyleCopy=E({},t.style)),o=m.createMarkupForStyles(o));var i=y.createMarkupForProperty(r,o);i&&(n+=" "+i)}}if(e.renderToStaticMarkup)return n+">";var s=y.createMarkupForID(this._rootNodeID);return n+" "+s+">"},_createContentMarkup:function(e,t){var n="";("listing"===this._tag||"pre"===this._tag||"textarea"===this._tag)&&(n="\n");var r=this._currentElement.props,o=r.dangerouslySetInnerHTML;if(null!=o){if(null!=o.__html)return n+o.__html}else{var i=N[typeof r.children]?r.children:null,s=null!=i?null:r.children;if(null!=i)return n+x(i);if(null!=s){var a=this.mountChildren(s,e,t);return n+a.join("")}}return n},receiveComponent:function(e,t,n){var r=this._currentElement;this._currentElement=e,this.updateComponent(t,r,e,n)},updateComponent:function(e,t,n,r){f(this._currentElement.props),this._updateDOMProperties(t.props,e),this._updateDOMChildren(t.props,e,r)},_updateDOMProperties:function(e,t){var n,r,o,i=this._currentElement.props;for(n in e)if(!i.hasOwnProperty(n)&&e.hasOwnProperty(n))if(n===A){var s=this._previousStyleCopy;for(r in s)s.hasOwnProperty(r)&&(o=o||{},o[r]="");this._previousStyleCopy=null}else O.hasOwnProperty(n)?R(this._rootNodeID,n):(g.isStandardName[n]||g.isCustomAttribute(n))&&B.deletePropertyByID(this._rootNodeID,n);for(n in i){var a=i[n],u=n===A?this._previousStyleCopy:e[n];if(i.hasOwnProperty(n)&&a!==u)if(n===A)if(a?a=this._previousStyleCopy=E({},a):this._previousStyleCopy=null,u){for(r in u)!u.hasOwnProperty(r)||a&&a.hasOwnProperty(r)||(o=o||{},o[r]="");for(r in a)a.hasOwnProperty(r)&&u[r]!==a[r]&&(o=o||{},o[r]=a[r])}else o=a;else O.hasOwnProperty(n)?d(this._rootNodeID,n,a,t):(g.isStandardName[n]||g.isCustomAttribute(n))&&B.updatePropertyByID(this._rootNodeID,n,a)}o&&B.updateStylesByID(this._rootNodeID,o)},_updateDOMChildren:function(e,t,n){var r=this._currentElement.props,o=N[typeof e.children]?e.children:null,i=N[typeof r.children]?r.children:null,s=e.dangerouslySetInnerHTML&&e.dangerouslySetInnerHTML.__html,a=r.dangerouslySetInnerHTML&&r.dangerouslySetInnerHTML.__html,u=null!=o?null:e.children,l=null!=i?null:r.children,c=null!=o||null!=s,f=null!=i||null!=a;null!=u&&null==l?this.updateChildren(null,t,n):c&&!f&&this.updateTextContent(""),null!=i?o!==i&&this.updateTextContent(""+i):null!=a?s!==a&&B.updateInnerHTMLByID(this._rootNodeID,a):null!=l&&this.updateChildren(l,t,n)},unmountComponent:function(){this.unmountChildren(),v.deleteAllListeners(this._rootNodeID),b.unmountIDFromEnvironment(this._rootNodeID),this._rootNodeID=null}},T.measureMethods(h,"ReactDOMComponent",{mountComponent:"mountComponent",updateComponent:"updateComponent"}),E(h.prototype,h.Mixin,w.Mixin),h.injection={injectIDOperations:function(e){h.BackendIDOperations=B=e}},t.exports=h}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactDOMComponent.js","/node_modules/react/lib")},{"./CSSPropertyOperations":49,"./DOMProperty":54,"./DOMPropertyOperations":55,"./Object.assign":71,"./ReactBrowserEventEmitter":75,"./ReactComponentBrowserEnvironment":80,"./ReactMount":115,"./ReactMultiChild":116,"./ReactPerf":120,"./escapeTextContentForBrowser":161,"./invariant":180,"./isEventSupported":181,"./keyOf":186,"./warning":199,_process:43,buffer:3}],88:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";var f=e("./EventConstants"),d=e("./LocalEventTrapMixin"),p=e("./ReactBrowserComponentMixin"),h=e("./ReactClass"),m=e("./ReactElement"),g=m.createFactory("form"),y=h.createClass({displayName:"ReactDOMForm",tagName:"FORM",mixins:[p,d],render:function(){return g(this.props)},componentDidMount:function(){this.trapBubbledEvent(f.topLevelTypes.topReset,"reset"),this.trapBubbledEvent(f.topLevelTypes.topSubmit,"submit")}});t.exports=y}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactDOMForm.js","/node_modules/react/lib")},{"./EventConstants":59,"./LocalEventTrapMixin":69,"./ReactBrowserComponentMixin":74,"./ReactClass":78,"./ReactElement":102,_process:43,buffer:3}],89:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";var f=e("./CSSPropertyOperations"),d=e("./DOMChildrenOperations"),p=e("./DOMPropertyOperations"),h=e("./ReactMount"),m=e("./ReactPerf"),g=e("./invariant"),y=e("./setInnerHTML"),v={dangerouslySetInnerHTML:"`dangerouslySetInnerHTML` must be set using `updateInnerHTMLByID()`.",style:"`style` must be set using `updateStylesByID()`."},b={updatePropertyByID:function(e,t,r){var o=h.getNode(e);"production"!==n.env.NODE_ENV?g(!v.hasOwnProperty(t),"updatePropertyByID(...): %s",v[t]):g(!v.hasOwnProperty(t)),null!=r?p.setValueForProperty(o,t,r):p.deleteValueForProperty(o,t)},deletePropertyByID:function(e,t,r){var o=h.getNode(e);"production"!==n.env.NODE_ENV?g(!v.hasOwnProperty(t),"updatePropertyByID(...): %s",v[t]):g(!v.hasOwnProperty(t)),p.deleteValueForProperty(o,t,r)},updateStylesByID:function(e,t){var n=h.getNode(e);f.setValueForStyles(n,t)},updateInnerHTMLByID:function(e,t){var n=h.getNode(e);y(n,t)},updateTextContentByID:function(e,t){var n=h.getNode(e);d.updateTextContent(n,t)},dangerouslyReplaceNodeWithMarkupByID:function(e,t){var n=h.getNode(e);d.dangerouslyReplaceNodeWithMarkup(n,t)},dangerouslyProcessChildrenUpdates:function(e,t){for(var n=0;n<e.length;n++)e[n].parentNode=h.getNode(e[n].parentID);d.processUpdates(e,t)}};m.measureMethods(b,"ReactDOMIDOperations",{updatePropertyByID:"updatePropertyByID",deletePropertyByID:"deletePropertyByID",updateStylesByID:"updateStylesByID",updateInnerHTMLByID:"updateInnerHTMLByID",updateTextContentByID:"updateTextContentByID",dangerouslyReplaceNodeWithMarkupByID:"dangerouslyReplaceNodeWithMarkupByID",dangerouslyProcessChildrenUpdates:"dangerouslyProcessChildrenUpdates"}),t.exports=b}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactDOMIDOperations.js","/node_modules/react/lib")},{"./CSSPropertyOperations":49,"./DOMChildrenOperations":53,"./DOMPropertyOperations":55,"./ReactMount":115,"./ReactPerf":120,"./invariant":180,"./setInnerHTML":193,_process:43,buffer:3}],90:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";var f=e("./EventConstants"),d=e("./LocalEventTrapMixin"),p=e("./ReactBrowserComponentMixin"),h=e("./ReactClass"),m=e("./ReactElement"),g=m.createFactory("iframe"),y=h.createClass({displayName:"ReactDOMIframe",tagName:"IFRAME",mixins:[p,d],render:function(){return g(this.props)},componentDidMount:function(){this.trapBubbledEvent(f.topLevelTypes.topLoad,"load")}});t.exports=y}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactDOMIframe.js","/node_modules/react/lib")},{"./EventConstants":59,"./LocalEventTrapMixin":69,"./ReactBrowserComponentMixin":74,"./ReactClass":78,"./ReactElement":102,_process:43,buffer:3}],91:[function(e,t,n){
(function(n,r,o,i,s,a,u,l,c){"use strict";var f=e("./EventConstants"),d=e("./LocalEventTrapMixin"),p=e("./ReactBrowserComponentMixin"),h=e("./ReactClass"),m=e("./ReactElement"),g=m.createFactory("img"),y=h.createClass({displayName:"ReactDOMImg",tagName:"IMG",mixins:[p,d],render:function(){return g(this.props)},componentDidMount:function(){this.trapBubbledEvent(f.topLevelTypes.topLoad,"load"),this.trapBubbledEvent(f.topLevelTypes.topError,"error")}});t.exports=y}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactDOMImg.js","/node_modules/react/lib")},{"./EventConstants":59,"./LocalEventTrapMixin":69,"./ReactBrowserComponentMixin":74,"./ReactClass":78,"./ReactElement":102,_process:43,buffer:3}],92:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(){this.isMounted()&&this.forceUpdate()}var d=e("./AutoFocusMixin"),p=e("./DOMPropertyOperations"),h=e("./LinkedValueUtils"),m=e("./ReactBrowserComponentMixin"),g=e("./ReactClass"),y=e("./ReactElement"),v=e("./ReactMount"),b=e("./ReactUpdates"),_=e("./Object.assign"),w=e("./invariant"),T=y.createFactory("input"),E={},x=g.createClass({displayName:"ReactDOMInput",tagName:"INPUT",mixins:[d,h.Mixin,m],getInitialState:function(){var e=this.props.defaultValue;return{initialChecked:this.props.defaultChecked||!1,initialValue:null!=e?e:null}},render:function(){var e=_({},this.props);e.defaultChecked=null,e.defaultValue=null;var t=h.getValue(this);e.value=null!=t?t:this.state.initialValue;var n=h.getChecked(this);return e.checked=null!=n?n:this.state.initialChecked,e.onChange=this._handleChange,T(e,this.props.children)},componentDidMount:function(){var e=v.getID(this.getDOMNode());E[e]=this},componentWillUnmount:function(){var e=this.getDOMNode(),t=v.getID(e);delete E[t]},componentDidUpdate:function(e,t,n){var r=this.getDOMNode();null!=this.props.checked&&p.setValueForProperty(r,"checked",this.props.checked||!1);var o=h.getValue(this);null!=o&&p.setValueForProperty(r,"value",""+o)},_handleChange:function(e){var t,r=h.getOnChange(this);r&&(t=r.call(this,e)),b.asap(f,this);var o=this.props.name;if("radio"===this.props.type&&null!=o){for(var i=this.getDOMNode(),s=i;s.parentNode;)s=s.parentNode;for(var a=s.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),u=0,l=a.length;l>u;u++){var c=a[u];if(c!==i&&c.form===i.form){var d=v.getID(c);"production"!==n.env.NODE_ENV?w(d,"ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported."):w(d);var p=E[d];"production"!==n.env.NODE_ENV?w(p,"ReactDOMInput: Unknown radio button ID %s.",d):w(p),b.asap(f,p)}}}return t}});t.exports=x}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactDOMInput.js","/node_modules/react/lib")},{"./AutoFocusMixin":46,"./DOMPropertyOperations":55,"./LinkedValueUtils":68,"./Object.assign":71,"./ReactBrowserComponentMixin":74,"./ReactClass":78,"./ReactElement":102,"./ReactMount":115,"./ReactUpdates":132,"./invariant":180,_process:43,buffer:3}],93:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";var f=e("./ReactBrowserComponentMixin"),d=e("./ReactClass"),p=e("./ReactElement"),h=e("./warning"),m=p.createFactory("option"),g=d.createClass({displayName:"ReactDOMOption",tagName:"OPTION",mixins:[f],componentWillMount:function(){"production"!==n.env.NODE_ENV&&("production"!==n.env.NODE_ENV?h(null==this.props.selected,"Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."):null)},render:function(){return m(this.props,this.props.children)}});t.exports=g}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactDOMOption.js","/node_modules/react/lib")},{"./ReactBrowserComponentMixin":74,"./ReactClass":78,"./ReactElement":102,"./warning":199,_process:43,buffer:3}],94:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(){if(this._pendingUpdate){this._pendingUpdate=!1;var e=m.getValue(this);null!=e&&this.isMounted()&&p(this,e)}}function d(e,t,n){if(null==e[t])return null;if(e.multiple){if(!Array.isArray(e[t]))return new Error("The `"+t+"` prop supplied to <select> must be an array if `multiple` is true.")}else if(Array.isArray(e[t]))return new Error("The `"+t+"` prop supplied to <select> must be a scalar value if `multiple` is false.")}function p(e,t){var n,r,o,i=e.getDOMNode().options;if(e.props.multiple){for(n={},r=0,o=t.length;o>r;r++)n[""+t[r]]=!0;for(r=0,o=i.length;o>r;r++){var s=n.hasOwnProperty(i[r].value);i[r].selected!==s&&(i[r].selected=s)}}else{for(n=""+t,r=0,o=i.length;o>r;r++)if(i[r].value===n)return void(i[r].selected=!0);i.length&&(i[0].selected=!0)}}var h=e("./AutoFocusMixin"),m=e("./LinkedValueUtils"),g=e("./ReactBrowserComponentMixin"),y=e("./ReactClass"),v=e("./ReactElement"),b=e("./ReactUpdates"),_=e("./Object.assign"),w=v.createFactory("select"),T=y.createClass({displayName:"ReactDOMSelect",tagName:"SELECT",mixins:[h,m.Mixin,g],propTypes:{defaultValue:d,value:d},render:function(){var e=_({},this.props);return e.onChange=this._handleChange,e.value=null,w(e,this.props.children)},componentWillMount:function(){this._pendingUpdate=!1},componentDidMount:function(){var e=m.getValue(this);null!=e?p(this,e):null!=this.props.defaultValue&&p(this,this.props.defaultValue)},componentDidUpdate:function(e){var t=m.getValue(this);null!=t?(this._pendingUpdate=!1,p(this,t)):!e.multiple!=!this.props.multiple&&(null!=this.props.defaultValue?p(this,this.props.defaultValue):p(this,this.props.multiple?[]:""))},_handleChange:function(e){var t,n=m.getOnChange(this);return n&&(t=n.call(this,e)),this._pendingUpdate=!0,b.asap(f,this),t}});t.exports=T}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactDOMSelect.js","/node_modules/react/lib")},{"./AutoFocusMixin":46,"./LinkedValueUtils":68,"./Object.assign":71,"./ReactBrowserComponentMixin":74,"./ReactClass":78,"./ReactElement":102,"./ReactUpdates":132,_process:43,buffer:3}],95:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e,t,n,r){return e===n&&t===r}function d(e){var t=document.selection,n=t.createRange(),r=n.text.length,o=n.duplicate();o.moveToElementText(e),o.setEndPoint("EndToStart",n);var i=o.text.length,s=i+r;return{start:i,end:s}}function p(e){var t=window.getSelection&&window.getSelection();if(!t||0===t.rangeCount)return null;var n=t.anchorNode,r=t.anchorOffset,o=t.focusNode,i=t.focusOffset,s=t.getRangeAt(0),a=f(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset),u=a?0:s.toString().length,l=s.cloneRange();l.selectNodeContents(e),l.setEnd(s.startContainer,s.startOffset);var c=f(l.startContainer,l.startOffset,l.endContainer,l.endOffset),d=c?0:l.toString().length,p=d+u,h=document.createRange();h.setStart(n,r),h.setEnd(o,i);var m=h.collapsed;return{start:m?p:d,end:m?d:p}}function h(e,t){var n,r,o=document.selection.createRange().duplicate();"undefined"==typeof t.end?(n=t.start,r=n):t.start>t.end?(n=t.end,r=t.start):(n=t.start,r=t.end),o.moveToElementText(e),o.moveStart("character",n),o.setEndPoint("EndToStart",o),o.moveEnd("character",r-n),o.select()}function m(e,t){if(window.getSelection){var n=window.getSelection(),r=e[v()].length,o=Math.min(t.start,r),i="undefined"==typeof t.end?o:Math.min(t.end,r);if(!n.extend&&o>i){var s=i;i=o,o=s}var a=y(e,o),u=y(e,i);if(a&&u){var l=document.createRange();l.setStart(a.node,a.offset),n.removeAllRanges(),o>i?(n.addRange(l),n.extend(u.node,u.offset)):(l.setEnd(u.node,u.offset),n.addRange(l))}}}var g=e("./ExecutionEnvironment"),y=e("./getNodeForCharacterOffset"),v=e("./getTextContentAccessor"),b=g.canUseDOM&&"selection"in document&&!("getSelection"in window),_={getOffsets:b?d:p,setOffsets:b?h:m};t.exports=_}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactDOMSelection.js","/node_modules/react/lib")},{"./ExecutionEnvironment":65,"./getNodeForCharacterOffset":173,"./getTextContentAccessor":175,_process:43,buffer:3}],96:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";var f=e("./DOMPropertyOperations"),d=e("./ReactComponentBrowserEnvironment"),p=e("./ReactDOMComponent"),h=e("./Object.assign"),m=e("./escapeTextContentForBrowser"),g=function(e){};h(g.prototype,{construct:function(e){this._currentElement=e,this._stringText=""+e,this._rootNodeID=null,this._mountIndex=0},mountComponent:function(e,t,n){this._rootNodeID=e;var r=m(this._stringText);return t.renderToStaticMarkup?r:"<span "+f.createMarkupForID(e)+">"+r+"</span>"},receiveComponent:function(e,t){if(e!==this._currentElement){this._currentElement=e;var n=""+e;n!==this._stringText&&(this._stringText=n,p.BackendIDOperations.updateTextContentByID(this._rootNodeID,n))}},unmountComponent:function(){d.unmountIDFromEnvironment(this._rootNodeID)}}),t.exports=g}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactDOMTextComponent.js","/node_modules/react/lib")},{"./DOMPropertyOperations":55,"./Object.assign":71,"./ReactComponentBrowserEnvironment":80,"./ReactDOMComponent":87,"./escapeTextContentForBrowser":161,_process:43,buffer:3}],97:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(){this.isMounted()&&this.forceUpdate()}var d=e("./AutoFocusMixin"),p=e("./DOMPropertyOperations"),h=e("./LinkedValueUtils"),m=e("./ReactBrowserComponentMixin"),g=e("./ReactClass"),y=e("./ReactElement"),v=e("./ReactUpdates"),b=e("./Object.assign"),_=e("./invariant"),w=e("./warning"),T=y.createFactory("textarea"),E=g.createClass({displayName:"ReactDOMTextarea",tagName:"TEXTAREA",mixins:[d,h.Mixin,m],getInitialState:function(){var e=this.props.defaultValue,t=this.props.children;null!=t&&("production"!==n.env.NODE_ENV&&("production"!==n.env.NODE_ENV?w(!1,"Use the `defaultValue` or `value` props instead of setting children on <textarea>."):null),"production"!==n.env.NODE_ENV?_(null==e,"If you supply `defaultValue` on a <textarea>, do not pass children."):_(null==e),Array.isArray(t)&&("production"!==n.env.NODE_ENV?_(t.length<=1,"<textarea> can only have at most one child."):_(t.length<=1),t=t[0]),e=""+t),null==e&&(e="");var r=h.getValue(this);return{initialValue:""+(null!=r?r:e)}},render:function(){var e=b({},this.props);return"production"!==n.env.NODE_ENV?_(null==e.dangerouslySetInnerHTML,"`dangerouslySetInnerHTML` does not make sense on <textarea>."):_(null==e.dangerouslySetInnerHTML),e.defaultValue=null,e.value=null,e.onChange=this._handleChange,T(e,this.state.initialValue)},componentDidUpdate:function(e,t,n){var r=h.getValue(this);if(null!=r){var o=this.getDOMNode();p.setValueForProperty(o,"value",""+r)}},_handleChange:function(e){var t,n=h.getOnChange(this);return n&&(t=n.call(this,e)),v.asap(f,this),t}});t.exports=E}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactDOMTextarea.js","/node_modules/react/lib")},{"./AutoFocusMixin":46,"./DOMPropertyOperations":55,"./LinkedValueUtils":68,"./Object.assign":71,"./ReactBrowserComponentMixin":74,"./ReactClass":78,"./ReactElement":102,"./ReactUpdates":132,"./invariant":180,"./warning":199,_process:43,buffer:3}],98:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(){this.reinitializeTransaction()}var d=e("./ReactUpdates"),p=e("./Transaction"),h=e("./Object.assign"),m=e("./emptyFunction"),g={initialize:m,close:function(){_.isBatchingUpdates=!1}},y={initialize:m,close:d.flushBatchedUpdates.bind(d)},v=[y,g];h(f.prototype,p.Mixin,{getTransactionWrappers:function(){return v}});var b=new f,_={isBatchingUpdates:!1,batchedUpdates:function(e,t,n,r,o){var i=_.isBatchingUpdates;_.isBatchingUpdates=!0,i?e(t,n,r,o):b.perform(e,null,t,n,r,o)}};t.exports=_}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactDefaultBatchingStrategy.js","/node_modules/react/lib")},{"./Object.assign":71,"./ReactUpdates":132,"./Transaction":148,"./emptyFunction":159,_process:43,buffer:3}],99:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e){return T.createClass({tagName:e.toUpperCase(),render:function(){return new k(e,null,null,null,null,this.props)}})}function d(){if(j.EventEmitter.injectReactEventListener(L),j.EventPluginHub.injectEventPluginOrder(g),j.EventPluginHub.injectInstanceHandle(G),j.EventPluginHub.injectMount(H),j.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:W,EnterLeaveEventPlugin:y,ChangeEventPlugin:h,MobileSafariClickEventPlugin:_,SelectEventPlugin:U,BeforeInputEventPlugin:p}),j.NativeComponent.injectGenericComponentClass(S),j.NativeComponent.injectTextComponentClass(B),j.NativeComponent.injectAutoWrapper(f),j.Class.injectMixin(w),j.NativeComponent.injectComponentClasses({button:C,form:P,iframe:D,img:M,input:O,option:N,select:A,textarea:I,html:X("html"),head:X("head"),body:X("body")}),j.DOMProperty.injectDOMPropertyConfig(b),j.DOMProperty.injectDOMPropertyConfig(q),j.EmptyComponent.injectEmptyComponent("noscript"),j.Updates.injectReconcileTransaction(V),j.Updates.injectBatchingStrategy(x),j.RootIndex.injectCreateReactRootIndex(v.canUseDOM?m.createReactRootIndex:F.createReactRootIndex),j.Component.injectEnvironment(E),j.DOMComponent.injectIDOperations(R),"production"!==n.env.NODE_ENV){var t=v.canUseDOM&&window.location.href||"";if(/[?&]react_perf\b/.test(t)){var r=e("./ReactDefaultPerf");r.start()}}}var p=e("./BeforeInputEventPlugin"),h=e("./ChangeEventPlugin"),m=e("./ClientReactRootIndex"),g=e("./DefaultEventPluginOrder"),y=e("./EnterLeaveEventPlugin"),v=e("./ExecutionEnvironment"),b=e("./HTMLDOMPropertyConfig"),_=e("./MobileSafariClickEventPlugin"),w=e("./ReactBrowserComponentMixin"),T=e("./ReactClass"),E=e("./ReactComponentBrowserEnvironment"),x=e("./ReactDefaultBatchingStrategy"),S=e("./ReactDOMComponent"),C=e("./ReactDOMButton"),P=e("./ReactDOMForm"),M=e("./ReactDOMImg"),R=e("./ReactDOMIDOperations"),D=e("./ReactDOMIframe"),O=e("./ReactDOMInput"),N=e("./ReactDOMOption"),A=e("./ReactDOMSelect"),I=e("./ReactDOMTextarea"),B=e("./ReactDOMTextComponent"),k=e("./ReactElement"),L=e("./ReactEventListener"),j=e("./ReactInjection"),G=e("./ReactInstanceHandles"),H=e("./ReactMount"),V=e("./ReactReconcileTransaction"),U=e("./SelectEventPlugin"),F=e("./ServerReactRootIndex"),W=e("./SimpleEventPlugin"),q=e("./SVGDOMPropertyConfig"),X=e("./createFullPageComponent");t.exports={inject:d}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactDefaultInjection.js","/node_modules/react/lib")},{"./BeforeInputEventPlugin":47,"./ChangeEventPlugin":51,"./ClientReactRootIndex":52,"./DefaultEventPluginOrder":57,"./EnterLeaveEventPlugin":58,"./ExecutionEnvironment":65,"./HTMLDOMPropertyConfig":67,"./MobileSafariClickEventPlugin":70,"./ReactBrowserComponentMixin":74,"./ReactClass":78,"./ReactComponentBrowserEnvironment":80,"./ReactDOMButton":86,"./ReactDOMComponent":87,"./ReactDOMForm":88,"./ReactDOMIDOperations":89,"./ReactDOMIframe":90,"./ReactDOMImg":91,"./ReactDOMInput":92,"./ReactDOMOption":93,"./ReactDOMSelect":94,"./ReactDOMTextComponent":96,"./ReactDOMTextarea":97,"./ReactDefaultBatchingStrategy":98,"./ReactDefaultPerf":100,"./ReactElement":102,"./ReactEventListener":107,"./ReactInjection":109,"./ReactInstanceHandles":111,"./ReactMount":115,"./ReactReconcileTransaction":125,"./SVGDOMPropertyConfig":133,"./SelectEventPlugin":134,"./ServerReactRootIndex":135,"./SimpleEventPlugin":136,"./createFullPageComponent":156,_process:43,buffer:3}],100:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e){return Math.floor(100*e)/100}function d(e,t,n){e[t]=(e[t]||0)+n}var p=e("./DOMProperty"),h=e("./ReactDefaultPerfAnalysis"),m=e("./ReactMount"),g=e("./ReactPerf"),y=e("./performanceNow"),v={_allMeasurements:[],_mountStack:[0],_injected:!1,start:function(){v._injected||g.injection.injectMeasure(v.measure),v._allMeasurements.length=0,g.enableMeasure=!0},stop:function(){g.enableMeasure=!1},getLastMeasurements:function(){return v._allMeasurements},printExclusive:function(e){e=e||v._allMeasurements;var t=h.getExclusiveSummary(e);console.table(t.map(function(e){return{"Component class name":e.componentName,"Total inclusive time (ms)":f(e.inclusive),"Exclusive mount time (ms)":f(e.exclusive),"Exclusive render time (ms)":f(e.render),"Mount time per instance (ms)":f(e.exclusive/e.count),"Render time per instance (ms)":f(e.render/e.count),Instances:e.count}}))},printInclusive:function(e){e=e||v._allMeasurements;var t=h.getInclusiveSummary(e);console.table(t.map(function(e){return{"Owner > component":e.componentName,"Inclusive time (ms)":f(e.time),Instances:e.count}})),console.log("Total time:",h.getTotalTime(e).toFixed(2)+" ms")},getMeasurementsSummaryMap:function(e){var t=h.getInclusiveSummary(e,!0);return t.map(function(e){return{"Owner > component":e.componentName,"Wasted time (ms)":e.time,Instances:e.count}})},printWasted:function(e){e=e||v._allMeasurements,console.table(v.getMeasurementsSummaryMap(e)),console.log("Total time:",h.getTotalTime(e).toFixed(2)+" ms")},printDOM:function(e){e=e||v._allMeasurements;var t=h.getDOMSummary(e);console.table(t.map(function(e){var t={};return t[p.ID_ATTRIBUTE_NAME]=e.id,t.type=e.type,t.args=JSON.stringify(e.args),t})),console.log("Total time:",h.getTotalTime(e).toFixed(2)+" ms")},_recordWrite:function(e,t,n,r){var o=v._allMeasurements[v._allMeasurements.length-1].writes;o[e]=o[e]||[],o[e].push({type:t,time:n,args:r})},measure:function(e,t,n){return function(){for(var r=[],o=0,i=arguments.length;i>o;o++)r.push(arguments[o]);var s,a,u;if("_renderNewRootComponent"===t||"flushBatchedUpdates"===t)return v._allMeasurements.push({exclusive:{},inclusive:{},render:{},counts:{},writes:{},displayNames:{},totalTime:0}),u=y(),a=n.apply(this,r),v._allMeasurements[v._allMeasurements.length-1].totalTime=y()-u,a;if("_mountImageIntoNode"===t||"ReactDOMIDOperations"===e){if(u=y(),a=n.apply(this,r),s=y()-u,"_mountImageIntoNode"===t){var l=m.getID(r[1]);v._recordWrite(l,t,s,r[0])}else"dangerouslyProcessChildrenUpdates"===t?r[0].forEach(function(e){var t={};null!==e.fromIndex&&(t.fromIndex=e.fromIndex),null!==e.toIndex&&(t.toIndex=e.toIndex),null!==e.textContent&&(t.textContent=e.textContent),null!==e.markupIndex&&(t.markup=r[1][e.markupIndex]),v._recordWrite(e.parentID,e.type,s,t)}):v._recordWrite(r[0],t,s,Array.prototype.slice.call(r,1));return a}if("ReactCompositeComponent"!==e||"mountComponent"!==t&&"updateComponent"!==t&&"_renderValidatedComponent"!==t)return n.apply(this,r);if("string"==typeof this._currentElement.type)return n.apply(this,r);var c="mountComponent"===t?r[0]:this._rootNodeID,f="_renderValidatedComponent"===t,p="mountComponent"===t,h=v._mountStack,g=v._allMeasurements[v._allMeasurements.length-1];if(f?d(g.counts,c,1):p&&h.push(0),u=y(),a=n.apply(this,r),s=y()-u,f)d(g.render,c,s);else if(p){var b=h.pop();h[h.length-1]+=s,d(g.exclusive,c,s-b),d(g.inclusive,c,s)}else d(g.inclusive,c,s);return g.displayNames[c]={current:this.getName(),owner:this._currentElement._owner?this._currentElement._owner.getName():"<root>"},a}}};t.exports=v}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactDefaultPerf.js","/node_modules/react/lib")},{"./DOMProperty":54,"./ReactDefaultPerfAnalysis":101,"./ReactMount":115,"./ReactPerf":120,"./performanceNow":191,_process:43,buffer:3}],101:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){function f(e){for(var t=0,n=0;n<e.length;n++){var r=e[n];t+=r.totalTime}return t}function d(e){for(var t=[],n=0;n<e.length;n++){var r,o=e[n];for(r in o.writes)o.writes[r].forEach(function(e){t.push({id:r,type:v[e.type]||e.type,args:e.args})})}return t}function p(e){for(var t,n={},r=0;r<e.length;r++){var o=e[r],i=g({},o.exclusive,o.inclusive);for(var s in i)t=o.displayNames[s].current,n[t]=n[t]||{componentName:t,inclusive:0,exclusive:0,render:0,count:0},o.render[s]&&(n[t].render+=o.render[s]),o.exclusive[s]&&(n[t].exclusive+=o.exclusive[s]),o.inclusive[s]&&(n[t].inclusive+=o.inclusive[s]),o.counts[s]&&(n[t].count+=o.counts[s])}var a=[];for(t in n)n[t].exclusive>=y&&a.push(n[t]);return a.sort(function(e,t){return t.exclusive-e.exclusive}),a}function h(e,t){for(var n,r={},o=0;o<e.length;o++){var i,s=e[o],a=g({},s.exclusive,s.inclusive);t&&(i=m(s));for(var u in a)if(!t||i[u]){var l=s.displayNames[u];n=l.owner+" > "+l.current,r[n]=r[n]||{componentName:n,time:0,count:0},s.inclusive[u]&&(r[n].time+=s.inclusive[u]),s.counts[u]&&(r[n].count+=s.counts[u])}}var c=[];for(n in r)r[n].time>=y&&c.push(r[n]);return c.sort(function(e,t){return t.time-e.time}),c}function m(e){var t={},n=Object.keys(e.writes),r=g({},e.exclusive,e.inclusive);for(var o in r){for(var i=!1,s=0;s<n.length;s++)if(0===n[s].indexOf(o)){i=!0;break}!i&&e.counts[o]>0&&(t[o]=!0)}return t}var g=e("./Object.assign"),y=1.2,v={_mountImageIntoNode:"set innerHTML",INSERT_MARKUP:"set innerHTML",MOVE_EXISTING:"move",REMOVE_NODE:"remove",TEXT_CONTENT:"set textContent",updatePropertyByID:"update attribute",deletePropertyByID:"delete attribute",updateStylesByID:"update styles",updateInnerHTMLByID:"set innerHTML",dangerouslyReplaceNodeWithMarkupByID:"replace"},b={getExclusiveSummary:p,getInclusiveSummary:h,getDOMSummary:d,getTotalTime:f};t.exports=b}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactDefaultPerfAnalysis.js","/node_modules/react/lib")},{"./Object.assign":71,_process:43,buffer:3}],102:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e,t){Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:function(){return this._store?this._store[t]:null},set:function(e){"production"!==n.env.NODE_ENV?g(!1,"Don't set the %s property of the React element. Instead, specify the correct value when initially creating the element.",t):null,this._store[t]=e}})}function d(e){try{var t={props:!0};for(var n in t)f(e,n);v=!0}catch(r){}}var p=e("./ReactContext"),h=e("./ReactCurrentOwner"),m=e("./Object.assign"),g=e("./warning"),y={key:!0,ref:!0},v=!1,b=function(e,t,r,o,i,s){if(this.type=e,this.key=t,this.ref=r,this._owner=o,this._context=i,"production"!==n.env.NODE_ENV){this._store={props:s,originalProps:m({},s)};try{Object.defineProperty(this._store,"validated",{configurable:!1,enumerable:!1,writable:!0})}catch(a){}if(this._store.validated=!1,v)return void Object.freeze(this)}this.props=s};b.prototype={_isReactElement:!0},"production"!==n.env.NODE_ENV&&d(b.prototype),b.createElement=function(e,t,n){var r,o={},i=null,s=null;if(null!=t){s=void 0===t.ref?null:t.ref,i=void 0===t.key?null:""+t.key;for(r in t)t.hasOwnProperty(r)&&!y.hasOwnProperty(r)&&(o[r]=t[r])}var a=arguments.length-2;if(1===a)o.children=n;else if(a>1){for(var u=Array(a),l=0;a>l;l++)u[l]=arguments[l+2];o.children=u}if(e&&e.defaultProps){var c=e.defaultProps;for(r in c)"undefined"==typeof o[r]&&(o[r]=c[r])}return new b(e,i,s,h.current,p.current,o)},b.createFactory=function(e){var t=b.createElement.bind(null,e);return t.type=e,t},b.cloneAndReplaceProps=function(e,t){var r=new b(e.type,e.key,e.ref,e._owner,e._context,t);return"production"!==n.env.NODE_ENV&&(r._store.validated=e._store.validated),r},b.cloneElement=function(e,t,n){var r,o=m({},e.props),i=e.key,s=e.ref,a=e._owner;if(null!=t){void 0!==t.ref&&(s=t.ref,a=h.current),void 0!==t.key&&(i=""+t.key);for(r in t)t.hasOwnProperty(r)&&!y.hasOwnProperty(r)&&(o[r]=t[r])}var u=arguments.length-2;if(1===u)o.children=n;else if(u>1){for(var l=Array(u),c=0;u>c;c++)l[c]=arguments[c+2];o.children=l}return new b(e.type,i,s,a,e._context,o)},b.isValidElement=function(e){var t=!(!e||!e._isReactElement);return t},t.exports=b}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactElement.js","/node_modules/react/lib")},{"./Object.assign":71,"./ReactContext":83,"./ReactCurrentOwner":84,"./warning":199,_process:43,buffer:3}],103:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(){if(P.current){var e=P.current.getName();if(e)return" Check the render method of `"+e+"`."}return""}function d(e){var t=e&&e.getPublicInstance();if(t){var n=t.constructor;if(n)return n.displayName||n.name||void 0}}function p(){var e=P.current;return e&&d(e)||void 0}function h(e,t){e._store.validated||null!=e.key||(e._store.validated=!0,g('Each child in an array or iterator should have a unique "key" prop.',e,t))}function m(e,t,n){I.test(e)&&g("Child objects should have non-numeric keys so ordering is preserved.",t,n)}function g(e,t,r){var o=p(),i="string"==typeof r?r:r.displayName||r.name,s=o||i,a=N[e]||(N[e]={});if(!a.hasOwnProperty(s)){a[s]=!0;var u=o?" Check the render method of "+o+".":i?" Check the React.render call using <"+i+">.":"",l="";if(t&&t._owner&&t._owner!==P.current){var c=d(t._owner);l=" It was passed a child from "+c+"."}"production"!==n.env.NODE_ENV?O(!1,e+"%s%s See https://fb.me/react-warning-keys for more information.",u,l):null}}function y(e,t){if(Array.isArray(e))for(var n=0;n<e.length;n++){var r=e[n];E.isValidElement(r)&&h(r,t)}else if(E.isValidElement(e))e._store.validated=!0;else if(e){var o=R(e);if(o){if(o!==e.entries)for(var i,s=o.call(e);!(i=s.next()).done;)E.isValidElement(i.value)&&h(i.value,t)}else if("object"==typeof e){var a=x.extractIfFragment(e);for(var u in a)a.hasOwnProperty(u)&&m(u,a[u],t)}}}function v(e,t,r,o){for(var i in t)if(t.hasOwnProperty(i)){var s;try{"production"!==n.env.NODE_ENV?D("function"==typeof t[i],"%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.",e||"React class",C[o],i):D("function"==typeof t[i]),s=t[i](r,i,e,o)}catch(a){s=a}if(s instanceof Error&&!(s.message in A)){A[s.message]=!0;var u=f(this);"production"!==n.env.NODE_ENV?O(!1,"Failed propType: %s%s",s.message,u):null}}}function b(e,t){var r=t.type,o="string"==typeof r?r:r.displayName,i=t._owner?t._owner.getPublicInstance().constructor.displayName:null,s=e+"|"+o+"|"+i;if(!B.hasOwnProperty(s)){B[s]=!0;var a="";o&&(a=" <"+o+" />");var u="";i&&(u=" The element was created by "+i+"."),"production"!==n.env.NODE_ENV?O(!1,"Don't set .props.%s of the React component%s. Instead, specify the correct value when initially creating the element or use React.cloneElement to make a new element with updated props.%s",e,a,u):null}}function _(e,t){return e!==e?t!==t:0===e&&0===t?1/e===1/t:e===t}function w(e){if(e._store){var t=e._store.originalProps,n=e.props;for(var r in n)n.hasOwnProperty(r)&&(t.hasOwnProperty(r)&&_(t[r],n[r])||(b(r,e),t[r]=n[r]))}}function T(e){if(null!=e.type){var t=M.getComponentClassForElement(e),r=t.displayName||t.name;t.propTypes&&v(r,t.propTypes,e.props,S.prop),"function"==typeof t.getDefaultProps&&("production"!==n.env.NODE_ENV?O(t.getDefaultProps.isReactClassApproved,"getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."):null)}}var E=e("./ReactElement"),x=e("./ReactFragment"),S=e("./ReactPropTypeLocations"),C=e("./ReactPropTypeLocationNames"),P=e("./ReactCurrentOwner"),M=e("./ReactNativeComponent"),R=e("./getIteratorFn"),D=e("./invariant"),O=e("./warning"),N={},A={},I=/^\d+$/,B={},k={checkAndWarnForMutatedProps:w,createElement:function(e,t,r){"production"!==n.env.NODE_ENV?O(null!=e,"React.createElement: type should not be null or undefined. It should be a string (for DOM elements) or a ReactClass (for composite components)."):null;var o=E.createElement.apply(this,arguments);if(null==o)return o;for(var i=2;i<arguments.length;i++)y(arguments[i],e);return T(o),o},createFactory:function(e){var t=k.createElement.bind(null,e);if(t.type=e,"production"!==n.env.NODE_ENV)try{Object.defineProperty(t,"type",{enumerable:!1,get:function(){return"production"!==n.env.NODE_ENV?O(!1,"Factory.type is deprecated. Access the class directly before passing it to createFactory."):null,Object.defineProperty(this,"type",{value:e}),e}})}catch(r){}return t},cloneElement:function(e,t,n){for(var r=E.cloneElement.apply(this,arguments),o=2;o<arguments.length;o++)y(arguments[o],r.type);return T(r),r}};t.exports=k}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactElementValidator.js","/node_modules/react/lib")},{"./ReactCurrentOwner":84,"./ReactElement":102,"./ReactFragment":108,"./ReactNativeComponent":118,"./ReactPropTypeLocationNames":121,"./ReactPropTypeLocations":122,"./getIteratorFn":171,"./invariant":180,"./warning":199,_process:43,buffer:3}],104:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e){v[e]=!0}function d(e){delete v[e]}function p(e){return!!v[e]}var h,m=e("./ReactElement"),g=e("./ReactInstanceMap"),y=e("./invariant"),v={},b={injectEmptyComponent:function(e){h=m.createFactory(e)}},_=function(){};_.prototype.componentDidMount=function(){var e=g.get(this);e&&f(e._rootNodeID)},_.prototype.componentWillUnmount=function(){var e=g.get(this);e&&d(e._rootNodeID)},_.prototype.render=function(){return"production"!==n.env.NODE_ENV?y(h,"Trying to return null from a render, but no null placeholder component was injected."):y(h),h()};var w=m.createElement(_),T={emptyElement:w,injection:b,isNullComponentID:p};t.exports=T}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactEmptyComponent.js","/node_modules/react/lib")},{"./ReactElement":102,"./ReactInstanceMap":112,"./invariant":180,_process:43,buffer:3}],105:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){"use strict";var c={guard:function(e,t){return e}};t.exports=c}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactErrorUtils.js","/node_modules/react/lib")},{_process:43,buffer:3}],106:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e){d.enqueueEvents(e),d.processEventQueue()}var d=e("./EventPluginHub"),p={handleTopLevel:function(e,t,n,r){var o=d.extractEvents(e,t,n,r);f(o)}};t.exports=p}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactEventEmitterMixin.js","/node_modules/react/lib");
},{"./EventPluginHub":61,_process:43,buffer:3}],107:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e){var t=b.getID(e),n=v.getReactRootIDFromNodeID(t),r=b.findReactContainerForID(n),o=b.getFirstReactDOM(r);return o}function d(e,t){this.topLevelType=e,this.nativeEvent=t,this.ancestors=[]}function p(e){for(var t=b.getFirstReactDOM(T(e.nativeEvent))||window,n=t;n;)e.ancestors.push(n),n=f(n);for(var r=0,o=e.ancestors.length;o>r;r++){t=e.ancestors[r];var i=b.getID(t)||"";x._handleTopLevel(e.topLevelType,t,i,e.nativeEvent)}}function h(e){var t=E(window);e(t)}var m=e("./EventListener"),g=e("./ExecutionEnvironment"),y=e("./PooledClass"),v=e("./ReactInstanceHandles"),b=e("./ReactMount"),_=e("./ReactUpdates"),w=e("./Object.assign"),T=e("./getEventTarget"),E=e("./getUnboundedScrollPosition");w(d.prototype,{destructor:function(){this.topLevelType=null,this.nativeEvent=null,this.ancestors.length=0}}),y.addPoolingTo(d,y.twoArgumentPooler);var x={_enabled:!0,_handleTopLevel:null,WINDOW_HANDLE:g.canUseDOM?window:null,setHandleTopLevel:function(e){x._handleTopLevel=e},setEnabled:function(e){x._enabled=!!e},isEnabled:function(){return x._enabled},trapBubbledEvent:function(e,t,n){var r=n;return r?m.listen(r,t,x.dispatchEvent.bind(null,e)):null},trapCapturedEvent:function(e,t,n){var r=n;return r?m.capture(r,t,x.dispatchEvent.bind(null,e)):null},monitorScrollValue:function(e){var t=h.bind(null,e);m.listen(window,"scroll",t)},dispatchEvent:function(e,t){if(x._enabled){var n=d.getPooled(e,t);try{_.batchedUpdates(p,n)}finally{d.release(n)}}}};t.exports=x}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactEventListener.js","/node_modules/react/lib")},{"./EventListener":60,"./ExecutionEnvironment":65,"./Object.assign":71,"./PooledClass":72,"./ReactInstanceHandles":111,"./ReactMount":115,"./ReactUpdates":132,"./getEventTarget":170,"./getUnboundedScrollPosition":176,_process:43,buffer:3}],108:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";var f=e("./ReactElement"),d=e("./warning");if("production"!==n.env.NODE_ENV){var p="_reactFragment",h="_reactDidWarn",m=!1;try{var g=function(){return 1};Object.defineProperty({},p,{enumerable:!1,value:!0}),Object.defineProperty({},"key",{enumerable:!0,get:g}),m=!0}catch(y){}var v=function(e,t){Object.defineProperty(e,t,{enumerable:!0,get:function(){return"production"!==n.env.NODE_ENV?d(this[h],"A ReactFragment is an opaque type. Accessing any of its properties is deprecated. Pass it to one of the React.Children helpers."):null,this[h]=!0,this[p][t]},set:function(e){"production"!==n.env.NODE_ENV?d(this[h],"A ReactFragment is an immutable opaque type. Mutating its properties is deprecated."):null,this[h]=!0,this[p][t]=e}})},b={},_=function(e){var t="";for(var n in e)t+=n+":"+typeof e[n]+",";var r=!!b[t];return b[t]=!0,r}}var w={create:function(e){if("production"!==n.env.NODE_ENV){if("object"!=typeof e||!e||Array.isArray(e))return"production"!==n.env.NODE_ENV?d(!1,"React.addons.createFragment only accepts a single object.",e):null,e;if(f.isValidElement(e))return"production"!==n.env.NODE_ENV?d(!1,"React.addons.createFragment does not accept a ReactElement without a wrapper object."):null,e;if(m){var t={};Object.defineProperty(t,p,{enumerable:!1,value:e}),Object.defineProperty(t,h,{writable:!0,enumerable:!1,value:!1});for(var r in e)v(t,r);return Object.preventExtensions(t),t}}return e},extract:function(e){return"production"!==n.env.NODE_ENV&&m?e[p]?e[p]:("production"!==n.env.NODE_ENV?d(_(e),"Any use of a keyed object should be wrapped in React.addons.createFragment(object) before being passed as a child."):null,e):e},extractIfFragment:function(e){if("production"!==n.env.NODE_ENV&&m){if(e[p])return e[p];for(var t in e)if(e.hasOwnProperty(t)&&f.isValidElement(e[t]))return w.extract(e)}return e}};t.exports=w}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactFragment.js","/node_modules/react/lib")},{"./ReactElement":102,"./warning":199,_process:43,buffer:3}],109:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";var f=e("./DOMProperty"),d=e("./EventPluginHub"),p=e("./ReactComponentEnvironment"),h=e("./ReactClass"),m=e("./ReactEmptyComponent"),g=e("./ReactBrowserEventEmitter"),y=e("./ReactNativeComponent"),v=e("./ReactDOMComponent"),b=e("./ReactPerf"),_=e("./ReactRootIndex"),w=e("./ReactUpdates"),T={Component:p.injection,Class:h.injection,DOMComponent:v.injection,DOMProperty:f.injection,EmptyComponent:m.injection,EventPluginHub:d.injection,EventEmitter:g.injection,NativeComponent:y.injection,Perf:b.injection,RootIndex:_.injection,Updates:w.injection};t.exports=T}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactInjection.js","/node_modules/react/lib")},{"./DOMProperty":54,"./EventPluginHub":61,"./ReactBrowserEventEmitter":75,"./ReactClass":78,"./ReactComponentEnvironment":81,"./ReactDOMComponent":87,"./ReactEmptyComponent":104,"./ReactNativeComponent":118,"./ReactPerf":120,"./ReactRootIndex":128,"./ReactUpdates":132,_process:43,buffer:3}],110:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e){return p(document.documentElement,e)}var d=e("./ReactDOMSelection"),p=e("./containsNode"),h=e("./focusNode"),m=e("./getActiveElement"),g={hasSelectionCapabilities:function(e){return e&&("INPUT"===e.nodeName&&"text"===e.type||"TEXTAREA"===e.nodeName||"true"===e.contentEditable)},getSelectionInformation:function(){var e=m();return{focusedElem:e,selectionRange:g.hasSelectionCapabilities(e)?g.getSelection(e):null}},restoreSelection:function(e){var t=m(),n=e.focusedElem,r=e.selectionRange;t!==n&&f(n)&&(g.hasSelectionCapabilities(n)&&g.setSelection(n,r),h(n))},getSelection:function(e){var t;if("selectionStart"in e)t={start:e.selectionStart,end:e.selectionEnd};else if(document.selection&&"INPUT"===e.nodeName){var n=document.selection.createRange();n.parentElement()===e&&(t={start:-n.moveStart("character",-e.value.length),end:-n.moveEnd("character",-e.value.length)})}else t=d.getOffsets(e);return t||{start:0,end:0}},setSelection:function(e,t){var n=t.start,r=t.end;if("undefined"==typeof r&&(r=n),"selectionStart"in e)e.selectionStart=n,e.selectionEnd=Math.min(r,e.value.length);else if(document.selection&&"INPUT"===e.nodeName){var o=e.createTextRange();o.collapse(!0),o.moveStart("character",n),o.moveEnd("character",r-n),o.select()}else d.setOffsets(e,t)}};t.exports=g}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactInputSelection.js","/node_modules/react/lib")},{"./ReactDOMSelection":95,"./containsNode":154,"./focusNode":164,"./getActiveElement":166,_process:43,buffer:3}],111:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e){return w+e.toString(36)}function d(e,t){return e.charAt(t)===w||t===e.length}function p(e){return""===e||e.charAt(0)===w&&e.charAt(e.length-1)!==w}function h(e,t){return 0===t.indexOf(e)&&d(t,e.length)}function m(e){return e?e.substr(0,e.lastIndexOf(w)):""}function g(e,t){if("production"!==n.env.NODE_ENV?_(p(e)&&p(t),"getNextDescendantID(%s, %s): Received an invalid React DOM ID.",e,t):_(p(e)&&p(t)),"production"!==n.env.NODE_ENV?_(h(e,t),"getNextDescendantID(...): React has made an invalid assumption about the DOM hierarchy. Expected `%s` to be an ancestor of `%s`.",e,t):_(h(e,t)),e===t)return e;var r,o=e.length+T;for(r=o;r<t.length&&!d(t,r);r++);return t.substr(0,r)}function y(e,t){var r=Math.min(e.length,t.length);if(0===r)return"";for(var o=0,i=0;r>=i;i++)if(d(e,i)&&d(t,i))o=i;else if(e.charAt(i)!==t.charAt(i))break;var s=e.substr(0,o);return"production"!==n.env.NODE_ENV?_(p(s),"getFirstCommonAncestorID(%s, %s): Expected a valid React DOM ID: %s",e,t,s):_(p(s)),s}function v(e,t,r,o,i,s){e=e||"",t=t||"","production"!==n.env.NODE_ENV?_(e!==t,"traverseParentPath(...): Cannot traverse from and to the same ID, `%s`.",e):_(e!==t);var a=h(t,e);"production"!==n.env.NODE_ENV?_(a||h(e,t),"traverseParentPath(%s, %s, ...): Cannot traverse from two IDs that do not have a parent path.",e,t):_(a||h(e,t));for(var u=0,l=a?m:g,c=e;;c=l(c,t)){var f;if(i&&c===e||s&&c===t||(f=r(c,a,o)),f===!1||c===t)break;"production"!==n.env.NODE_ENV?_(u++<E,"traverseParentPath(%s, %s, ...): Detected an infinite loop while traversing the React DOM ID tree. This may be due to malformed IDs: %s",e,t):_(u++<E)}}var b=e("./ReactRootIndex"),_=e("./invariant"),w=".",T=w.length,E=100,x={createReactRootID:function(){return f(b.createReactRootIndex())},createReactID:function(e,t){return e+t},getReactRootIDFromNodeID:function(e){if(e&&e.charAt(0)===w&&e.length>1){var t=e.indexOf(w,1);return t>-1?e.substr(0,t):e}return null},traverseEnterLeave:function(e,t,n,r,o){var i=y(e,t);i!==e&&v(e,i,n,r,!1,!0),i!==t&&v(i,t,n,o,!0,!1)},traverseTwoPhase:function(e,t,n){e&&(v("",e,t,n,!0,!1),v(e,"",t,n,!1,!0))},traverseAncestors:function(e,t,n){v("",e,t,n,!0,!1)},_getFirstCommonAncestorID:y,_getNextDescendantID:g,isAncestorIDOf:h,SEPARATOR:w};t.exports=x}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactInstanceHandles.js","/node_modules/react/lib")},{"./ReactRootIndex":128,"./invariant":180,_process:43,buffer:3}],112:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){"use strict";var c={remove:function(e){e._reactInternalInstance=void 0},get:function(e){return e._reactInternalInstance},has:function(e){return void 0!==e._reactInternalInstance},set:function(e,t){e._reactInternalInstance=t}};t.exports=c}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactInstanceMap.js","/node_modules/react/lib")},{_process:43,buffer:3}],113:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){"use strict";var c={currentlyMountingInstance:null,currentlyUnmountingInstance:null};t.exports=c}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactLifeCycle.js","/node_modules/react/lib")},{_process:43,buffer:3}],114:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";var f=e("./adler32"),d={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=f(e);return e.replace(">"," "+d.CHECKSUM_ATTR_NAME+'="'+t+'">')},canReuseMarkup:function(e,t){var n=t.getAttribute(d.CHECKSUM_ATTR_NAME);n=n&&parseInt(n,10);var r=f(e);return r===n}};t.exports=d}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactMarkupChecksum.js","/node_modules/react/lib")},{"./adler32":151,_process:43,buffer:3}],115:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e,t){for(var n=Math.min(e.length,t.length),r=0;n>r;r++)if(e.charAt(r)!==t.charAt(r))return r;return e.length===t.length?-1:n}function d(e){var t=G(e);return t&&te.getID(t)}function p(e){var t=h(e);if(t)if(z.hasOwnProperty(t)){var r=z[t];r!==e&&("production"!==n.env.NODE_ENV?V(!v(r,t),"ReactMount: Two valid but unequal nodes with the same `%s`: %s",X,t):V(!v(r,t)),z[t]=e)}else z[t]=e;return t}function h(e){return e&&e.getAttribute&&e.getAttribute(X)||""}function m(e,t){var n=h(e);n!==t&&delete z[n],e.setAttribute(X,t),z[t]=e}function g(e){return z.hasOwnProperty(e)&&v(z[e],e)||(z[e]=te.findReactNodeByID(e)),z[e]}function y(e){var t=O.get(e)._rootNodeID;return R.isNullComponentID(t)?null:(z.hasOwnProperty(t)&&v(z[t],t)||(z[t]=te.findReactNodeByID(t)),z[t])}function v(e,t){if(e){"production"!==n.env.NODE_ENV?V(h(e)===t,"ReactMount: Unexpected modification of `%s`",X):V(h(e)===t);var r=te.findReactContainerForID(t);if(r&&j(r,e))return!0}return!1}function b(e){delete z[e]}function _(e){var t=z[e];return t&&v(t,e)?void(ee=t):!1}function w(e){ee=null,D.traverseAncestors(e,_);var t=ee;return ee=null,t}function T(e,t,n,r,o){var i=I.mountComponent(e,t,r,L);e._isTopLevel=!0,te._mountImageIntoNode(i,n,o)}function E(e,t,n,r){var o=k.ReactReconcileTransaction.getPooled();o.perform(T,null,e,t,n,o,r),k.ReactReconcileTransaction.release(o)}var x=e("./DOMProperty"),S=e("./ReactBrowserEventEmitter"),C=e("./ReactCurrentOwner"),P=e("./ReactElement"),M=e("./ReactElementValidator"),R=e("./ReactEmptyComponent"),D=e("./ReactInstanceHandles"),O=e("./ReactInstanceMap"),N=e("./ReactMarkupChecksum"),A=e("./ReactPerf"),I=e("./ReactReconciler"),B=e("./ReactUpdateQueue"),k=e("./ReactUpdates"),L=e("./emptyObject"),j=e("./containsNode"),G=e("./getReactRootElementInContainer"),H=e("./instantiateReactComponent"),V=e("./invariant"),U=e("./setInnerHTML"),F=e("./shouldUpdateReactComponent"),W=e("./warning"),q=D.SEPARATOR,X=x.ID_ATTRIBUTE_NAME,z={},Y=1,K=9,Q={},$={};if("production"!==n.env.NODE_ENV)var Z={};var J=[],ee=null,te={_instancesByReactRootID:Q,scrollMonitor:function(e,t){t()},_updateRootComponent:function(e,t,r,o){return"production"!==n.env.NODE_ENV&&M.checkAndWarnForMutatedProps(t),te.scrollMonitor(r,function(){B.enqueueElementInternal(e,t),o&&B.enqueueCallbackInternal(e,o)}),"production"!==n.env.NODE_ENV&&(Z[d(r)]=G(r)),e},_registerComponent:function(e,t){"production"!==n.env.NODE_ENV?V(t&&(t.nodeType===Y||t.nodeType===K),"_registerComponent(...): Target container is not a DOM element."):V(t&&(t.nodeType===Y||t.nodeType===K)),S.ensureScrollValueMonitoring();var r=te.registerContainer(t);return Q[r]=e,r},_renderNewRootComponent:function(e,t,r){"production"!==n.env.NODE_ENV?W(null==C.current,"_renderNewRootComponent(): Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate."):null;var o=H(e,null),i=te._registerComponent(o,t);return k.batchedUpdates(E,o,i,t,r),"production"!==n.env.NODE_ENV&&(Z[i]=G(t)),o},render:function(e,t,r){"production"!==n.env.NODE_ENV?V(P.isValidElement(e),"React.render(): Invalid component element.%s","string"==typeof e?" Instead of passing an element string, make sure to instantiate it by passing it to React.createElement.":"function"==typeof e?" Instead of passing a component class, make sure to instantiate it by passing it to React.createElement.":null!=e&&void 0!==e.props?" This may be caused by unintentionally loading two independent copies of React.":""):V(P.isValidElement(e));var o=Q[d(t)];if(o){var i=o._currentElement;if(F(i,e))return te._updateRootComponent(o,e,t,r).getPublicInstance();te.unmountComponentAtNode(t)}var s=G(t),a=s&&te.isRenderedByReact(s);if("production"!==n.env.NODE_ENV&&(!a||s.nextSibling))for(var u=s;u;){if(te.isRenderedByReact(u)){"production"!==n.env.NODE_ENV?W(!1,"render(): Target node has markup rendered by React, but there are unrelated nodes as well. This is most commonly caused by white-space inserted around server-rendered markup."):null;break}u=u.nextSibling}var l=a&&!o,c=te._renderNewRootComponent(e,t,l).getPublicInstance();return r&&r.call(c),c},constructAndRenderComponent:function(e,t,n){var r=P.createElement(e,t);return te.render(r,n)},constructAndRenderComponentByID:function(e,t,r){var o=document.getElementById(r);return"production"!==n.env.NODE_ENV?V(o,'Tried to get element with id of "%s" but it is not present on the page.',r):V(o),te.constructAndRenderComponent(e,t,o)},registerContainer:function(e){var t=d(e);return t&&(t=D.getReactRootIDFromNodeID(t)),t||(t=D.createReactRootID()),$[t]=e,t},unmountComponentAtNode:function(e){"production"!==n.env.NODE_ENV?W(null==C.current,"unmountComponentAtNode(): Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate."):null,"production"!==n.env.NODE_ENV?V(e&&(e.nodeType===Y||e.nodeType===K),"unmountComponentAtNode(...): Target container is not a DOM element."):V(e&&(e.nodeType===Y||e.nodeType===K));var t=d(e),r=Q[t];return r?(te.unmountComponentFromNode(r,e),delete Q[t],delete $[t],"production"!==n.env.NODE_ENV&&delete Z[t],!0):!1},unmountComponentFromNode:function(e,t){for(I.unmountComponent(e),t.nodeType===K&&(t=t.documentElement);t.lastChild;)t.removeChild(t.lastChild)},findReactContainerForID:function(e){var t=D.getReactRootIDFromNodeID(e),r=$[t];if("production"!==n.env.NODE_ENV){var o=Z[t];if(o&&o.parentNode!==r){"production"!==n.env.NODE_ENV?V(h(o)===t,"ReactMount: Root element ID differed from reactRootID."):V(h(o)===t);var i=r.firstChild;i&&t===h(i)?Z[t]=i:"production"!==n.env.NODE_ENV?W(!1,"ReactMount: Root element has been removed from its original container. New container:",o.parentNode):null}}return r},findReactNodeByID:function(e){var t=te.findReactContainerForID(e);return te.findComponentRoot(t,e)},isRenderedByReact:function(e){if(1!==e.nodeType)return!1;var t=te.getID(e);return t?t.charAt(0)===q:!1},getFirstReactDOM:function(e){for(var t=e;t&&t.parentNode!==t;){if(te.isRenderedByReact(t))return t;t=t.parentNode}return null},findComponentRoot:function(e,t){var r=J,o=0,i=w(t)||e;for(r[0]=i.firstChild,r.length=1;o<r.length;){for(var s,a=r[o++];a;){var u=te.getID(a);u?t===u?s=a:D.isAncestorIDOf(u,t)&&(r.length=o=0,r.push(a.firstChild)):r.push(a.firstChild),a=a.nextSibling}if(s)return r.length=0,s}r.length=0,"production"!==n.env.NODE_ENV?V(!1,"findComponentRoot(..., %s): Unable to find element. This probably means the DOM was unexpectedly mutated (e.g., by the browser), usually due to forgetting a <tbody> when using tables, nesting tags like <form>, <p>, or <a>, or using non-SVG elements in an <svg> parent. Try inspecting the child nodes of the element with React ID `%s`.",t,te.getID(e)):V(!1)},_mountImageIntoNode:function(e,t,r){if("production"!==n.env.NODE_ENV?V(t&&(t.nodeType===Y||t.nodeType===K),"mountComponentIntoNode(...): Target container is not valid."):V(t&&(t.nodeType===Y||t.nodeType===K)),r){var o=G(t);if(N.canReuseMarkup(e,o))return;var i=o.getAttribute(N.CHECKSUM_ATTR_NAME);o.removeAttribute(N.CHECKSUM_ATTR_NAME);var s=o.outerHTML;o.setAttribute(N.CHECKSUM_ATTR_NAME,i);var a=f(e,s),u=" (client) "+e.substring(a-20,a+20)+"\n (server) "+s.substring(a-20,a+20);"production"!==n.env.NODE_ENV?V(t.nodeType!==K,"You're trying to render a component to the document using server rendering but the checksum was invalid. This usually means you rendered a different component type or props on the client from the one on the server, or your render() methods are impure. React cannot handle this case due to cross-browser quirks by rendering at the document root. You should look for environment dependent code in your components and ensure the props are the same client and server side:\n%s",u):V(t.nodeType!==K),"production"!==n.env.NODE_ENV&&("production"!==n.env.NODE_ENV?W(!1,"React attempted to reuse markup in a container but the checksum was invalid. This generally means that you are using server rendering and the markup generated on the server was not what the client was expecting. React injected new markup to compensate which works but you have lost many of the benefits of server rendering. Instead, figure out why the markup being generated is different on the client or server:\n%s",u):null)}"production"!==n.env.NODE_ENV?V(t.nodeType!==K,"You're trying to render a component to the document but you didn't use server rendering. We can't do this without using server rendering due to cross-browser quirks. See React.renderToString() for server rendering."):V(t.nodeType!==K),U(t,e)},getReactRootID:d,getID:p,setID:m,getNode:g,getNodeFromInstance:y,purgeID:b};A.measureMethods(te,"ReactMount",{_renderNewRootComponent:"_renderNewRootComponent",_mountImageIntoNode:"_mountImageIntoNode"}),t.exports=te}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactMount.js","/node_modules/react/lib")},{"./DOMProperty":54,"./ReactBrowserEventEmitter":75,"./ReactCurrentOwner":84,"./ReactElement":102,"./ReactElementValidator":103,"./ReactEmptyComponent":104,"./ReactInstanceHandles":111,"./ReactInstanceMap":112,"./ReactMarkupChecksum":114,"./ReactPerf":120,"./ReactReconciler":126,"./ReactUpdateQueue":131,"./ReactUpdates":132,"./containsNode":154,"./emptyObject":160,"./getReactRootElementInContainer":174,"./instantiateReactComponent":179,"./invariant":180,"./setInnerHTML":193,"./shouldUpdateReactComponent":196,"./warning":199,_process:43,buffer:3}],116:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e,t,n){T.push({parentID:e,parentNode:null,type:v.INSERT_MARKUP,markupIndex:E.push(t)-1,textContent:null,fromIndex:null,toIndex:n})}function d(e,t,n){T.push({parentID:e,parentNode:null,type:v.MOVE_EXISTING,markupIndex:null,textContent:null,fromIndex:t,toIndex:n})}function p(e,t){T.push({parentID:e,parentNode:null,type:v.REMOVE_NODE,markupIndex:null,textContent:null,fromIndex:t,toIndex:null})}function h(e,t){T.push({parentID:e,parentNode:null,type:v.TEXT_CONTENT,markupIndex:null,textContent:t,fromIndex:null,toIndex:null})}function m(){T.length&&(y.processChildrenUpdates(T,E),g())}function g(){T.length=0,E.length=0}var y=e("./ReactComponentEnvironment"),v=e("./ReactMultiChildUpdateTypes"),b=e("./ReactReconciler"),_=e("./ReactChildReconciler"),w=0,T=[],E=[],x={Mixin:{mountChildren:function(e,t,n){var r=_.instantiateChildren(e,t,n);this._renderedChildren=r;var o=[],i=0;for(var s in r)if(r.hasOwnProperty(s)){var a=r[s],u=this._rootNodeID+s,l=b.mountComponent(a,u,t,n);a._mountIndex=i,o.push(l),i++}return o},updateTextContent:function(e){w++;var t=!0;try{var n=this._renderedChildren;_.unmountChildren(n);for(var r in n)n.hasOwnProperty(r)&&this._unmountChildByName(n[r],r);this.setTextContent(e),t=!1}finally{w--,w||(t?g():m())}},updateChildren:function(e,t,n){w++;var r=!0;try{this._updateChildren(e,t,n),r=!1}finally{w--,w||(r?g():m())}},_updateChildren:function(e,t,n){var r=this._renderedChildren,o=_.updateChildren(r,e,t,n);if(this._renderedChildren=o,o||r){var i,s=0,a=0;for(i in o)if(o.hasOwnProperty(i)){var u=r&&r[i],l=o[i];u===l?(this.moveChild(u,a,s),s=Math.max(u._mountIndex,s),u._mountIndex=a):(u&&(s=Math.max(u._mountIndex,s),this._unmountChildByName(u,i)),this._mountChildByNameAtIndex(l,i,a,t,n)),a++}for(i in r)!r.hasOwnProperty(i)||o&&o.hasOwnProperty(i)||this._unmountChildByName(r[i],i)}},unmountChildren:function(){var e=this._renderedChildren;_.unmountChildren(e),this._renderedChildren=null},moveChild:function(e,t,n){e._mountIndex<n&&d(this._rootNodeID,e._mountIndex,t)},createChild:function(e,t){f(this._rootNodeID,t,e._mountIndex)},removeChild:function(e){p(this._rootNodeID,e._mountIndex)},setTextContent:function(e){h(this._rootNodeID,e)},_mountChildByNameAtIndex:function(e,t,n,r,o){var i=this._rootNodeID+t,s=b.mountComponent(e,i,r,o);e._mountIndex=n,this.createChild(e,s)},_unmountChildByName:function(e,t){this.removeChild(e),e._mountIndex=null}}};t.exports=x}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactMultiChild.js","/node_modules/react/lib")},{"./ReactChildReconciler":76,"./ReactComponentEnvironment":81,"./ReactMultiChildUpdateTypes":117,"./ReactReconciler":126,_process:43,buffer:3}],117:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";var f=e("./keyMirror"),d=f({INSERT_MARKUP:null,MOVE_EXISTING:null,REMOVE_NODE:null,TEXT_CONTENT:null});t.exports=d}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactMultiChildUpdateTypes.js","/node_modules/react/lib")},{"./keyMirror":185,_process:43,buffer:3}],118:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e){if("function"==typeof e.type)return e.type;var t=e.type,n=b[t];return null==n&&(b[t]=n=y(t)),n}function d(e){return"production"!==n.env.NODE_ENV?g(v,"There is no registered component for the tag %s",e.type):g(v),new v(e.type,e.props)}function p(e){return new _(e)}function h(e){return e instanceof _}var m=e("./Object.assign"),g=e("./invariant"),y=null,v=null,b={},_=null,w={injectGenericComponentClass:function(e){v=e},injectTextComponentClass:function(e){_=e},injectComponentClasses:function(e){m(b,e)},injectAutoWrapper:function(e){y=e}},T={getComponentClassForElement:f,createInternalComponent:d,createInstanceForText:p,isTextComponent:h,injection:w};t.exports=T}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactNativeComponent.js","/node_modules/react/lib")},{"./Object.assign":71,"./invariant":180,_process:43,buffer:3}],119:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";var f=e("./invariant"),d={isValidOwner:function(e){return!(!e||"function"!=typeof e.attachRef||"function"!=typeof e.detachRef)},addComponentAsRefTo:function(e,t,r){"production"!==n.env.NODE_ENV?f(d.isValidOwner(r),"addComponentAsRefTo(...): Only a ReactOwner can have refs. This usually means that you're trying to add a ref to a component that doesn't have an owner (that is, was not created inside of another component's `render` method). Try rendering this component inside of a new top-level component which will hold the ref."):f(d.isValidOwner(r)),r.attachRef(t,e)},removeComponentAsRefFrom:function(e,t,r){"production"!==n.env.NODE_ENV?f(d.isValidOwner(r),"removeComponentAsRefFrom(...): Only a ReactOwner can have refs. This usually means that you're trying to remove a ref to a component that doesn't have an owner (that is, was not created inside of another component's `render` method). Try rendering this component inside of a new top-level component which will hold the ref."):f(d.isValidOwner(r)),r.getPublicInstance().refs[t]===e.getPublicInstance()&&r.detachRef(t)}};t.exports=d}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactOwner.js","/node_modules/react/lib")},{"./invariant":180,_process:43,buffer:3}],120:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){"use strict";function c(e,t,n){return n}var f={enableMeasure:!1,storedMeasure:c,measureMethods:function(t,n,r){if("production"!==e.env.NODE_ENV)for(var o in r)r.hasOwnProperty(o)&&(t[o]=f.measure(n,r[o],t[o]))},measure:function(t,n,r){if("production"!==e.env.NODE_ENV){var o=null,i=function(){return f.enableMeasure?(o||(o=f.storedMeasure(t,n,r)),o.apply(this,arguments)):r.apply(this,arguments)};return i.displayName=t+"_"+n,i}return r},injection:{injectMeasure:function(e){f.storedMeasure=e}}};t.exports=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactPerf.js","/node_modules/react/lib")},{_process:43,buffer:3}],121:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){"use strict";var c={};"production"!==e.env.NODE_ENV&&(c={prop:"prop",context:"context",childContext:"child context"}),t.exports=c}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactPropTypeLocationNames.js","/node_modules/react/lib")},{_process:43,buffer:3}],122:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";var f=e("./keyMirror"),d=f({prop:null,context:null,childContext:null});t.exports=d}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactPropTypeLocations.js","/node_modules/react/lib")},{"./keyMirror":185,_process:43,buffer:3}],123:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e){function t(t,n,r,o,i){if(o=o||R,null==n[r]){var s=P[i];return t?new Error("Required "+s+" `"+r+"` was not specified in "+("`"+o+"`.")):null}return e(n,r,o,i)}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function d(e){function t(t,n,r,o){var i=t[n],s=E(i);if(s!==e){var a=P[o],u=x(i);return new Error("Invalid "+a+" `"+n+"` of type `"+u+"` "+("supplied to `"+r+"`, expected `"+e+"`."))}return null}return f(t)}function p(){return f(M.thatReturns(null))}function h(e){function t(t,n,r,o){var i=t[n];if(!Array.isArray(i)){var s=P[o],a=E(i);return new Error("Invalid "+s+" `"+n+"` of type "+("`"+a+"` supplied to `"+r+"`, expected an array."))}for(var u=0;u<i.length;u++){var l=e(i,u,r,o);if(l instanceof Error)return l}return null}return f(t)}function m(){function e(e,t,n,r){if(!S.isValidElement(e[t])){var o=P[r];return new Error("Invalid "+o+" `"+t+"` supplied to "+("`"+n+"`, expected a ReactElement."))}return null}return f(e)}function g(e){function t(t,n,r,o){if(!(t[n]instanceof e)){var i=P[o],s=e.name||R;return new Error("Invalid "+i+" `"+n+"` supplied to "+("`"+r+"`, expected instance of `"+s+"`."))}return null}return f(t)}function y(e){function t(t,n,r,o){for(var i=t[n],s=0;s<e.length;s++)if(i===e[s])return null;var a=P[o],u=JSON.stringify(e);return new Error("Invalid "+a+" `"+n+"` of value `"+i+"` "+("supplied to `"+r+"`, expected one of "+u+"."))}return f(t)}function v(e){function t(t,n,r,o){var i=t[n],s=E(i);if("object"!==s){var a=P[o];return new Error("Invalid "+a+" `"+n+"` of type "+("`"+s+"` supplied to `"+r+"`, expected an object."))}for(var u in i)if(i.hasOwnProperty(u)){var l=e(i,u,r,o);if(l instanceof Error)return l}return null}return f(t)}function b(e){function t(t,n,r,o){for(var i=0;i<e.length;i++){var s=e[i];if(null==s(t,n,r,o))return null}var a=P[o];return new Error("Invalid "+a+" `"+n+"` supplied to "+("`"+r+"`."))}return f(t)}function _(){function e(e,t,n,r){if(!T(e[t])){var o=P[r];return new Error("Invalid "+o+" `"+t+"` supplied to "+("`"+n+"`, expected a ReactNode."))}return null}return f(e)}function w(e){function t(t,n,r,o){var i=t[n],s=E(i);if("object"!==s){var a=P[o];return new Error("Invalid "+a+" `"+n+"` of type `"+s+"` "+("supplied to `"+r+"`, expected `object`."))}for(var u in e){var l=e[u];if(l){var c=l(i,u,r,o);if(c)return c}}return null}return f(t)}function T(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(T);if(null===e||S.isValidElement(e))return!0;e=C.extractIfFragment(e);for(var t in e)if(!T(e[t]))return!1;return!0;default:return!1}}function E(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":t}function x(e){var t=E(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp";
}return t}var S=e("./ReactElement"),C=e("./ReactFragment"),P=e("./ReactPropTypeLocationNames"),M=e("./emptyFunction"),R="<<anonymous>>",D=m(),O=_(),N={array:d("array"),bool:d("boolean"),func:d("function"),number:d("number"),object:d("object"),string:d("string"),any:p(),arrayOf:h,element:D,instanceOf:g,node:O,objectOf:v,oneOf:y,oneOfType:b,shape:w};t.exports=N}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactPropTypes.js","/node_modules/react/lib")},{"./ReactElement":102,"./ReactFragment":108,"./ReactPropTypeLocationNames":121,"./emptyFunction":159,_process:43,buffer:3}],124:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(){this.listenersToPut=[]}var d=e("./PooledClass"),p=e("./ReactBrowserEventEmitter"),h=e("./Object.assign");h(f.prototype,{enqueuePutListener:function(e,t,n){this.listenersToPut.push({rootNodeID:e,propKey:t,propValue:n})},putListeners:function(){for(var e=0;e<this.listenersToPut.length;e++){var t=this.listenersToPut[e];p.putListener(t.rootNodeID,t.propKey,t.propValue)}},reset:function(){this.listenersToPut.length=0},destructor:function(){this.reset()}}),d.addPoolingTo(f),t.exports=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactPutListenerQueue.js","/node_modules/react/lib")},{"./Object.assign":71,"./PooledClass":72,"./ReactBrowserEventEmitter":75,_process:43,buffer:3}],125:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(){this.reinitializeTransaction(),this.renderToStaticMarkup=!1,this.reactMountReady=d.getPooled(null),this.putListenerQueue=g.getPooled()}var d=e("./CallbackQueue"),p=e("./PooledClass"),h=e("./ReactBrowserEventEmitter"),m=e("./ReactInputSelection"),g=e("./ReactPutListenerQueue"),y=e("./Transaction"),v=e("./Object.assign"),b={initialize:m.getSelectionInformation,close:m.restoreSelection},_={initialize:function(){var e=h.isEnabled();return h.setEnabled(!1),e},close:function(e){h.setEnabled(e)}},w={initialize:function(){this.reactMountReady.reset()},close:function(){this.reactMountReady.notifyAll()}},T={initialize:function(){this.putListenerQueue.reset()},close:function(){this.putListenerQueue.putListeners()}},E=[T,b,_,w],x={getTransactionWrappers:function(){return E},getReactMountReady:function(){return this.reactMountReady},getPutListenerQueue:function(){return this.putListenerQueue},destructor:function(){d.release(this.reactMountReady),this.reactMountReady=null,g.release(this.putListenerQueue),this.putListenerQueue=null}};v(f.prototype,y.Mixin,x),p.addPoolingTo(f),t.exports=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactReconcileTransaction.js","/node_modules/react/lib")},{"./CallbackQueue":50,"./Object.assign":71,"./PooledClass":72,"./ReactBrowserEventEmitter":75,"./ReactInputSelection":110,"./ReactPutListenerQueue":124,"./Transaction":148,_process:43,buffer:3}],126:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(){d.attachRefs(this,this._currentElement)}var d=e("./ReactRef"),p=e("./ReactElementValidator"),h={mountComponent:function(e,t,r,o){var i=e.mountComponent(t,r,o);return"production"!==n.env.NODE_ENV&&p.checkAndWarnForMutatedProps(e._currentElement),r.getReactMountReady().enqueue(f,e),i},unmountComponent:function(e){d.detachRefs(e,e._currentElement),e.unmountComponent()},receiveComponent:function(e,t,r,o){var i=e._currentElement;if(t!==i||null==t._owner){"production"!==n.env.NODE_ENV&&p.checkAndWarnForMutatedProps(t);var s=d.shouldUpdateRefs(i,t);s&&d.detachRefs(e,i),e.receiveComponent(t,r,o),s&&r.getReactMountReady().enqueue(f,e)}},performUpdateIfNecessary:function(e,t){e.performUpdateIfNecessary(t)}};t.exports=h}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactReconciler.js","/node_modules/react/lib")},{"./ReactElementValidator":103,"./ReactRef":127,_process:43,buffer:3}],127:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e,t,n){"function"==typeof e?e(t.getPublicInstance()):p.addComponentAsRefTo(t,e,n)}function d(e,t,n){"function"==typeof e?e(null):p.removeComponentAsRefFrom(t,e,n)}var p=e("./ReactOwner"),h={};h.attachRefs=function(e,t){var n=t.ref;null!=n&&f(n,e,t._owner)},h.shouldUpdateRefs=function(e,t){return t._owner!==e._owner||t.ref!==e.ref},h.detachRefs=function(e,t){var n=t.ref;null!=n&&d(n,e,t._owner)},t.exports=h}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactRef.js","/node_modules/react/lib")},{"./ReactOwner":119,_process:43,buffer:3}],128:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){"use strict";var c={injectCreateReactRootIndex:function(e){f.createReactRootIndex=e}},f={createReactRootIndex:null,injection:c};t.exports=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactRootIndex.js","/node_modules/react/lib")},{_process:43,buffer:3}],129:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e){"production"!==n.env.NODE_ENV?b(p.isValidElement(e),"renderToString(): You must pass a valid ReactElement."):b(p.isValidElement(e));var t;try{var r=h.createReactRootID();return t=g.getPooled(!1),t.perform(function(){var n=v(e,null),o=n.mountComponent(r,t,y);return m.addChecksumToMarkup(o)},null)}finally{g.release(t)}}function d(e){"production"!==n.env.NODE_ENV?b(p.isValidElement(e),"renderToStaticMarkup(): You must pass a valid ReactElement."):b(p.isValidElement(e));var t;try{var r=h.createReactRootID();return t=g.getPooled(!0),t.perform(function(){var n=v(e,null);return n.mountComponent(r,t,y)},null)}finally{g.release(t)}}var p=e("./ReactElement"),h=e("./ReactInstanceHandles"),m=e("./ReactMarkupChecksum"),g=e("./ReactServerRenderingTransaction"),y=e("./emptyObject"),v=e("./instantiateReactComponent"),b=e("./invariant");t.exports={renderToString:f,renderToStaticMarkup:d}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactServerRendering.js","/node_modules/react/lib")},{"./ReactElement":102,"./ReactInstanceHandles":111,"./ReactMarkupChecksum":114,"./ReactServerRenderingTransaction":130,"./emptyObject":160,"./instantiateReactComponent":179,"./invariant":180,_process:43,buffer:3}],130:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e){this.reinitializeTransaction(),this.renderToStaticMarkup=e,this.reactMountReady=p.getPooled(null),this.putListenerQueue=h.getPooled()}var d=e("./PooledClass"),p=e("./CallbackQueue"),h=e("./ReactPutListenerQueue"),m=e("./Transaction"),g=e("./Object.assign"),y=e("./emptyFunction"),v={initialize:function(){this.reactMountReady.reset()},close:y},b={initialize:function(){this.putListenerQueue.reset()},close:y},_=[b,v],w={getTransactionWrappers:function(){return _},getReactMountReady:function(){return this.reactMountReady},getPutListenerQueue:function(){return this.putListenerQueue},destructor:function(){p.release(this.reactMountReady),this.reactMountReady=null,h.release(this.putListenerQueue),this.putListenerQueue=null}};g(f.prototype,m.Mixin,w),d.addPoolingTo(f),t.exports=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactServerRenderingTransaction.js","/node_modules/react/lib")},{"./CallbackQueue":50,"./Object.assign":71,"./PooledClass":72,"./ReactPutListenerQueue":124,"./Transaction":148,"./emptyFunction":159,_process:43,buffer:3}],131:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e){e!==p.currentlyMountingInstance&&y.enqueueUpdate(e)}function d(e,t){"production"!==n.env.NODE_ENV?b(null==h.current,"%s(...): Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state.",t):b(null==h.current);var r=g.get(e);return r?r===p.currentlyUnmountingInstance?null:r:("production"!==n.env.NODE_ENV&&("production"!==n.env.NODE_ENV?_(!t,"%s(...): Can only update a mounted or mounting component. This usually means you called %s() on an unmounted component. This is a no-op.",t,t):null),null)}var p=e("./ReactLifeCycle"),h=e("./ReactCurrentOwner"),m=e("./ReactElement"),g=e("./ReactInstanceMap"),y=e("./ReactUpdates"),v=e("./Object.assign"),b=e("./invariant"),_=e("./warning"),w={enqueueCallback:function(e,t){"production"!==n.env.NODE_ENV?b("function"==typeof t,"enqueueCallback(...): You called `setProps`, `replaceProps`, `setState`, `replaceState`, or `forceUpdate` with a callback that isn't callable."):b("function"==typeof t);var r=d(e);return r&&r!==p.currentlyMountingInstance?(r._pendingCallbacks?r._pendingCallbacks.push(t):r._pendingCallbacks=[t],void f(r)):null},enqueueCallbackInternal:function(e,t){"production"!==n.env.NODE_ENV?b("function"==typeof t,"enqueueCallback(...): You called `setProps`, `replaceProps`, `setState`, `replaceState`, or `forceUpdate` with a callback that isn't callable."):b("function"==typeof t),e._pendingCallbacks?e._pendingCallbacks.push(t):e._pendingCallbacks=[t],f(e)},enqueueForceUpdate:function(e){var t=d(e,"forceUpdate");t&&(t._pendingForceUpdate=!0,f(t))},enqueueReplaceState:function(e,t){var n=d(e,"replaceState");n&&(n._pendingStateQueue=[t],n._pendingReplaceState=!0,f(n))},enqueueSetState:function(e,t){var n=d(e,"setState");if(n){var r=n._pendingStateQueue||(n._pendingStateQueue=[]);r.push(t),f(n)}},enqueueSetProps:function(e,t){var r=d(e,"setProps");if(r){"production"!==n.env.NODE_ENV?b(r._isTopLevel,"setProps(...): You called `setProps` on a component with a parent. This is an anti-pattern since props will get reactively updated when rendered. Instead, change the owner's `render` method to pass the correct value as props to the component where it is created."):b(r._isTopLevel);var o=r._pendingElement||r._currentElement,i=v({},o.props,t);r._pendingElement=m.cloneAndReplaceProps(o,i),f(r)}},enqueueReplaceProps:function(e,t){var r=d(e,"replaceProps");if(r){"production"!==n.env.NODE_ENV?b(r._isTopLevel,"replaceProps(...): You called `replaceProps` on a component with a parent. This is an anti-pattern since props will get reactively updated when rendered. Instead, change the owner's `render` method to pass the correct value as props to the component where it is created."):b(r._isTopLevel);var o=r._pendingElement||r._currentElement;r._pendingElement=m.cloneAndReplaceProps(o,t),f(r)}},enqueueElementInternal:function(e,t){e._pendingElement=t,f(e)}};t.exports=w}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactUpdateQueue.js","/node_modules/react/lib")},{"./Object.assign":71,"./ReactCurrentOwner":84,"./ReactElement":102,"./ReactInstanceMap":112,"./ReactLifeCycle":113,"./ReactUpdates":132,"./invariant":180,"./warning":199,_process:43,buffer:3}],132:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(){"production"!==n.env.NODE_ENV?S(k.ReactReconcileTransaction&&D,"ReactUpdates: must inject a reconcile transaction class and batching strategy"):S(k.ReactReconcileTransaction&&D)}function d(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=v.getPooled(),this.reconcileTransaction=k.ReactReconcileTransaction.getPooled()}function p(e,t,n,r,o){f(),D.batchedUpdates(e,t,n,r,o)}function h(e,t){return e._mountOrder-t._mountOrder}function m(e){var t=e.dirtyComponentsLength;"production"!==n.env.NODE_ENV?S(t===P.length,"Expected flush transaction's stored dirty-components length (%s) to match dirty-components array length (%s).",t,P.length):S(t===P.length),P.sort(h);for(var r=0;t>r;r++){var o=P[r],i=o._pendingCallbacks;if(o._pendingCallbacks=null,T.performUpdateIfNecessary(o,e.reconcileTransaction),i)for(var s=0;s<i.length;s++)e.callbackQueue.enqueue(i[s],o.getPublicInstance())}}function g(e){return f(),"production"!==n.env.NODE_ENV?C(null==_.current,"enqueueUpdate(): Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate."):null,D.isBatchingUpdates?void P.push(e):void D.batchedUpdates(g,e)}function y(e,t){"production"!==n.env.NODE_ENV?S(D.isBatchingUpdates,"ReactUpdates.asap: Can't enqueue an asap callback in a context whereupdates are not being batched."):S(D.isBatchingUpdates),M.enqueue(e,t),R=!0}var v=e("./CallbackQueue"),b=e("./PooledClass"),_=e("./ReactCurrentOwner"),w=e("./ReactPerf"),T=e("./ReactReconciler"),E=e("./Transaction"),x=e("./Object.assign"),S=e("./invariant"),C=e("./warning"),P=[],M=v.getPooled(),R=!1,D=null,O={initialize:function(){this.dirtyComponentsLength=P.length},close:function(){this.dirtyComponentsLength!==P.length?(P.splice(0,this.dirtyComponentsLength),I()):P.length=0}},N={initialize:function(){this.callbackQueue.reset()},close:function(){this.callbackQueue.notifyAll()}},A=[O,N];x(d.prototype,E.Mixin,{getTransactionWrappers:function(){return A},destructor:function(){this.dirtyComponentsLength=null,v.release(this.callbackQueue),this.callbackQueue=null,k.ReactReconcileTransaction.release(this.reconcileTransaction),this.reconcileTransaction=null},perform:function(e,t,n){return E.Mixin.perform.call(this,this.reconcileTransaction.perform,this.reconcileTransaction,e,t,n)}}),b.addPoolingTo(d);var I=function(){for(;P.length||R;){if(P.length){var e=d.getPooled();e.perform(m,null,e),d.release(e)}if(R){R=!1;var t=M;M=v.getPooled(),t.notifyAll(),v.release(t)}}};I=w.measure("ReactUpdates","flushBatchedUpdates",I);var B={injectReconcileTransaction:function(e){"production"!==n.env.NODE_ENV?S(e,"ReactUpdates: must provide a reconcile transaction class"):S(e),k.ReactReconcileTransaction=e},injectBatchingStrategy:function(e){"production"!==n.env.NODE_ENV?S(e,"ReactUpdates: must provide a batching strategy"):S(e),"production"!==n.env.NODE_ENV?S("function"==typeof e.batchedUpdates,"ReactUpdates: must provide a batchedUpdates() function"):S("function"==typeof e.batchedUpdates),"production"!==n.env.NODE_ENV?S("boolean"==typeof e.isBatchingUpdates,"ReactUpdates: must provide an isBatchingUpdates boolean attribute"):S("boolean"==typeof e.isBatchingUpdates),D=e}},k={ReactReconcileTransaction:null,batchedUpdates:p,enqueueUpdate:g,flushBatchedUpdates:I,injection:B,asap:y};t.exports=k}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ReactUpdates.js","/node_modules/react/lib")},{"./CallbackQueue":50,"./Object.assign":71,"./PooledClass":72,"./ReactCurrentOwner":84,"./ReactPerf":120,"./ReactReconciler":126,"./Transaction":148,"./invariant":180,"./warning":199,_process:43,buffer:3}],133:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";var f=e("./DOMProperty"),d=f.injection.MUST_USE_ATTRIBUTE,p={Properties:{clipPath:d,cx:d,cy:d,d:d,dx:d,dy:d,fill:d,fillOpacity:d,fontFamily:d,fontSize:d,fx:d,fy:d,gradientTransform:d,gradientUnits:d,markerEnd:d,markerMid:d,markerStart:d,offset:d,opacity:d,patternContentUnits:d,patternUnits:d,points:d,preserveAspectRatio:d,r:d,rx:d,ry:d,spreadMethod:d,stopColor:d,stopOpacity:d,stroke:d,strokeDasharray:d,strokeLinecap:d,strokeOpacity:d,strokeWidth:d,textAnchor:d,transform:d,version:d,viewBox:d,x1:d,x2:d,x:d,y1:d,y2:d,y:d},DOMAttributeNames:{clipPath:"clip-path",fillOpacity:"fill-opacity",fontFamily:"font-family",fontSize:"font-size",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",patternContentUnits:"patternContentUnits",patternUnits:"patternUnits",preserveAspectRatio:"preserveAspectRatio",spreadMethod:"spreadMethod",stopColor:"stop-color",stopOpacity:"stop-opacity",strokeDasharray:"stroke-dasharray",strokeLinecap:"stroke-linecap",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",textAnchor:"text-anchor",viewBox:"viewBox"}};t.exports=p}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/SVGDOMPropertyConfig.js","/node_modules/react/lib")},{"./DOMProperty":54,_process:43,buffer:3}],134:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e){if("selectionStart"in e&&m.hasSelectionCapabilities(e))return{start:e.selectionStart,end:e.selectionEnd};if(window.getSelection){var t=window.getSelection();return{anchorNode:t.anchorNode,anchorOffset:t.anchorOffset,focusNode:t.focusNode,focusOffset:t.focusOffset}}if(document.selection){var n=document.selection.createRange();return{parentElement:n.parentElement(),text:n.text,top:n.boundingTop,left:n.boundingLeft}}}function d(e){if(C||null==E||E!==y())return null;var t=f(E);if(!S||!_(S,t)){S=t;var n=g.getPooled(T.select,x,e);return n.type="select",n.target=E,h.accumulateTwoPhaseDispatches(n),n}}var p=e("./EventConstants"),h=e("./EventPropagators"),m=e("./ReactInputSelection"),g=e("./SyntheticEvent"),y=e("./getActiveElement"),v=e("./isTextInputElement"),b=e("./keyOf"),_=e("./shallowEqual"),w=p.topLevelTypes,T={select:{phasedRegistrationNames:{bubbled:b({onSelect:null}),captured:b({onSelectCapture:null})},dependencies:[w.topBlur,w.topContextMenu,w.topFocus,w.topKeyDown,w.topMouseDown,w.topMouseUp,w.topSelectionChange]}},E=null,x=null,S=null,C=!1,P={eventTypes:T,extractEvents:function(e,t,n,r){switch(e){case w.topFocus:(v(t)||"true"===t.contentEditable)&&(E=t,x=n,S=null);break;case w.topBlur:E=null,x=null,S=null;break;case w.topMouseDown:C=!0;break;case w.topContextMenu:case w.topMouseUp:return C=!1,d(r);case w.topSelectionChange:case w.topKeyDown:case w.topKeyUp:return d(r)}}};t.exports=P}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/SelectEventPlugin.js","/node_modules/react/lib")},{"./EventConstants":59,"./EventPropagators":64,"./ReactInputSelection":110,"./SyntheticEvent":140,"./getActiveElement":166,"./isTextInputElement":183,"./keyOf":186,"./shallowEqual":195,_process:43,buffer:3}],135:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){"use strict";var c=Math.pow(2,53),f={createReactRootIndex:function(){return Math.ceil(Math.random()*c)}};t.exports=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ServerReactRootIndex.js","/node_modules/react/lib")},{_process:43,buffer:3}],136:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";var f=e("./EventConstants"),d=e("./EventPluginUtils"),p=e("./EventPropagators"),h=e("./SyntheticClipboardEvent"),m=e("./SyntheticEvent"),g=e("./SyntheticFocusEvent"),y=e("./SyntheticKeyboardEvent"),v=e("./SyntheticMouseEvent"),b=e("./SyntheticDragEvent"),_=e("./SyntheticTouchEvent"),w=e("./SyntheticUIEvent"),T=e("./SyntheticWheelEvent"),E=e("./getEventCharCode"),x=e("./invariant"),S=e("./keyOf"),C=e("./warning"),P=f.topLevelTypes,M={blur:{phasedRegistrationNames:{bubbled:S({onBlur:!0}),captured:S({onBlurCapture:!0})}},click:{phasedRegistrationNames:{bubbled:S({onClick:!0}),captured:S({onClickCapture:!0})}},contextMenu:{phasedRegistrationNames:{bubbled:S({onContextMenu:!0}),captured:S({onContextMenuCapture:!0})}},copy:{phasedRegistrationNames:{bubbled:S({onCopy:!0}),captured:S({onCopyCapture:!0})}},cut:{phasedRegistrationNames:{bubbled:S({onCut:!0}),captured:S({onCutCapture:!0})}},doubleClick:{phasedRegistrationNames:{bubbled:S({onDoubleClick:!0}),captured:S({onDoubleClickCapture:!0})}},drag:{phasedRegistrationNames:{bubbled:S({onDrag:!0}),captured:S({onDragCapture:!0})}},dragEnd:{phasedRegistrationNames:{bubbled:S({onDragEnd:!0}),captured:S({onDragEndCapture:!0})}},dragEnter:{phasedRegistrationNames:{bubbled:S({onDragEnter:!0}),captured:S({onDragEnterCapture:!0})}},dragExit:{phasedRegistrationNames:{bubbled:S({onDragExit:!0}),captured:S({onDragExitCapture:!0})}},dragLeave:{phasedRegistrationNames:{bubbled:S({onDragLeave:!0}),captured:S({onDragLeaveCapture:!0})}},dragOver:{phasedRegistrationNames:{bubbled:S({onDragOver:!0}),captured:S({onDragOverCapture:!0})}},dragStart:{phasedRegistrationNames:{bubbled:S({onDragStart:!0}),captured:S({onDragStartCapture:!0})}},drop:{phasedRegistrationNames:{bubbled:S({onDrop:!0}),captured:S({onDropCapture:!0})}},focus:{phasedRegistrationNames:{bubbled:S({onFocus:!0}),captured:S({onFocusCapture:!0})}},input:{phasedRegistrationNames:{bubbled:S({onInput:!0}),captured:S({onInputCapture:!0})}},keyDown:{phasedRegistrationNames:{bubbled:S({onKeyDown:!0}),captured:S({onKeyDownCapture:!0})}},keyPress:{phasedRegistrationNames:{bubbled:S({onKeyPress:!0}),captured:S({onKeyPressCapture:!0})}},keyUp:{phasedRegistrationNames:{bubbled:S({onKeyUp:!0}),captured:S({onKeyUpCapture:!0})}},load:{phasedRegistrationNames:{bubbled:S({onLoad:!0}),captured:S({onLoadCapture:!0})}},error:{phasedRegistrationNames:{bubbled:S({onError:!0}),captured:S({onErrorCapture:!0})}},mouseDown:{phasedRegistrationNames:{bubbled:S({onMouseDown:!0}),captured:S({onMouseDownCapture:!0})}},mouseMove:{phasedRegistrationNames:{bubbled:S({onMouseMove:!0}),captured:S({onMouseMoveCapture:!0})}},mouseOut:{phasedRegistrationNames:{bubbled:S({onMouseOut:!0}),captured:S({onMouseOutCapture:!0})}},mouseOver:{phasedRegistrationNames:{bubbled:S({onMouseOver:!0}),captured:S({onMouseOverCapture:!0})}},mouseUp:{phasedRegistrationNames:{bubbled:S({onMouseUp:!0}),captured:S({onMouseUpCapture:!0})}},paste:{phasedRegistrationNames:{bubbled:S({onPaste:!0}),captured:S({onPasteCapture:!0})}},reset:{phasedRegistrationNames:{bubbled:S({onReset:!0}),captured:S({onResetCapture:!0})}},scroll:{phasedRegistrationNames:{bubbled:S({onScroll:!0}),captured:S({onScrollCapture:!0})}},submit:{phasedRegistrationNames:{bubbled:S({onSubmit:!0}),captured:S({onSubmitCapture:!0})}},touchCancel:{phasedRegistrationNames:{bubbled:S({onTouchCancel:!0}),captured:S({onTouchCancelCapture:!0})}},touchEnd:{phasedRegistrationNames:{bubbled:S({onTouchEnd:!0}),captured:S({onTouchEndCapture:!0})}},touchMove:{phasedRegistrationNames:{bubbled:S({onTouchMove:!0}),captured:S({onTouchMoveCapture:!0})}},touchStart:{phasedRegistrationNames:{bubbled:S({onTouchStart:!0}),captured:S({onTouchStartCapture:!0})}},wheel:{phasedRegistrationNames:{bubbled:S({onWheel:!0}),captured:S({onWheelCapture:!0})}}},R={topBlur:M.blur,topClick:M.click,topContextMenu:M.contextMenu,topCopy:M.copy,topCut:M.cut,topDoubleClick:M.doubleClick,topDrag:M.drag,topDragEnd:M.dragEnd,topDragEnter:M.dragEnter,topDragExit:M.dragExit,topDragLeave:M.dragLeave,topDragOver:M.dragOver,topDragStart:M.dragStart,topDrop:M.drop,topError:M.error,topFocus:M.focus,topInput:M.input,topKeyDown:M.keyDown,topKeyPress:M.keyPress,topKeyUp:M.keyUp,topLoad:M.load,topMouseDown:M.mouseDown,topMouseMove:M.mouseMove,topMouseOut:M.mouseOut,topMouseOver:M.mouseOver,topMouseUp:M.mouseUp,topPaste:M.paste,topReset:M.reset,topScroll:M.scroll,topSubmit:M.submit,topTouchCancel:M.touchCancel,topTouchEnd:M.touchEnd,topTouchMove:M.touchMove,topTouchStart:M.touchStart,topWheel:M.wheel};for(var D in R)R[D].dependencies=[D];var O={eventTypes:M,executeDispatch:function(e,t,r){var o=d.executeDispatch(e,t,r);"production"!==n.env.NODE_ENV?C("boolean"!=typeof o,"Returning `false` from an event handler is deprecated and will be ignored in a future release. Instead, manually call e.stopPropagation() or e.preventDefault(), as appropriate."):null,o===!1&&(e.stopPropagation(),e.preventDefault())},extractEvents:function(e,t,r,o){var i=R[e];if(!i)return null;var s;switch(e){case P.topInput:case P.topLoad:case P.topError:case P.topReset:case P.topSubmit:s=m;break;case P.topKeyPress:if(0===E(o))return null;case P.topKeyDown:case P.topKeyUp:s=y;break;case P.topBlur:case P.topFocus:s=g;break;case P.topClick:if(2===o.button)return null;case P.topContextMenu:case P.topDoubleClick:case P.topMouseDown:case P.topMouseMove:case P.topMouseOut:case P.topMouseOver:case P.topMouseUp:s=v;break;case P.topDrag:case P.topDragEnd:case P.topDragEnter:case P.topDragExit:case P.topDragLeave:case P.topDragOver:case P.topDragStart:case P.topDrop:s=b;break;case P.topTouchCancel:case P.topTouchEnd:case P.topTouchMove:case P.topTouchStart:s=_;break;case P.topScroll:s=w;break;case P.topWheel:s=T;break;case P.topCopy:case P.topCut:case P.topPaste:s=h}"production"!==n.env.NODE_ENV?x(s,"SimpleEventPlugin: Unhandled event type, `%s`.",e):x(s);var a=s.getPooled(i,r,o);return p.accumulateTwoPhaseDispatches(a),a}};t.exports=O}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/SimpleEventPlugin.js","/node_modules/react/lib")},{"./EventConstants":59,"./EventPluginUtils":63,"./EventPropagators":64,"./SyntheticClipboardEvent":137,"./SyntheticDragEvent":139,"./SyntheticEvent":140,"./SyntheticFocusEvent":141,"./SyntheticKeyboardEvent":143,"./SyntheticMouseEvent":144,"./SyntheticTouchEvent":145,"./SyntheticUIEvent":146,"./SyntheticWheelEvent":147,"./getEventCharCode":167,"./invariant":180,"./keyOf":186,"./warning":199,_process:43,buffer:3}],137:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e,t,n){d.call(this,e,t,n)}var d=e("./SyntheticEvent"),p={clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}};d.augmentClass(f,p),t.exports=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/SyntheticClipboardEvent.js","/node_modules/react/lib")},{"./SyntheticEvent":140,_process:43,buffer:3}],138:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e,t,n){d.call(this,e,t,n)}var d=e("./SyntheticEvent"),p={data:null};d.augmentClass(f,p),t.exports=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/SyntheticCompositionEvent.js","/node_modules/react/lib")},{"./SyntheticEvent":140,_process:43,buffer:3}],139:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e,t,n){d.call(this,e,t,n)}var d=e("./SyntheticMouseEvent"),p={dataTransfer:null};d.augmentClass(f,p),t.exports=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/SyntheticDragEvent.js","/node_modules/react/lib")},{"./SyntheticMouseEvent":144,_process:43,buffer:3}],140:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e,t,n){this.dispatchConfig=e,this.dispatchMarker=t,this.nativeEvent=n;var r=this.constructor.Interface;for(var o in r)if(r.hasOwnProperty(o)){var i=r[o];i?this[o]=i(n):this[o]=n[o]}var s=null!=n.defaultPrevented?n.defaultPrevented:n.returnValue===!1;s?this.isDefaultPrevented=h.thatReturnsTrue:this.isDefaultPrevented=h.thatReturnsFalse,this.isPropagationStopped=h.thatReturnsFalse}var d=e("./PooledClass"),p=e("./Object.assign"),h=e("./emptyFunction"),m=e("./getEventTarget"),g={type:null,target:m,currentTarget:h.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};p(f.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e.preventDefault?e.preventDefault():e.returnValue=!1,this.isDefaultPrevented=h.thatReturnsTrue},stopPropagation:function(){var e=this.nativeEvent;e.stopPropagation?e.stopPropagation():e.cancelBubble=!0,this.isPropagationStopped=h.thatReturnsTrue},persist:function(){this.isPersistent=h.thatReturnsTrue},isPersistent:h.thatReturnsFalse,destructor:function(){var e=this.constructor.Interface;for(var t in e)this[t]=null;this.dispatchConfig=null,this.dispatchMarker=null,this.nativeEvent=null}}),f.Interface=g,f.augmentClass=function(e,t){var n=this,r=Object.create(n.prototype);p(r,e.prototype),e.prototype=r,e.prototype.constructor=e,e.Interface=p({},n.Interface,t),e.augmentClass=n.augmentClass,d.addPoolingTo(e,d.threeArgumentPooler)},d.addPoolingTo(f,d.threeArgumentPooler),t.exports=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/SyntheticEvent.js","/node_modules/react/lib")},{"./Object.assign":71,"./PooledClass":72,"./emptyFunction":159,"./getEventTarget":170,_process:43,buffer:3}],141:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e,t,n){d.call(this,e,t,n)}var d=e("./SyntheticUIEvent"),p={relatedTarget:null};d.augmentClass(f,p),t.exports=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/SyntheticFocusEvent.js","/node_modules/react/lib")},{"./SyntheticUIEvent":146,_process:43,buffer:3}],142:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e,t,n){d.call(this,e,t,n)}var d=e("./SyntheticEvent"),p={data:null};d.augmentClass(f,p),t.exports=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/SyntheticInputEvent.js","/node_modules/react/lib")},{"./SyntheticEvent":140,_process:43,buffer:3}],143:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e,t,n){d.call(this,e,t,n)}var d=e("./SyntheticUIEvent"),p=e("./getEventCharCode"),h=e("./getEventKey"),m=e("./getEventModifierState"),g={key:h,location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:m,charCode:function(e){return"keypress"===e.type?p(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?p(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}};d.augmentClass(f,g),t.exports=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/SyntheticKeyboardEvent.js","/node_modules/react/lib");
},{"./SyntheticUIEvent":146,"./getEventCharCode":167,"./getEventKey":168,"./getEventModifierState":169,_process:43,buffer:3}],144:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e,t,n){d.call(this,e,t,n)}var d=e("./SyntheticUIEvent"),p=e("./ViewportMetrics"),h=e("./getEventModifierState"),m={screenX:null,screenY:null,clientX:null,clientY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:h,button:function(e){var t=e.button;return"which"in e?t:2===t?2:4===t?1:0},buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},pageX:function(e){return"pageX"in e?e.pageX:e.clientX+p.currentScrollLeft},pageY:function(e){return"pageY"in e?e.pageY:e.clientY+p.currentScrollTop}};d.augmentClass(f,m),t.exports=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/SyntheticMouseEvent.js","/node_modules/react/lib")},{"./SyntheticUIEvent":146,"./ViewportMetrics":149,"./getEventModifierState":169,_process:43,buffer:3}],145:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e,t,n){d.call(this,e,t,n)}var d=e("./SyntheticUIEvent"),p=e("./getEventModifierState"),h={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:p};d.augmentClass(f,h),t.exports=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/SyntheticTouchEvent.js","/node_modules/react/lib")},{"./SyntheticUIEvent":146,"./getEventModifierState":169,_process:43,buffer:3}],146:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e,t,n){d.call(this,e,t,n)}var d=e("./SyntheticEvent"),p=e("./getEventTarget"),h={view:function(e){if(e.view)return e.view;var t=p(e);if(null!=t&&t.window===t)return t;var n=t.ownerDocument;return n?n.defaultView||n.parentWindow:window},detail:function(e){return e.detail||0}};d.augmentClass(f,h),t.exports=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/SyntheticUIEvent.js","/node_modules/react/lib")},{"./SyntheticEvent":140,"./getEventTarget":170,_process:43,buffer:3}],147:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e,t,n){d.call(this,e,t,n)}var d=e("./SyntheticMouseEvent"),p={deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null};d.augmentClass(f,p),t.exports=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/SyntheticWheelEvent.js","/node_modules/react/lib")},{"./SyntheticMouseEvent":144,_process:43,buffer:3}],148:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";var f=e("./invariant"),d={reinitializeTransaction:function(){this.transactionWrappers=this.getTransactionWrappers(),this.wrapperInitData?this.wrapperInitData.length=0:this.wrapperInitData=[],this._isInTransaction=!1},_isInTransaction:!1,getTransactionWrappers:null,isInTransaction:function(){return!!this._isInTransaction},perform:function(e,t,r,o,i,s,a,u){"production"!==n.env.NODE_ENV?f(!this.isInTransaction(),"Transaction.perform(...): Cannot initialize a transaction when there is already an outstanding transaction."):f(!this.isInTransaction());var l,c;try{this._isInTransaction=!0,l=!0,this.initializeAll(0),c=e.call(t,r,o,i,s,a,u),l=!1}finally{try{if(l)try{this.closeAll(0)}catch(d){}else this.closeAll(0)}finally{this._isInTransaction=!1}}return c},initializeAll:function(e){for(var t=this.transactionWrappers,n=e;n<t.length;n++){var r=t[n];try{this.wrapperInitData[n]=p.OBSERVED_ERROR,this.wrapperInitData[n]=r.initialize?r.initialize.call(this):null}finally{if(this.wrapperInitData[n]===p.OBSERVED_ERROR)try{this.initializeAll(n+1)}catch(o){}}}},closeAll:function(e){"production"!==n.env.NODE_ENV?f(this.isInTransaction(),"Transaction.closeAll(): Cannot close transaction when none are open."):f(this.isInTransaction());for(var t=this.transactionWrappers,r=e;r<t.length;r++){var o,i=t[r],s=this.wrapperInitData[r];try{o=!0,s!==p.OBSERVED_ERROR&&i.close&&i.close.call(this,s),o=!1}finally{if(o)try{this.closeAll(r+1)}catch(a){}}}this.wrapperInitData.length=0}},p={Mixin:d,OBSERVED_ERROR:{}};t.exports=p}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/Transaction.js","/node_modules/react/lib")},{"./invariant":180,_process:43,buffer:3}],149:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){"use strict";var c={currentScrollLeft:0,currentScrollTop:0,refreshScrollValues:function(e){c.currentScrollLeft=e.x,c.currentScrollTop=e.y}};t.exports=c}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/ViewportMetrics.js","/node_modules/react/lib")},{_process:43,buffer:3}],150:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e,t){if("production"!==n.env.NODE_ENV?d(null!=t,"accumulateInto(...): Accumulated items must not be null or undefined."):d(null!=t),null==e)return t;var r=Array.isArray(e),o=Array.isArray(t);return r&&o?(e.push.apply(e,t),e):r?(e.push(t),e):o?[e].concat(t):[e,t]}var d=e("./invariant");t.exports=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/accumulateInto.js","/node_modules/react/lib")},{"./invariant":180,_process:43,buffer:3}],151:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){"use strict";function c(e){for(var t=1,n=0,r=0;r<e.length;r++)t=(t+e.charCodeAt(r))%f,n=(n+t)%f;return t|n<<16}var f=65521;t.exports=c}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/adler32.js","/node_modules/react/lib")},{_process:43,buffer:3}],152:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){function c(e){return e.replace(f,function(e,t){return t.toUpperCase()})}var f=/-(.)/g;t.exports=c}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/camelize.js","/node_modules/react/lib")},{_process:43,buffer:3}],153:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e){return d(e.replace(p,"ms-"))}var d=e("./camelize"),p=/^-ms-/;t.exports=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/camelizeStyleName.js","/node_modules/react/lib")},{"./camelize":152,_process:43,buffer:3}],154:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){function f(e,t){return e&&t?e===t?!0:d(e)?!1:d(t)?f(e,t.parentNode):e.contains?e.contains(t):e.compareDocumentPosition?!!(16&e.compareDocumentPosition(t)):!1:!1}var d=e("./isTextNode");t.exports=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/containsNode.js","/node_modules/react/lib")},{"./isTextNode":184,_process:43,buffer:3}],155:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){function f(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"length"in e&&!("setInterval"in e)&&"number"!=typeof e.nodeType&&(Array.isArray(e)||"callee"in e||"item"in e)}function d(e){return f(e)?Array.isArray(e)?e.slice():p(e):[e]}var p=e("./toArray");t.exports=d}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/createArrayFromMixed.js","/node_modules/react/lib")},{"./toArray":197,_process:43,buffer:3}],156:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e){var t=p.createFactory(e),r=d.createClass({tagName:e.toUpperCase(),displayName:"ReactFullPageComponent"+e,componentWillUnmount:function(){"production"!==n.env.NODE_ENV?h(!1,"%s tried to unmount. Because of cross-browser quirks it is impossible to unmount some top-level components (eg <html>, <head>, and <body>) reliably and efficiently. To fix this, have a single top-level component that never unmounts render these elements.",this.constructor.displayName):h(!1)},render:function(){return t(this.props)}});return r}var d=e("./ReactClass"),p=e("./ReactElement"),h=e("./invariant");t.exports=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/createFullPageComponent.js","/node_modules/react/lib")},{"./ReactClass":78,"./ReactElement":102,"./invariant":180,_process:43,buffer:3}],157:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){function f(e){var t=e.match(v);return t&&t[1].toLowerCase()}function d(e,t){var r=y;"production"!==n.env.NODE_ENV?g(!!y,"createNodesFromMarkup dummy not initialized"):g(!!y);var o=f(e),i=o&&m(o);if(i){r.innerHTML=i[1]+e+i[2];for(var s=i[0];s--;)r=r.lastChild}else r.innerHTML=e;var a=r.getElementsByTagName("script");a.length&&("production"!==n.env.NODE_ENV?g(t,"createNodesFromMarkup(...): Unexpected <script> element rendered."):g(t),h(a).forEach(t));for(var u=h(r.childNodes);r.lastChild;)r.removeChild(r.lastChild);return u}var p=e("./ExecutionEnvironment"),h=e("./createArrayFromMixed"),m=e("./getMarkupWrap"),g=e("./invariant"),y=p.canUseDOM?document.createElement("div"):null,v=/^\s*<(\w+)/;t.exports=d}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/createNodesFromMarkup.js","/node_modules/react/lib")},{"./ExecutionEnvironment":65,"./createArrayFromMixed":155,"./getMarkupWrap":172,"./invariant":180,_process:43,buffer:3}],158:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e,t){var n=null==t||"boolean"==typeof t||""===t;if(n)return"";var r=isNaN(t);return r||0===t||p.hasOwnProperty(e)&&p[e]?""+t:("string"==typeof t&&(t=t.trim()),t+"px")}var d=e("./CSSProperty"),p=d.isUnitlessNumber;t.exports=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/dangerousStyleValue.js","/node_modules/react/lib")},{"./CSSProperty":48,_process:43,buffer:3}],159:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){function c(e){return function(){return e}}function f(){}f.thatReturns=c,f.thatReturnsFalse=c(!1),f.thatReturnsTrue=c(!0),f.thatReturnsNull=c(null),f.thatReturnsThis=function(){return this},f.thatReturnsArgument=function(e){return e},t.exports=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/emptyFunction.js","/node_modules/react/lib")},{_process:43,buffer:3}],160:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){"use strict";var c={};"production"!==e.env.NODE_ENV&&Object.freeze(c),t.exports=c}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/emptyObject.js","/node_modules/react/lib")},{_process:43,buffer:3}],161:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){"use strict";function c(e){return d[e]}function f(e){return(""+e).replace(p,c)}var d={"&":"&",">":">","<":"<",'"':""","'":"'"},p=/[&><"']/g;t.exports=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/escapeTextContentForBrowser.js","/node_modules/react/lib")},{_process:43,buffer:3}],162:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e){if("production"!==n.env.NODE_ENV){var t=d.current;null!==t&&("production"!==n.env.NODE_ENV?y(t._warnedAboutRefsInRender,"%s is accessing getDOMNode or findDOMNode inside its render(). render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",t.getName()||"A component"):null,t._warnedAboutRefsInRender=!0)}return null==e?null:g(e)?e:p.has(e)?h.getNodeFromInstance(e):("production"!==n.env.NODE_ENV?m(null==e.render||"function"!=typeof e.render,"Component (with keys: %s) contains `render` method but is not mounted in the DOM",Object.keys(e)):m(null==e.render||"function"!=typeof e.render),void("production"!==n.env.NODE_ENV?m(!1,"Element appears to be neither ReactComponent nor DOMNode (keys: %s)",Object.keys(e)):m(!1)))}var d=e("./ReactCurrentOwner"),p=e("./ReactInstanceMap"),h=e("./ReactMount"),m=e("./invariant"),g=e("./isNode"),y=e("./warning");t.exports=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/findDOMNode.js","/node_modules/react/lib")},{"./ReactCurrentOwner":84,"./ReactInstanceMap":112,"./ReactMount":115,"./invariant":180,"./isNode":182,"./warning":199,_process:43,buffer:3}],163:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e,t,r){var o=e,i=!o.hasOwnProperty(r);"production"!==n.env.NODE_ENV&&("production"!==n.env.NODE_ENV?h(i,"flattenChildren(...): Encountered two children with the same key, `%s`. Child keys must be unique; when two children share a key, only the first child will be used.",r):null),i&&null!=t&&(o[r]=t)}function d(e){if(null==e)return e;var t={};return p(e,f,t),t}var p=e("./traverseAllChildren"),h=e("./warning");t.exports=d}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/flattenChildren.js","/node_modules/react/lib")},{"./traverseAllChildren":198,"./warning":199,_process:43,buffer:3}],164:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){"use strict";function c(e){try{e.focus()}catch(t){}}t.exports=c}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/focusNode.js","/node_modules/react/lib")},{_process:43,buffer:3}],165:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){"use strict";var c=function(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)};t.exports=c}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/forEachAccumulated.js","/node_modules/react/lib")},{_process:43,buffer:3}],166:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){function c(){try{return document.activeElement||document.body}catch(e){return document.body}}t.exports=c}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/getActiveElement.js","/node_modules/react/lib")},{_process:43,buffer:3}],167:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){"use strict";function c(e){var t,n=e.keyCode;return"charCode"in e?(t=e.charCode,0===t&&13===n&&(t=13)):t=n,t>=32||13===t?t:0}t.exports=c}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/getEventCharCode.js","/node_modules/react/lib")},{_process:43,buffer:3}],168:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e){if(e.key){var t=p[e.key]||e.key;if("Unidentified"!==t)return t}if("keypress"===e.type){var n=d(e);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===e.type||"keyup"===e.type?h[e.keyCode]||"Unidentified":""}var d=e("./getEventCharCode"),p={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},h={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};t.exports=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/getEventKey.js","/node_modules/react/lib")},{"./getEventCharCode":167,_process:43,buffer:3}],169:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){"use strict";function c(e){var t=this,n=t.nativeEvent;if(n.getModifierState)return n.getModifierState(e);var r=d[e];return r?!!n[r]:!1}function f(e){return c}var d={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};t.exports=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/getEventModifierState.js","/node_modules/react/lib")},{_process:43,buffer:3}],170:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){"use strict";function c(e){var t=e.target||e.srcElement||window;return 3===t.nodeType?t.parentNode:t}t.exports=c}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/getEventTarget.js","/node_modules/react/lib")},{_process:43,buffer:3}],171:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){"use strict";function c(e){var t=e&&(f&&e[f]||e[d]);return"function"==typeof t?t:void 0}var f="function"==typeof Symbol&&Symbol.iterator,d="@@iterator";t.exports=c}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/getIteratorFn.js","/node_modules/react/lib")},{_process:43,buffer:3}],172:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){function f(e){return"production"!==n.env.NODE_ENV?p(!!h,"Markup wrapping node not initialized"):p(!!h),_.hasOwnProperty(e)||(e="*"),m.hasOwnProperty(e)||("*"===e?h.innerHTML="<link />":h.innerHTML="<"+e+"></"+e+">",m[e]=!h.firstChild),m[e]?_[e]:null}var d=e("./ExecutionEnvironment"),p=e("./invariant"),h=d.canUseDOM?document.createElement("div"):null,m={circle:!0,clipPath:!0,defs:!0,ellipse:!0,g:!0,line:!0,linearGradient:!0,path:!0,polygon:!0,polyline:!0,radialGradient:!0,rect:!0,stop:!0,text:!0},g=[1,'<select multiple="true">',"</select>"],y=[1,"<table>","</table>"],v=[3,"<table><tbody><tr>","</tr></tbody></table>"],b=[1,"<svg>","</svg>"],_={"*":[1,"?<div>","</div>"],area:[1,"<map>","</map>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],legend:[1,"<fieldset>","</fieldset>"],param:[1,"<object>","</object>"],tr:[2,"<table><tbody>","</tbody></table>"],optgroup:g,option:g,caption:y,colgroup:y,tbody:y,tfoot:y,thead:y,td:v,th:v,circle:b,clipPath:b,defs:b,ellipse:b,g:b,line:b,linearGradient:b,path:b,polygon:b,polyline:b,radialGradient:b,rect:b,stop:b,text:b};t.exports=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/getMarkupWrap.js","/node_modules/react/lib")},{"./ExecutionEnvironment":65,"./invariant":180,_process:43,buffer:3}],173:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){"use strict";function c(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function f(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function d(e,t){for(var n=c(e),r=0,o=0;n;){if(3===n.nodeType){if(o=r+n.textContent.length,t>=r&&o>=t)return{node:n,offset:t-r};r=o}n=c(f(n))}}t.exports=d}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/getNodeForCharacterOffset.js","/node_modules/react/lib")},{_process:43,buffer:3}],174:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){"use strict";function c(e){return e?e.nodeType===f?e.documentElement:e.firstChild:null}var f=9;t.exports=c}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/getReactRootElementInContainer.js","/node_modules/react/lib")},{_process:43,buffer:3}],175:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(){return!p&&d.canUseDOM&&(p="textContent"in document.documentElement?"textContent":"innerText"),p}var d=e("./ExecutionEnvironment"),p=null;t.exports=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/getTextContentAccessor.js","/node_modules/react/lib")},{"./ExecutionEnvironment":65,_process:43,buffer:3}],176:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){"use strict";function c(e){return e===window?{x:window.pageXOffset||document.documentElement.scrollLeft,y:window.pageYOffset||document.documentElement.scrollTop}:{x:e.scrollLeft,y:e.scrollTop}}t.exports=c}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/getUnboundedScrollPosition.js","/node_modules/react/lib")},{_process:43,buffer:3}],177:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){function c(e){return e.replace(f,"-$1").toLowerCase()}var f=/([A-Z])/g;t.exports=c}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/hyphenate.js","/node_modules/react/lib")},{_process:43,buffer:3}],178:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e){return d(e).replace(p,"-ms-")}var d=e("./hyphenate"),p=/^ms-/;t.exports=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/hyphenateStyleName.js","/node_modules/react/lib")},{"./hyphenate":177,_process:43,buffer:3}],179:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e){return"function"==typeof e&&"undefined"!=typeof e.prototype&&"function"==typeof e.prototype.mountComponent&&"function"==typeof e.prototype.receiveComponent}function d(e,t){var r;if((null===e||e===!1)&&(e=h.emptyElement),"object"==typeof e){var o=e;"production"!==n.env.NODE_ENV&&("production"!==n.env.NODE_ENV?v(o&&("function"==typeof o.type||"string"==typeof o.type),"Only functions or strings can be mounted as React components."):null),r=t===o.type&&"string"==typeof o.type?m.createInternalComponent(o):f(o.type)?new o.type(o):new b}else"string"==typeof e||"number"==typeof e?r=m.createInstanceForText(e):"production"!==n.env.NODE_ENV?y(!1,"Encountered invalid React node of type %s",typeof e):y(!1);return"production"!==n.env.NODE_ENV&&("production"!==n.env.NODE_ENV?v("function"==typeof r.construct&&"function"==typeof r.mountComponent&&"function"==typeof r.receiveComponent&&"function"==typeof r.unmountComponent,"Only React Components can be mounted."):null),r.construct(e),r._mountIndex=0,r._mountImage=null,"production"!==n.env.NODE_ENV&&(r._isOwnerNecessary=!1,r._warnedAboutRefsInRender=!1),"production"!==n.env.NODE_ENV&&Object.preventExtensions&&Object.preventExtensions(r),r}var p=e("./ReactCompositeComponent"),h=e("./ReactEmptyComponent"),m=e("./ReactNativeComponent"),g=e("./Object.assign"),y=e("./invariant"),v=e("./warning"),b=function(){};g(b.prototype,p.Mixin,{_instantiateReactComponent:d}),t.exports=d}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/instantiateReactComponent.js","/node_modules/react/lib")},{"./Object.assign":71,"./ReactCompositeComponent":82,"./ReactEmptyComponent":104,"./ReactNativeComponent":118,"./invariant":180,"./warning":199,_process:43,buffer:3}],180:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){"use strict";var c=function(t,n,r,o,i,s,a,u){if("production"!==e.env.NODE_ENV&&void 0===n)throw new Error("invariant requires an error message argument");if(!t){var l;if(void 0===n)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[r,o,i,s,a,u],f=0;l=new Error("Invariant Violation: "+n.replace(/%s/g,function(){return c[f++]}))}throw l.framesToPop=1,l}};t.exports=c}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/invariant.js","/node_modules/react/lib")},{_process:43,buffer:3}],181:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e,t){if(!p.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,r=n in document;if(!r){var o=document.createElement("div");o.setAttribute(n,"return;"),r="function"==typeof o[n]}return!r&&d&&"wheel"===e&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var d,p=e("./ExecutionEnvironment");p.canUseDOM&&(d=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),t.exports=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/isEventSupported.js","/node_modules/react/lib")},{"./ExecutionEnvironment":65,_process:43,buffer:3}],182:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){function c(e){return!(!e||!("function"==typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}t.exports=c}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/isNode.js","/node_modules/react/lib")},{_process:43,buffer:3}],183:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){"use strict";function c(e){return e&&("INPUT"===e.nodeName&&f[e.type]||"TEXTAREA"===e.nodeName)}var f={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};t.exports=c}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/isTextInputElement.js","/node_modules/react/lib")},{_process:43,buffer:3}],184:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){function f(e){return d(e)&&3==e.nodeType}var d=e("./isNode");t.exports=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/isTextNode.js","/node_modules/react/lib")},{"./isNode":182,_process:43,buffer:3}],185:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";var f=e("./invariant"),d=function(e){var t,r={};"production"!==n.env.NODE_ENV?f(e instanceof Object&&!Array.isArray(e),"keyMirror(...): Argument must be an object."):f(e instanceof Object&&!Array.isArray(e));for(t in e)e.hasOwnProperty(t)&&(r[t]=t);return r};t.exports=d}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/keyMirror.js","/node_modules/react/lib")},{"./invariant":180,_process:43,buffer:3}],186:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){var c=function(e){var t;for(t in e)if(e.hasOwnProperty(t))return t;return null};t.exports=c}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/keyOf.js","/node_modules/react/lib")},{_process:43,buffer:3}],187:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){"use strict";function c(e,t,n){if(!e)return null;var r={};for(var o in e)f.call(e,o)&&(r[o]=t.call(n,e[o],o,e));return r}var f=Object.prototype.hasOwnProperty;t.exports=c}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/mapObject.js","/node_modules/react/lib")},{_process:43,buffer:3}],188:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){"use strict";function c(e){var t={};return function(n){return t.hasOwnProperty(n)||(t[n]=e.call(this,n)),t[n]}}t.exports=c}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/memoizeStringOnly.js","/node_modules/react/lib");
},{_process:43,buffer:3}],189:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e){return"production"!==n.env.NODE_ENV?p(d.isValidElement(e),"onlyChild must be passed a children with exactly one child."):p(d.isValidElement(e)),e}var d=e("./ReactElement"),p=e("./invariant");t.exports=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/onlyChild.js","/node_modules/react/lib")},{"./ReactElement":102,"./invariant":180,_process:43,buffer:3}],190:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";var f,d=e("./ExecutionEnvironment");d.canUseDOM&&(f=window.performance||window.msPerformance||window.webkitPerformance),t.exports=f||{}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/performance.js","/node_modules/react/lib")},{"./ExecutionEnvironment":65,_process:43,buffer:3}],191:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){var f=e("./performance");f&&f.now||(f=Date);var d=f.now.bind(f);t.exports=d}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/performanceNow.js","/node_modules/react/lib")},{"./performance":190,_process:43,buffer:3}],192:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e){return'"'+d(e)+'"'}var d=e("./escapeTextContentForBrowser");t.exports=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/quoteAttributeValueForBrowser.js","/node_modules/react/lib")},{"./escapeTextContentForBrowser":161,_process:43,buffer:3}],193:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";var f=e("./ExecutionEnvironment"),d=/^[ \r\n\t\f]/,p=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,h=function(e,t){e.innerHTML=t};if("undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction&&(h=function(e,t){MSApp.execUnsafeLocalFunction(function(){e.innerHTML=t})}),f.canUseDOM){var m=document.createElement("div");m.innerHTML=" ",""===m.innerHTML&&(h=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),d.test(t)||"<"===t[0]&&p.test(t)){e.innerHTML="\ufeff"+t;var n=e.firstChild;1===n.data.length?e.removeChild(n):n.deleteData(0,1)}else e.innerHTML=t})}t.exports=h}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/setInnerHTML.js","/node_modules/react/lib")},{"./ExecutionEnvironment":65,_process:43,buffer:3}],194:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";var f=e("./ExecutionEnvironment"),d=e("./escapeTextContentForBrowser"),p=e("./setInnerHTML"),h=function(e,t){e.textContent=t};f.canUseDOM&&("textContent"in document.documentElement||(h=function(e,t){p(e,d(t))})),t.exports=h}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/setTextContent.js","/node_modules/react/lib")},{"./ExecutionEnvironment":65,"./escapeTextContentForBrowser":161,"./setInnerHTML":193,_process:43,buffer:3}],195:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){"use strict";function c(e,t){if(e===t)return!0;var n;for(n in e)if(e.hasOwnProperty(n)&&(!t.hasOwnProperty(n)||e[n]!==t[n]))return!1;for(n in t)if(t.hasOwnProperty(n)&&!e.hasOwnProperty(n))return!1;return!0}t.exports=c}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/shallowEqual.js","/node_modules/react/lib")},{_process:43,buffer:3}],196:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e,t){if(null!=e&&null!=t){var r=typeof e,o=typeof t;if("string"===r||"number"===r)return"string"===o||"number"===o;if("object"===o&&e.type===t.type&&e.key===t.key){var i=e._owner===t._owner,s=null,a=null,u=null;return"production"!==n.env.NODE_ENV&&(i||(null!=e._owner&&null!=e._owner.getPublicInstance()&&null!=e._owner.getPublicInstance().constructor&&(s=e._owner.getPublicInstance().constructor.displayName),null!=t._owner&&null!=t._owner.getPublicInstance()&&null!=t._owner.getPublicInstance().constructor&&(a=t._owner.getPublicInstance().constructor.displayName),null!=t.type&&null!=t.type.displayName&&(u=t.type.displayName),null!=t.type&&"string"==typeof t.type&&(u=t.type),("string"!=typeof t.type||"input"===t.type||"textarea"===t.type)&&(null!=e._owner&&e._owner._isOwnerNecessary===!1||null!=t._owner&&t._owner._isOwnerNecessary===!1)&&(null!=e._owner&&(e._owner._isOwnerNecessary=!0),null!=t._owner&&(t._owner._isOwnerNecessary=!0),"production"!==n.env.NODE_ENV?d(!1,"<%s /> is being rendered by both %s and %s using the same key (%s) in the same place. Currently, this means that they don't preserve state. This behavior should be very rare so we're considering deprecating it. Please contact the React team and explain your use case so that we can take that into consideration.",u||"Unknown Component",s||"[Unknown]",a||"[Unknown]",e.key):null))),i}}return!1}var d=e("./warning");t.exports=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/shouldUpdateReactComponent.js","/node_modules/react/lib")},{"./warning":199,_process:43,buffer:3}],197:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){function f(e){var t=e.length;if("production"!==n.env.NODE_ENV?d(!Array.isArray(e)&&("object"==typeof e||"function"==typeof e),"toArray: Array-like object expected"):d(!Array.isArray(e)&&("object"==typeof e||"function"==typeof e)),"production"!==n.env.NODE_ENV?d("number"==typeof t,"toArray: Object needs a length property"):d("number"==typeof t),"production"!==n.env.NODE_ENV?d(0===t||t-1 in e,"toArray: Object should have keys for indices"):d(0===t||t-1 in e),e.hasOwnProperty)try{return Array.prototype.slice.call(e)}catch(r){}for(var o=Array(t),i=0;t>i;i++)o[i]=e[i];return o}var d=e("./invariant");t.exports=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/toArray.js","/node_modules/react/lib")},{"./invariant":180,_process:43,buffer:3}],198:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";function f(e){return S[e]}function d(e,t){return e&&null!=e.key?h(e.key):t.toString(36)}function p(e){return(""+e).replace(C,f)}function h(e){return"$"+p(e)}function m(e,t,r,o,i){var s=typeof e;if(("undefined"===s||"boolean"===s)&&(e=null),null===e||"string"===s||"number"===s||y.isValidElement(e))return o(i,e,""===t?E+d(e,0):t,r),1;var a,u,l,c=0;if(Array.isArray(e))for(var f=0;f<e.length;f++)a=e[f],u=(""!==t?t+x:E)+d(a,f),l=r+c,c+=m(a,u,l,o,i);else{var p=_(e);if(p){var g,b=p.call(e);if(p!==e.entries)for(var S=0;!(g=b.next()).done;)a=g.value,u=(""!==t?t+x:E)+d(a,S++),l=r+c,c+=m(a,u,l,o,i);else for("production"!==n.env.NODE_ENV&&("production"!==n.env.NODE_ENV?T(P,"Using Maps as children is not yet fully supported. It is an experimental feature that might be removed. Convert it to a sequence / iterable of keyed ReactElements instead."):null,P=!0);!(g=b.next()).done;){var C=g.value;C&&(a=C[1],u=(""!==t?t+x:E)+h(C[0])+x+d(a,0),l=r+c,c+=m(a,u,l,o,i))}}else if("object"===s){"production"!==n.env.NODE_ENV?w(1!==e.nodeType,"traverseAllChildren(...): Encountered an invalid child; DOM elements are not valid children of React components."):w(1!==e.nodeType);var M=v.extract(e);for(var R in M)M.hasOwnProperty(R)&&(a=M[R],u=(""!==t?t+x:E)+h(R)+x+d(a,0),l=r+c,c+=m(a,u,l,o,i))}}return c}function g(e,t,n){return null==e?0:m(e,"",0,t,n)}var y=e("./ReactElement"),v=e("./ReactFragment"),b=e("./ReactInstanceHandles"),_=e("./getIteratorFn"),w=e("./invariant"),T=e("./warning"),E=b.SEPARATOR,x=":",S={"=":"=0",".":"=1",":":"=2"},C=/[=.:]/g,P=!1;t.exports=g}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/traverseAllChildren.js","/node_modules/react/lib")},{"./ReactElement":102,"./ReactFragment":108,"./ReactInstanceHandles":111,"./getIteratorFn":171,"./invariant":180,"./warning":199,_process:43,buffer:3}],199:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";var f=e("./emptyFunction"),d=f;"production"!==n.env.NODE_ENV&&(d=function(e,t){for(var n=[],r=2,o=arguments.length;o>r;r++)n.push(arguments[r]);if(void 0===t)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(t.length<10||/^[s\W]*$/.test(t))throw new Error("The warning format should be able to uniquely identify this warning. Please, use a more descriptive format than: "+t);if(0!==t.indexOf("Failed Composite propType: ")&&!e){var i=0,s="Warning: "+t.replace(/%s/g,function(){return n[i++]});console.warn(s);try{throw new Error(s)}catch(a){}}}),t.exports=d}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/lib/warning.js","/node_modules/react/lib")},{"./emptyFunction":159,_process:43,buffer:3}],200:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){function f(e,t){function n(){return window[t]}function r(r){return n()||u?r&&r(void 0,window[t]):(r&&l.subscribe(r),void(a||(a=!0,e&&p(e,function(e){return s?void 0:e?(u=!0,l.publish(e)):void o()}))))}function o(){u=!0,l.publish(void 0,t?window[t]:void 0)}function i(){return s=!0,o}var s,a,u,l=d();return r.trigger=i,r}var d=e("pubsub"),p=e("load-script");t.exports=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/require-sdk/index.js","/node_modules/require-sdk")},{_process:43,buffer:3,"load-script":39,pubsub:44}],201:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){var f=e("matches-selector");t.exports=function(e,t){for(var n=e.parentNode.firstChild,r=[];n;n=n.nextSibling)1===n.nodeType&&n!==e&&(t?f(n,t)&&r.push(n):r.push(n));return r}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/siblings/index.js","/node_modules/siblings")},{_process:43,buffer:3,"matches-selector":40}],202:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){!function(e){function n(e,t,n,r,o){this._listener=t,this._isOnce=n,this.context=r,this._signal=e,this._priority=o||0}function r(e,t){if("function"!=typeof e)throw new Error("listener is a required param of {fn}() and should be a Function.".replace("{fn}",t))}function o(){this._bindings=[],this._prevParams=null;var e=this;this.dispatch=function(){o.prototype.dispatch.apply(e,arguments)}}n.prototype={active:!0,params:null,execute:function(e){var t,n;return this.active&&this._listener&&(n=this.params?this.params.concat(e):e,t=this._listener.apply(this.context,n),this._isOnce&&this.detach()),t},detach:function(){return this.isBound()?this._signal.remove(this._listener,this.context):null},isBound:function(){return!!this._signal&&!!this._listener},isOnce:function(){return this._isOnce},getListener:function(){return this._listener},getSignal:function(){return this._signal},_destroy:function(){delete this._signal,delete this._listener,delete this.context},toString:function(){return"[SignalBinding isOnce:"+this._isOnce+", isBound:"+this.isBound()+", active:"+this.active+"]"}},o.prototype={VERSION:"1.0.0",memorize:!1,_shouldPropagate:!0,active:!0,_registerListener:function(e,t,r,o){var i,s=this._indexOfListener(e,r);if(-1!==s){if(i=this._bindings[s],i.isOnce()!==t)throw new Error("You cannot add"+(t?"":"Once")+"() then add"+(t?"Once":"")+"() the same listener without removing the relationship first.")}else i=new n(this,e,t,r,o),this._addBinding(i);return this.memorize&&this._prevParams&&i.execute(this._prevParams),i},_addBinding:function(e){var t=this._bindings.length;do--t;while(this._bindings[t]&&e._priority<=this._bindings[t]._priority);this._bindings.splice(t+1,0,e)},_indexOfListener:function(e,t){for(var n,r=this._bindings.length;r--;)if(n=this._bindings[r],n._listener===e&&n.context===t)return r;return-1},has:function(e,t){return-1!==this._indexOfListener(e,t)},add:function(e,t,n){return r(e,"add"),this._registerListener(e,!1,t,n)},addOnce:function(e,t,n){return r(e,"addOnce"),this._registerListener(e,!0,t,n)},remove:function(e,t){r(e,"remove");var n=this._indexOfListener(e,t);return-1!==n&&(this._bindings[n]._destroy(),this._bindings.splice(n,1)),e},removeAll:function(){for(var e=this._bindings.length;e--;)this._bindings[e]._destroy();this._bindings.length=0},getNumListeners:function(){return this._bindings.length},halt:function(){this._shouldPropagate=!1},dispatch:function(e){if(this.active){var t,n=Array.prototype.slice.call(arguments),r=this._bindings.length;if(this.memorize&&(this._prevParams=n),r){t=this._bindings.slice(),this._shouldPropagate=!0;do r--;while(t[r]&&this._shouldPropagate&&t[r].execute(n)!==!1)}}},forget:function(){this._prevParams=null},dispose:function(){this.removeAll(),delete this._bindings,delete this._prevParams},toString:function(){return"[Signal active:"+this.active+" numListeners:"+this.getNumListeners()+"]"}};var i=o;i.Signal=o,"function"==typeof define&&define.amd?define(function(){return i}):"undefined"!=typeof t&&t.exports?t.exports=i:e.signals=i}(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/signals/dist/signals.js","/node_modules/signals/dist")},{_process:43,buffer:3}],203:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){var c=function(e){return Object.prototype.toString.call(e)},f=function(e){throw e},d=t.exports=function(e,t){function n(e,t,n){t in e?e[t]=n:Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}var r=t||{};return r.unknownFunction||(r.unknownFunction=d.ONCE),r.nonFunctionProperty||(r.nonFunctionProperty=function(e,t,n){if(void 0!==e&&void 0!==t){var r=function(e){return e&&e.constructor&&e.constructor.name?e.constructor.name:c(e).slice(8,-1)};throw new TypeError("Cannot mixin key "+n+" because it is provided by multiple sources, and the types are "+r(e)+" and "+r(t))}return void 0===e?t:e}),function(t,o){Object.keys(o).forEach(function(i){var s=t[i],a=o[i],u=e[i];if(void 0!==s||void 0!==a){var l=function(e){return"function"!=typeof e?e:function(){return e.call(this,arguments)}};if(u){var c=u(s,a,i);return void n(t,i,l(c))}var f="function"==typeof s,d="function"==typeof a;return f&&void 0===a||d&&void 0===s||f&&d?void n(t,i,l(r.unknownFunction(s,a,i))):void(t[i]=r.nonFunctionProperty(s,a,i))}})}};d._mergeObjects=function(e,t){var n=function(e,t){var n=c(e);if("[object Object]"!==n){var r=e.constructor?e.constructor.name:"Unknown",o=t.constructor?t.constructor.name:"Unknown";f("cannot merge returned value of type "+r+" with an "+o)}};if(Array.isArray(e)&&Array.isArray(t))return e.concat(t);n(e,t),n(t,e);var r={};return Object.keys(e).forEach(function(n){Object.prototype.hasOwnProperty.call(t,n)&&f("cannot merge returns because both have the "+JSON.stringify(n)+" key"),r[n]=e[n]}),Object.keys(t).forEach(function(e){r[e]=t[e]}),r},d.ONCE=function(e,t,n){if(e&&t)throw new TypeError("Cannot mixin "+n+" because it has a unique constraint.");var r=e||t;return function(e){return r.apply(this,e)}},d.MANY=function(e,t,n){return function(n){return t&&t.apply(this,n),e?e.apply(this,n):void 0}},d.MANY_MERGED_LOOSE=function(e,t,n){return e&&t?d._mergeObjects(e,t):e||t},d.MANY_MERGED=function(e,t,n){return function(n){var r=t&&t.apply(this,n),o=e&&e.apply(this,n);return r&&o?d._mergeObjects(r,o):o||r}},d.REDUCE_LEFT=function(e,t,n){var r=e||function(e){return e},o=t||function(e){return e};return function(e){return o.call(this,r.apply(this,e))}},d.REDUCE_RIGHT=function(e,t,n){var r=e||function(e){return e},o=t||function(e){return e};return function(e){return r.call(this,o.apply(this,e))}}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/smart-mixin/index.js","/node_modules/smart-mixin")},{_process:43,buffer:3}],204:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){function f(e){return d(e).replace(/\s(\w)/g,function(e,t){return t.toUpperCase()})}var d=e("to-space-case");t.exports=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/to-camel-case/index.js","/node_modules/to-camel-case")},{_process:43,buffer:3,"to-space-case":206}],205:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){function c(e){return p.test(e)?e.toLowerCase():h.test(e)?(f(e)||e).toLowerCase():d(e).toLowerCase()}function f(e){return e.replace(m,function(e,t){return t?" "+t:""})}function d(e){return e.replace(g,function(e,t,n){return t+" "+n.toLowerCase().split("").join(" ")})}t.exports=c;var p=/\s/,h=/[\W_]/,m=/[\W_]+(.|$)/g,g=/(.)([A-Z]+)/g}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/to-no-case/index.js","/node_modules/to-no-case")},{_process:43,buffer:3}],206:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){function f(e){return d(e).replace(/[\W_]+(.|$)/g,function(e,t){return t?" "+t:""}).trim()}var d=e("to-no-case");t.exports=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/to-space-case/index.js","/node_modules/to-space-case")},{_process:43,buffer:3,"to-no-case":205}],207:[function(e,t,n){(function(e,r,o,i,s,a,u,l,c){function f(e){return e.replace(/^\s*|\s*$/g,"")}n=t.exports=f,n.left=function(e){return e.replace(/^\s*/,"")},n.right=function(e){return e.replace(/\s*$/,"")}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/trim/index.js","/node_modules/trim")},{_process:43,buffer:3}],208:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/util/support/isBufferBrowser.js","/node_modules/util/support")},{_process:43,buffer:3}],209:[function(e,t,n){(function(t,r,o,i,s,a,u,l,c){function f(e,t){var r={seen:[],stylize:p};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),T(t)?r.showHidden=t:t&&n._extend(r,t),M(r.showHidden)&&(r.showHidden=!1),M(r.depth)&&(r.depth=2),M(r.colors)&&(r.colors=!1),M(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=d),m(r,e,r.depth)}function d(e,t){var n=f.styles[t];return n?"["+f.colors[n][0]+"m"+e+"["+f.colors[n][1]+"m":e}function p(e,t){return e}function h(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}function m(e,t,r){if(e.customInspect&&t&&A(t.inspect)&&t.inspect!==n.inspect&&(!t.constructor||t.constructor.prototype!==t)){var o=t.inspect(r,e);return C(o)||(o=m(e,o,r)),o}var i=g(e,t);if(i)return i;var s=Object.keys(t),a=h(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(t)),N(t)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return y(t);if(0===s.length){if(A(t)){var u=t.name?": "+t.name:"";return e.stylize("[Function"+u+"]","special")}if(R(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(O(t))return e.stylize(Date.prototype.toString.call(t),"date");if(N(t))return y(t)}var l="",c=!1,f=["{","}"];if(w(t)&&(c=!0,f=["[","]"]),A(t)){var d=t.name?": "+t.name:"";l=" [Function"+d+"]"}if(R(t)&&(l=" "+RegExp.prototype.toString.call(t)),O(t)&&(l=" "+Date.prototype.toUTCString.call(t)),N(t)&&(l=" "+y(t)),0===s.length&&(!c||0==t.length))return f[0]+l+f[1];if(0>r)return R(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var p;return p=c?v(e,t,r,a,s):s.map(function(n){return b(e,t,r,a,n,c)}),e.seen.pop(),_(p,l,f)}function g(e,t){if(M(t))return e.stylize("undefined","undefined");if(C(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return S(t)?e.stylize(""+t,"number"):T(t)?e.stylize(""+t,"boolean"):E(t)?e.stylize("null","null"):void 0}function y(e){return"["+Error.prototype.toString.call(e)+"]"}function v(e,t,n,r,o){for(var i=[],s=0,a=t.length;a>s;++s)j(t,String(s))?i.push(b(e,t,n,r,String(s),!0)):i.push("");return o.forEach(function(o){o.match(/^\d+$/)||i.push(b(e,t,n,r,o,!0))}),i}function b(e,t,n,r,o,i){var s,a,u;if(u=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]},u.get?a=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(a=e.stylize("[Setter]","special")),j(r,o)||(s="["+o+"]"),a||(e.seen.indexOf(u.value)<0?(a=E(n)?m(e,u.value,null):m(e,u.value,n-1),a.indexOf("\n")>-1&&(a=i?a.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+a.split("\n").map(function(e){return" "+e}).join("\n"))):a=e.stylize("[Circular]","special")),M(s)){if(i&&o.match(/^\d+$/))return a;s=JSON.stringify(""+o),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function _(e,t,n){var r=0,o=e.reduce(function(e,t){return r++,t.indexOf("\n")>=0&&r++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0);return o>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}function w(e){return Array.isArray(e)}function T(e){return"boolean"==typeof e}function E(e){return null===e}function x(e){return null==e}function S(e){return"number"==typeof e}function C(e){return"string"==typeof e}function P(e){return"symbol"==typeof e}function M(e){return void 0===e}function R(e){return D(e)&&"[object RegExp]"===B(e)}function D(e){return"object"==typeof e&&null!==e}function O(e){return D(e)&&"[object Date]"===B(e)}function N(e){return D(e)&&("[object Error]"===B(e)||e instanceof Error)}function A(e){return"function"==typeof e}function I(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e}function B(e){return Object.prototype.toString.call(e)}function k(e){return 10>e?"0"+e.toString(10):e.toString(10)}function L(){var e=new Date,t=[k(e.getHours()),k(e.getMinutes()),k(e.getSeconds())].join(":");return[e.getDate(),U[e.getMonth()],t].join(" ")}function j(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var G=/%[sdj%]/g;n.format=function(e){if(!C(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(f(arguments[n]));return t.join(" ")}for(var n=1,r=arguments,o=r.length,i=String(e).replace(G,function(e){if("%%"===e)return"%";if(n>=o)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(t){return"[Circular]"}default:return e}}),s=r[n];o>n;s=r[++n])i+=E(s)||!D(s)?" "+s:" "+f(s);return i},n.deprecate=function(e,o){function i(){if(!s){if(t.throwDeprecation)throw new Error(o);t.traceDeprecation?console.trace(o):console.error(o),s=!0}return e.apply(this,arguments)}if(M(r.process))return function(){return n.deprecate(e,o).apply(this,arguments)};if(t.noDeprecation===!0)return e;var s=!1;return i};var H,V={};n.debuglog=function(e){if(M(H)&&(H=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!V[e])if(new RegExp("\\b"+e+"\\b","i").test(H)){var r=t.pid;V[e]=function(){var t=n.format.apply(n,arguments);console.error("%s %d: %s",e,r,t)}}else V[e]=function(){};return V[e]},n.inspect=f,f.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},f.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},n.isArray=w,n.isBoolean=T,n.isNull=E,n.isNullOrUndefined=x,n.isNumber=S,n.isString=C,n.isSymbol=P,n.isUndefined=M,n.isRegExp=R,n.isObject=D,n.isDate=O,n.isError=N,n.isFunction=A,n.isPrimitive=I,n.isBuffer=e("./support/isBuffer");var U=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];n.log=function(){console.log("%s - %s",L(),n.format.apply(n,arguments))},n.inherits=e("inherits"),n._extend=function(e,t){if(!t||!D(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/util/util.js","/node_modules/util")},{"./support/isBuffer":208,_process:43,buffer:3,inherits:34}],"common-vimeo":[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){function f(e){d=m(),g(e),this.attachToEmbed(e)}var d,p=e("events").EventEmitter,h=e("util"),m=e("./lib/load-api"),g=e("./lib/prepare-embed");t.exports=f,h.inherits(f,p),f.prototype.play=function(){this.player.api("play")},f.prototype.pause=function(){this.player.api("pause")},f.prototype.destroy=function(){this.unbindEvents(),delete this.player},f.prototype.attachToEmbed=function(e){var t=this;d(function(n,r){t.player=window.Froogaloop(e),t.bindEvents()})},f.prototype.bindEvents=function(){var e=this;e.player.addEvent("ready",function(){e.emit("ready"),e.player.addEvent("play",function(){e.emit("play")}),e.player.addEvent("pause",function(){e.emit("pause")}),e.player.addEvent("finish",function(){e.emit("end")})})},f.prototype.unbindEvents=function(){this.player.removeEvent("ready"),this.player.removeEvent("play"),this.player.removeEvent("pause"),this.player.removeEvent("finish")}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/common-vimeo/index.js","/node_modules/common-vimeo")},{"./lib/load-api":5,"./lib/prepare-embed":6,_process:43,buffer:3,events:2,util:209}],crossroads:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){!function(){var n=function(e){function t(e,t){if(e.indexOf)return e.indexOf(t);for(var n=e.length;n--;)if(e[n]===t)return n;return-1}function n(e,n){var r=t(e,n);-1!==r&&e.splice(r,1)}function r(e,t){return"[object "+t+"]"===Object.prototype.toString.call(e)}function o(e){return r(e,"RegExp")}function i(e){return r(e,"Array")}function s(e){return"function"==typeof e}function a(e){var t;return t=null===e||"null"===e?null:"true"===e?!0:"false"===e?!1:e===h||"undefined"===e?h:""===e||isNaN(e)?e:parseFloat(e)}function u(e){for(var t=e.length,n=[];t--;)n[t]=a(e[t]);return n}function l(e,t){for(var n,r,o,s,u=(e||"").replace("?","").split("&"),l=-1,c={};r=u[++l];)n=r.indexOf("="),s=r.substring(0,n),o=decodeURIComponent(r.substring(n+1)),t!==!1&&(o=a(o)),s in c?i(c[s])?c[s].push(o):c[s]=[c[s],o]:c[s]=o;return c}function c(){this.bypassed=new e.Signal,this.routed=new e.Signal,this._routes=[],this._prevRoutes=[],this._piped=[],this.resetState()}function f(t,n,r,i){var s=o(t),a=i.patternLexer;this._router=i,this._pattern=t,this._paramsIds=s?null:a.getParamIds(t),this._optionalParamsIds=s?null:a.getOptionalParamsIds(t),this._matchRegexp=s?t:a.compilePattern(t,i.ignoreCase),this.matched=new e.Signal,this.switched=new e.Signal,n&&this.matched.add(n),this._priority=r||0}var d,p,h;return p=""===/t(.+)?/.exec("t")[1],c.prototype={greedy:!1,greedyEnabled:!0,ignoreCase:!0,ignoreState:!1,shouldTypecast:!1,normalizeFn:null,resetState:function(){this._prevRoutes.length=0,this._prevMatchedRequest=null,this._prevBypassedRequest=null},create:function(){return new c},addRoute:function(e,t,n){var r=new f(e,t,n,this);return this._sortedInsert(r),r},removeRoute:function(e){n(this._routes,e),e._destroy()},removeAllRoutes:function(){for(var e=this.getNumRoutes();e--;)this._routes[e]._destroy();this._routes.length=0},parse:function(e,t){if(e=e||"",t=t||[],this.ignoreState||e!==this._prevMatchedRequest&&e!==this._prevBypassedRequest){var n,r=this._getMatchedRoutes(e),o=0,i=r.length;if(i)for(this._prevMatchedRequest=e,this._notifyPrevRoutes(r,e),this._prevRoutes=r;i>o;)n=r[o],n.route.matched.dispatch.apply(n.route.matched,t.concat(n.params)),n.isFirst=!o,this.routed.dispatch.apply(this.routed,t.concat([e,n])),o+=1;else this._prevBypassedRequest=e,this.bypassed.dispatch.apply(this.bypassed,t.concat([e]));this._pipeParse(e,t)}},_notifyPrevRoutes:function(e,t){for(var n,r=0;n=this._prevRoutes[r++];)n.route.switched&&this._didSwitch(n.route,e)&&n.route.switched.dispatch(t)},_didSwitch:function(e,t){for(var n,r=0;n=t[r++];)if(n.route===e)return!1;return!0},_pipeParse:function(e,t){for(var n,r=0;n=this._piped[r++];)n.parse(e,t)},getNumRoutes:function(){return this._routes.length},_sortedInsert:function(e){var t=this._routes,n=t.length;do--n;while(t[n]&&e._priority<=t[n]._priority);t.splice(n+1,0,e)},_getMatchedRoutes:function(e){for(var t,n=[],r=this._routes,o=r.length;(t=r[--o])&&((!n.length||this.greedy||t.greedy)&&t.match(e)&&n.push({route:t,params:t._getParamsArray(e)}),this.greedyEnabled||!n.length););return n},pipe:function(e){this._piped.push(e)},unpipe:function(e){n(this._piped,e)},toString:function(){return"[crossroads numRoutes:"+this.getNumRoutes()+"]"}},d=new c,d.VERSION="0.12.2",d.NORM_AS_ARRAY=function(e,t){return[t.vals_]},d.NORM_AS_OBJECT=function(e,t){return[t]},f.prototype={greedy:!1,rules:void 0,match:function(e){return e=e||"",this._matchRegexp.test(e)&&this._validateParams(e)},_validateParams:function(e){var t,n=this.rules,r=this._getParamsObject(e);for(t in n)if("normalize_"!==t&&n.hasOwnProperty(t)&&!this._isValidParam(e,t,r))return!1;return!0},_isValidParam:function(e,n,r){var a=this.rules[n],u=r[n],l=!1,c=0===n.indexOf("?");return null==u&&this._optionalParamsIds&&-1!==t(this._optionalParamsIds,n)?l=!0:o(a)?(c&&(u=r[n+"_"]),l=a.test(u)):i(a)?(c&&(u=r[n+"_"]),l=this._isValidArrayRule(a,u)):s(a)&&(l=a(u,e,r)),l},_isValidArrayRule:function(e,n){if(!this._router.ignoreCase)return-1!==t(e,n);"string"==typeof n&&(n=n.toLowerCase());for(var r,o,i=e.length;i--;)if(r=e[i],o="string"==typeof r?r.toLowerCase():r,o===n)return!0;return!1},_getParamsObject:function(e){for(var n,r,o=this._router.shouldTypecast,i=this._router.patternLexer.getParamValues(e,this._matchRegexp,o),s={},u=i.length;u--;)r=i[u],
this._paramsIds&&(n=this._paramsIds[u],0===n.indexOf("?")&&r&&(s[n+"_"]=r,r=l(r,o),i[u]=r),p&&""===r&&-1!==t(this._optionalParamsIds,n)&&(r=void 0,i[u]=r),s[n]=r),s[u]=r;return s.request_=o?a(e):e,s.vals_=i,s},_getParamsArray:function(e){var t,n=this.rules?this.rules.normalize_:null;return n=n||this._router.normalizeFn,t=n&&s(n)?n(e,this._getParamsObject(e)):this._getParamsObject(e).vals_},interpolate:function(e){var t=this._router.patternLexer.interpolate(this._pattern,e);if(!this._validateParams(t))throw new Error("Generated string doesn't validate against `Route.rules`.");return t},dispose:function(){this._router.removeRoute(this)},_destroy:function(){this.matched.dispose(),this.switched.dispose(),this.matched=this.switched=this._pattern=this._matchRegexp=null},toString:function(){return'[Route pattern:"'+this._pattern+'", numListeners:'+this.matched.getNumListeners()+"]"}},c.prototype.patternLexer=function(){function e(){var e,t;for(e in h)h.hasOwnProperty(e)&&(t=h[e],t.id="__CR_"+e+"__",t.save="save"in t?t.save.replace("{{id}}",t.id):t.id,t.rRestore=new RegExp(t.id,"g"))}function t(e,t){var n,r=[];for(e.lastIndex=0;n=e.exec(t);)r.push(n[1]);return r}function n(e){return t(p,e)}function r(e){return t(h.OP.rgx,e)}function o(e,t){return e=e||"",e&&(v===m?e=e.replace(f,""):v===y&&(e=e.replace(d,"")),e=s(e,"rgx","save"),e=e.replace(c,"\\$&"),e=s(e,"rRestore","res"),v===m&&(e="\\/?"+e)),v!==g&&(e+="\\/?"),new RegExp("^"+e+"$",t?"i":"")}function s(e,t,n){var r,o;for(o in h)h.hasOwnProperty(o)&&(r=h[o],e=e.replace(r[t],r[n]));return e}function a(e,t,n){var r=t.exec(e);return r&&(r.shift(),n&&(r=u(r))),r}function l(e,t){if(t=t||{},"string"!=typeof e)throw new Error("Route pattern should be a string.");var n=function(e,n){var r;if(n="?"===n.substr(0,1)?n.substr(1):n,null!=t[n]){if("object"==typeof t[n]){var o,s=[];for(var a in t[n])if(o=t[n][a],i(o))for(var u in o)"[]"==a.slice(-2)?s.push(encodeURI(a.slice(0,-2))+"[]="+encodeURI(o[u])):s.push(encodeURI(a+"="+o[u]));else s.push(encodeURI(a+"="+o));r="?"+s.join("&")}else r=String(t[n]);if(-1===e.indexOf("*")&&-1!==r.indexOf("/"))throw new Error('Invalid value "'+r+'" for segment "'+e+'".')}else{if(-1!==e.indexOf("{"))throw new Error("The segment "+e+" is required.");r=""}return r};return h.OS.trail||(h.OS.trail=new RegExp("(?:"+h.OS.id+")+$")),e.replace(h.OS.rgx,h.OS.save).replace(p,n).replace(h.OS.trail,"").replace(h.OS.rRestore,"/")}var c=/[\\.+*?\^$\[\](){}\/'#]/g,f=/^\/|\/$/g,d=/\/$/g,p=/(?:\{|:)([^}:]+)(?:\}|:)/g,h={OS:{rgx:/([:}]|\w(?=\/))\/?(:|(?:\{\?))/g,save:"$1{{id}}$2",res:"\\/?"},RS:{rgx:/([:}])\/?(\{)/g,save:"$1{{id}}$2",res:"\\/"},RQ:{rgx:/\{\?([^}]+)\}/g,res:"\\?([^#]+)"},OQ:{rgx:/:\?([^:]+):/g,res:"(?:\\?([^#]*))?"},OR:{rgx:/:([^:]+)\*:/g,res:"(.*)?"},RR:{rgx:/\{([^}]+)\*\}/g,res:"(.+)"},RP:{rgx:/\{([^}]+)\}/g,res:"([^\\/?]+)"},OP:{rgx:/:([^:]+):/g,res:"([^\\/?]+)?/?"}},m=1,g=2,y=3,v=m;return e(),{strict:function(){v=g},loose:function(){v=m},legacy:function(){v=y},getParamIds:n,getOptionalParamsIds:r,getParamValues:a,compilePattern:o,interpolate:l}}(),d};"function"==typeof define&&define.amd?define(["signals"],n):"undefined"!=typeof t&&t.exports?t.exports=n(e("signals")):window.crossroads=n(window.signals)}()}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/crossroads/dist/crossroads.js","/node_modules/crossroads/dist")},{_process:43,buffer:3,signals:202}],domquery:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){function f(e){return p("<"==e.charAt(0)?d(e):document.createElement(e))}var d=e("new-element"),p=e("./lib/select");t.exports=p,t.exports.create=f}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/domquery/index.js","/node_modules/domquery")},{"./lib/select":26,_process:43,buffer:3,"new-element":42}],"element-size":[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){function c(e){if(e===window||e===document.body)return[window.innerWidth,window.innerHeight];if(!e.parentNode){var t=!0;document.body.appendChild(e)}var n=e.getBoundingClientRect(),r=getComputedStyle(e),o=(0|n.height)+f(r.getPropertyValue("margin-top"))+f(r.getPropertyValue("margin-bottom")),i=(0|n.width)+f(r.getPropertyValue("margin-left"))+f(r.getPropertyValue("margin-right"));return t&&document.body.removeChild(e),[i,o]}function f(e){return parseFloat(e)||0}t.exports=c}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/element-size/index.js","/node_modules/element-size")},{_process:43,buffer:3}],eventemitter2:[function(e,t,n){(function(e,t,r,o,i,s,a,u,l){!function(e){function t(){this._events={},this._conf&&r.call(this,this._conf)}function r(e){e&&(this._conf=e,e.delimiter&&(this.delimiter=e.delimiter),e.maxListeners&&(this._events.maxListeners=e.maxListeners),e.wildcard&&(this.wildcard=e.wildcard),e.newListener&&(this.newListener=e.newListener),this.wildcard&&(this.listenerTree={}))}function o(e){this._events={},this.newListener=!1,r.call(this,e)}function i(e,t,n,r){if(!n)return[];var o,s,a,u,l,c,f,d=[],p=t.length,h=t[r],m=t[r+1];if(r===p&&n._listeners){if("function"==typeof n._listeners)return e&&e.push(n._listeners),[n];for(o=0,s=n._listeners.length;s>o;o++)e&&e.push(n._listeners[o]);return[n]}if("*"===h||"**"===h||n[h]){if("*"===h){for(a in n)"_listeners"!==a&&n.hasOwnProperty(a)&&(d=d.concat(i(e,t,n[a],r+1)));return d}if("**"===h){f=r+1===p||r+2===p&&"*"===m,f&&n._listeners&&(d=d.concat(i(e,t,n,p)));for(a in n)"_listeners"!==a&&n.hasOwnProperty(a)&&("*"===a||"**"===a?(n[a]._listeners&&!f&&(d=d.concat(i(e,t,n[a],p))),d=d.concat(i(e,t,n[a],r))):d=a===m?d.concat(i(e,t,n[a],r+2)):d.concat(i(e,t,n[a],r)));return d}d=d.concat(i(e,t,n[h],r+1))}if(u=n["*"],u&&i(e,t,u,r+1),l=n["**"])if(p>r){l._listeners&&i(e,t,l,p);for(a in l)"_listeners"!==a&&l.hasOwnProperty(a)&&(a===m?i(e,t,l[a],r+2):a===h?i(e,t,l[a],r+1):(c={},c[a]=l[a],i(e,t,{"**":c},r+1)))}else l._listeners?i(e,t,l,p):l["*"]&&l["*"]._listeners&&i(e,t,l["*"],p);return d}function s(e,t){e="string"==typeof e?e.split(this.delimiter):e.slice();for(var n=0,r=e.length;r>n+1;n++)if("**"===e[n]&&"**"===e[n+1])return;for(var o=this.listenerTree,i=e.shift();i;){if(o[i]||(o[i]={}),o=o[i],0===e.length){if(o._listeners){if("function"==typeof o._listeners)o._listeners=[o._listeners,t];else if(a(o._listeners)&&(o._listeners.push(t),!o._listeners.warned)){var s=u;"undefined"!=typeof this._events.maxListeners&&(s=this._events.maxListeners),s>0&&o._listeners.length>s&&(o._listeners.warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",o._listeners.length),console.trace())}}else o._listeners=t;return!0}i=e.shift()}return!0}var a=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},u=10;o.prototype.delimiter=".",o.prototype.setMaxListeners=function(e){this._events||t.call(this),this._events.maxListeners=e,this._conf||(this._conf={}),this._conf.maxListeners=e},o.prototype.event="",o.prototype.once=function(e,t){return this.many(e,1,t),this},o.prototype.many=function(e,t,n){function r(){0===--t&&o.off(e,r),n.apply(this,arguments)}var o=this;if("function"!=typeof n)throw new Error("many only accepts instances of Function");return r._origin=n,this.on(e,r),o},o.prototype.emit=function(){this._events||t.call(this);var e=arguments[0];if("newListener"===e&&!this.newListener&&!this._events.newListener)return!1;if(this._all){for(var n=arguments.length,r=new Array(n-1),o=1;n>o;o++)r[o-1]=arguments[o];for(o=0,n=this._all.length;n>o;o++)this.event=e,this._all[o].apply(this,r)}if("error"===e&&!(this._all||this._events.error||this.wildcard&&this.listenerTree.error))throw arguments[1]instanceof Error?arguments[1]:new Error("Uncaught, unspecified 'error' event.");var s;if(this.wildcard){s=[];var a="string"==typeof e?e.split(this.delimiter):e.slice();i.call(this,s,a,this.listenerTree,0)}else s=this._events[e];if("function"==typeof s){if(this.event=e,1===arguments.length)s.call(this);else if(arguments.length>1)switch(arguments.length){case 2:s.call(this,arguments[1]);break;case 3:s.call(this,arguments[1],arguments[2]);break;default:for(var n=arguments.length,r=new Array(n-1),o=1;n>o;o++)r[o-1]=arguments[o];s.apply(this,r)}return!0}if(s){for(var n=arguments.length,r=new Array(n-1),o=1;n>o;o++)r[o-1]=arguments[o];for(var u=s.slice(),o=0,n=u.length;n>o;o++)this.event=e,u[o].apply(this,r);return u.length>0||!!this._all}return!!this._all},o.prototype.on=function(e,n){if("function"==typeof e)return this.onAny(e),this;if("function"!=typeof n)throw new Error("on only accepts instances of Function");if(this._events||t.call(this),this.emit("newListener",e,n),this.wildcard)return s.call(this,e,n),this;if(this._events[e]){if("function"==typeof this._events[e])this._events[e]=[this._events[e],n];else if(a(this._events[e])&&(this._events[e].push(n),!this._events[e].warned)){var r=u;"undefined"!=typeof this._events.maxListeners&&(r=this._events.maxListeners),r>0&&this._events[e].length>r&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),console.trace())}}else this._events[e]=n;return this},o.prototype.onAny=function(e){if("function"!=typeof e)throw new Error("onAny only accepts instances of Function");return this._all||(this._all=[]),this._all.push(e),this},o.prototype.addListener=o.prototype.on,o.prototype.off=function(e,t){if("function"!=typeof t)throw new Error("removeListener only takes instances of Function");var n,r=[];if(this.wildcard){var o="string"==typeof e?e.split(this.delimiter):e.slice();r=i.call(this,null,o,this.listenerTree,0)}else{if(!this._events[e])return this;n=this._events[e],r.push({_listeners:n})}for(var s=0;s<r.length;s++){var u=r[s];if(n=u._listeners,a(n)){for(var l=-1,c=0,f=n.length;f>c;c++)if(n[c]===t||n[c].listener&&n[c].listener===t||n[c]._origin&&n[c]._origin===t){l=c;break}if(0>l)continue;return this.wildcard?u._listeners.splice(l,1):this._events[e].splice(l,1),0===n.length&&(this.wildcard?delete u._listeners:delete this._events[e]),this}(n===t||n.listener&&n.listener===t||n._origin&&n._origin===t)&&(this.wildcard?delete u._listeners:delete this._events[e])}return this},o.prototype.offAny=function(e){var t,n=0,r=0;if(e&&this._all&&this._all.length>0){for(t=this._all,n=0,r=t.length;r>n;n++)if(e===t[n])return t.splice(n,1),this}else this._all=[];return this},o.prototype.removeListener=o.prototype.off,o.prototype.removeAllListeners=function(e){if(0===arguments.length)return!this._events||t.call(this),this;if(this.wildcard)for(var n="string"==typeof e?e.split(this.delimiter):e.slice(),r=i.call(this,null,n,this.listenerTree,0),o=0;o<r.length;o++){var s=r[o];s._listeners=null}else{if(!this._events[e])return this;this._events[e]=null}return this},o.prototype.listeners=function(e){if(this.wildcard){var n=[],r="string"==typeof e?e.split(this.delimiter):e.slice();return i.call(this,n,r,this.listenerTree,0),n}return this._events||t.call(this),this._events[e]||(this._events[e]=[]),a(this._events[e])||(this._events[e]=[this._events[e]]),this._events[e]},o.prototype.listenersAny=function(){return this._all?this._all:[]},"function"==typeof define&&define.amd?define(function(){return o}):"object"==typeof n?n.EventEmitter2=o:window.EventEmitter2=o}()}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/eventemitter2/lib/eventemitter2.js","/node_modules/eventemitter2/lib")},{_process:43,buffer:3}],"flux-dispatcher":[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){"use strict";var f=e("flux").Dispatcher,d=new f;d.handleAction=function(e,t,n){if(arguments.length<2||arguments.length>3){var r="Expected two or three arguments.";throw new Error(r)}2===arguments.length&&(n=t,t=e,e=void 0);var o={action:{type:t,data:n}};e&&(o.source=e),d.dispatch(o)},t.exports=d}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/flux-dispatcher/index.js","/node_modules/flux-dispatcher")},{_process:43,buffer:3,flux:"flux"}],flux:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){t.exports.Dispatcher=e("./lib/Dispatcher")}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/flux/index.js","/node_modules/flux")},{"./lib/Dispatcher":30,_process:43,buffer:3}],gsap:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){var c="undefined"!=typeof t&&t.exports&&"undefined"!=typeof n?n:this||window;(c._gsQueue||(c._gsQueue=[])).push(function(){"use strict";c._gsDefine("TweenMax",["core.Animation","core.SimpleTimeline","TweenLite"],function(e,t,n){var r=function(e){var t,n=[],r=e.length;for(t=0;t!==r;n.push(e[t++]));return n},o=function(e,t,r){n.call(this,e,t,r),this._cycle=0,this._yoyo=this.vars.yoyo===!0,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._dirty=!0,this.render=o.prototype.render},i=1e-10,s=n._internals,a=s.isSelector,u=s.isArray,l=o.prototype=n.to({},.1,{}),c=[];o.version="1.17.0",l.constructor=o,l.kill()._gc=!1,o.killTweensOf=o.killDelayedCallsTo=n.killTweensOf,o.getTweensOf=n.getTweensOf,o.lagSmoothing=n.lagSmoothing,o.ticker=n.ticker,o.render=n.render,l.invalidate=function(){return this._yoyo=this.vars.yoyo===!0,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._uncache(!0),n.prototype.invalidate.call(this)},l.updateTo=function(e,t){var r,o=this.ratio,i=this.vars.immediateRender||e.immediateRender;t&&this._startTime<this._timeline._time&&(this._startTime=this._timeline._time,this._uncache(!1),this._gc?this._enabled(!0,!1):this._timeline.insert(this,this._startTime-this._delay));for(r in e)this.vars[r]=e[r];if(this._initted||i)if(t)this._initted=!1,i&&this.render(0,!0,!0);else if(this._gc&&this._enabled(!0,!1),this._notifyPluginsOfEnabled&&this._firstPT&&n._onPluginEvent("_onDisable",this),this._time/this._duration>.998){var s=this._time;this.render(0,!0,!1),this._initted=!1,this.render(s,!0,!1)}else if(this._time>0||i){this._initted=!1,this._init();for(var a,u=1/(1-o),l=this._firstPT;l;)a=l.s+l.c,l.c*=u,l.s=a-l.c,l=l._next}return this},l.render=function(e,t,n){this._initted||0===this._duration&&this.vars.repeat&&this.invalidate();var r,o,a,u,l,c,f,d,p=this._dirty?this.totalDuration():this._totalDuration,h=this._time,m=this._totalTime,g=this._cycle,y=this._duration,v=this._rawPrevTime;if(e>=p?(this._totalTime=p,this._cycle=this._repeat,this._yoyo&&0!==(1&this._cycle)?(this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0):(this._time=y,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1),this._reversed||(r=!0,o="onComplete",n=n||this._timeline.autoRemoveChildren),0===y&&(this._initted||!this.vars.lazy||n)&&(this._startTime===this._timeline._duration&&(e=0),(0===e||0>v||v===i)&&v!==e&&(n=!0,v>i&&(o="onReverseComplete")),this._rawPrevTime=d=!t||e||v===e?e:i)):1e-7>e?(this._totalTime=this._time=this._cycle=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==m||0===y&&v>0)&&(o="onReverseComplete",r=this._reversed),0>e&&(this._active=!1,0===y&&(this._initted||!this.vars.lazy||n)&&(v>=0&&(n=!0),this._rawPrevTime=d=!t||e||v===e?e:i)),this._initted||(n=!0)):(this._totalTime=this._time=e,0!==this._repeat&&(u=y+this._repeatDelay,this._cycle=this._totalTime/u>>0,0!==this._cycle&&this._cycle===this._totalTime/u&&this._cycle--,this._time=this._totalTime-this._cycle*u,this._yoyo&&0!==(1&this._cycle)&&(this._time=y-this._time),this._time>y?this._time=y:0>this._time&&(this._time=0)),this._easeType?(l=this._time/y,c=this._easeType,f=this._easePower,(1===c||3===c&&l>=.5)&&(l=1-l),3===c&&(l*=2),1===f?l*=l:2===f?l*=l*l:3===f?l*=l*l*l:4===f&&(l*=l*l*l*l),this.ratio=1===c?1-l:2===c?l:.5>this._time/y?l/2:1-l/2):this.ratio=this._ease.getRatio(this._time/y)),h===this._time&&!n&&g===this._cycle)return void(m!==this._totalTime&&this._onUpdate&&(t||this._callback("onUpdate")));if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!n&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=h,this._totalTime=m,this._rawPrevTime=v,this._cycle=g,s.lazyTweens.push(this),void(this._lazy=[e,t]);this._time&&!r?this.ratio=this._ease.getRatio(this._time/y):r&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(0===this._time?0:1))}for(this._lazy!==!1&&(this._lazy=!1),this._active||!this._paused&&this._time!==h&&e>=0&&(this._active=!0),0===m&&(2===this._initted&&e>0&&this._init(),this._startAt&&(e>=0?this._startAt.render(e,t,n):o||(o="_dummyGS")),this.vars.onStart&&(0!==this._totalTime||0===y)&&(t||this._callback("onStart"))),a=this._firstPT;a;)a.f?a.t[a.p](a.c*this.ratio+a.s):a.t[a.p]=a.c*this.ratio+a.s,a=a._next;this._onUpdate&&(0>e&&this._startAt&&this._startTime&&this._startAt.render(e,t,n),t||(this._totalTime!==m||r)&&this._callback("onUpdate")),this._cycle!==g&&(t||this._gc||this.vars.onRepeat&&this._callback("onRepeat")),o&&(!this._gc||n)&&(0>e&&this._startAt&&!this._onUpdate&&this._startTime&&this._startAt.render(e,t,n),r&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!t&&this.vars[o]&&this._callback(o),0===y&&this._rawPrevTime===i&&d!==i&&(this._rawPrevTime=0))},o.to=function(e,t,n){return new o(e,t,n)},o.from=function(e,t,n){return n.runBackwards=!0,n.immediateRender=0!=n.immediateRender,new o(e,t,n)},o.fromTo=function(e,t,n,r){return r.startAt=n,r.immediateRender=0!=r.immediateRender&&0!=n.immediateRender,new o(e,t,r)},o.staggerTo=o.allTo=function(e,t,i,s,l,f,d){s=s||0;var p,h,m,g,y=i.delay||0,v=[],b=function(){i.onComplete&&i.onComplete.apply(i.onCompleteScope||this,arguments),l.apply(d||i.callbackScope||this,f||c)};for(u(e)||("string"==typeof e&&(e=n.selector(e)||e),a(e)&&(e=r(e))),e=e||[],0>s&&(e=r(e),e.reverse(),s*=-1),p=e.length-1,m=0;p>=m;m++){h={};for(g in i)h[g]=i[g];h.delay=y,m===p&&l&&(h.onComplete=b),v[m]=new o(e[m],t,h),y+=s}return v},o.staggerFrom=o.allFrom=function(e,t,n,r,i,s,a){return n.runBackwards=!0,n.immediateRender=0!=n.immediateRender,o.staggerTo(e,t,n,r,i,s,a)},o.staggerFromTo=o.allFromTo=function(e,t,n,r,i,s,a,u){return r.startAt=n,r.immediateRender=0!=r.immediateRender&&0!=n.immediateRender,o.staggerTo(e,t,r,i,s,a,u)},o.delayedCall=function(e,t,n,r,i){return new o(t,0,{delay:e,onComplete:t,onCompleteParams:n,callbackScope:r,onReverseComplete:t,onReverseCompleteParams:n,immediateRender:!1,useFrames:i,overwrite:0})},o.set=function(e,t){return new o(e,0,t)},o.isTweening=function(e){return n.getTweensOf(e,!0).length>0};var f=function(e,t){for(var r=[],o=0,i=e._first;i;)i instanceof n?r[o++]=i:(t&&(r[o++]=i),r=r.concat(f(i,t)),o=r.length),i=i._next;return r},d=o.getAllTweens=function(t){return f(e._rootTimeline,t).concat(f(e._rootFramesTimeline,t))};o.killAll=function(e,n,r,o){null==n&&(n=!0),null==r&&(r=!0);var i,s,a,u=d(0!=o),l=u.length,c=n&&r&&o;for(a=0;l>a;a++)s=u[a],(c||s instanceof t||(i=s.target===s.vars.onComplete)&&r||n&&!i)&&(e?s.totalTime(s._reversed?0:s.totalDuration()):s._enabled(!1,!1))},o.killChildTweensOf=function(e,t){if(null!=e){var i,l,c,f,d,p=s.tweenLookup;if("string"==typeof e&&(e=n.selector(e)||e),a(e)&&(e=r(e)),u(e))for(f=e.length;--f>-1;)o.killChildTweensOf(e[f],t);else{i=[];for(c in p)for(l=p[c].target.parentNode;l;)l===e&&(i=i.concat(p[c].tweens)),l=l.parentNode;for(d=i.length,f=0;d>f;f++)t&&i[f].totalTime(i[f].totalDuration()),i[f]._enabled(!1,!1)}}};var p=function(e,n,r,o){n=n!==!1,r=r!==!1,o=o!==!1;for(var i,s,a=d(o),u=n&&r&&o,l=a.length;--l>-1;)s=a[l],(u||s instanceof t||(i=s.target===s.vars.onComplete)&&r||n&&!i)&&s.paused(e)};return o.pauseAll=function(e,t,n){p(!0,e,t,n)},o.resumeAll=function(e,t,n){p(!1,e,t,n)},o.globalTimeScale=function(t){var r=e._rootTimeline,o=n.ticker.time;return arguments.length?(t=t||i,r._startTime=o-(o-r._startTime)*r._timeScale/t,r=e._rootFramesTimeline,o=n.ticker.frame,r._startTime=o-(o-r._startTime)*r._timeScale/t,r._timeScale=e._rootTimeline._timeScale=t,t):r._timeScale},l.progress=function(e){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&0!==(1&this._cycle)?1-e:e)+this._cycle*(this._duration+this._repeatDelay),!1):this._time/this.duration()},l.totalProgress=function(e){return arguments.length?this.totalTime(this.totalDuration()*e,!1):this._totalTime/this.totalDuration()},l.time=function(e,t){return arguments.length?(this._dirty&&this.totalDuration(),e>this._duration&&(e=this._duration),this._yoyo&&0!==(1&this._cycle)?e=this._duration-e+this._cycle*(this._duration+this._repeatDelay):0!==this._repeat&&(e+=this._cycle*(this._duration+this._repeatDelay)),this.totalTime(e,t)):this._time},l.duration=function(t){return arguments.length?e.prototype.duration.call(this,t):this._duration},l.totalDuration=function(e){return arguments.length?-1===this._repeat?this:this.duration((e-this._repeat*this._repeatDelay)/(this._repeat+1)):(this._dirty&&(this._totalDuration=-1===this._repeat?999999999999:this._duration*(this._repeat+1)+this._repeatDelay*this._repeat,this._dirty=!1),this._totalDuration)},l.repeat=function(e){return arguments.length?(this._repeat=e,this._uncache(!0)):this._repeat},l.repeatDelay=function(e){return arguments.length?(this._repeatDelay=e,this._uncache(!0)):this._repeatDelay},l.yoyo=function(e){return arguments.length?(this._yoyo=e,this):this._yoyo},o},!0),c._gsDefine("TimelineLite",["core.Animation","core.SimpleTimeline","TweenLite"],function(e,t,n){var r=function(e){t.call(this,e),this._labels={},this.autoRemoveChildren=this.vars.autoRemoveChildren===!0,this.smoothChildTiming=this.vars.smoothChildTiming===!0,this._sortChildren=!0,this._onUpdate=this.vars.onUpdate;var n,r,o=this.vars;for(r in o)n=o[r],u(n)&&-1!==n.join("").indexOf("{self}")&&(o[r]=this._swapSelfInParams(n));u(o.tweens)&&this.add(o.tweens,0,o.align,o.stagger)},o=1e-10,i=n._internals,s=r._internals={},a=i.isSelector,u=i.isArray,l=i.lazyTweens,f=i.lazyRender,d=[],p=c._gsDefine.globals,h=function(e){var t,n={};for(t in e)n[t]=e[t];return n},m=s.pauseCallback=function(e,t,n,r){var i,s=e._timeline,a=s._totalTime,u=e._startTime,l=0>e._rawPrevTime||0===e._rawPrevTime&&s._reversed,c=l?0:o,f=l?o:0;if(t||!this._forcingPlayhead){for(s.pause(u),i=e._prev;i&&i._startTime===u;)i._rawPrevTime=f,i=i._prev;for(i=e._next;i&&i._startTime===u;)i._rawPrevTime=c,i=i._next;t&&t.apply(r||s.vars.callbackScope||s,n||d),(this._forcingPlayhead||!s._paused)&&s.seek(a)}},g=function(e){var t,n=[],r=e.length;for(t=0;t!==r;n.push(e[t++]));return n},y=r.prototype=new t;return r.version="1.17.0",y.constructor=r,y.kill()._gc=y._forcingPlayhead=!1,y.to=function(e,t,r,o){var i=r.repeat&&p.TweenMax||n;return t?this.add(new i(e,t,r),o):this.set(e,r,o)},y.from=function(e,t,r,o){return this.add((r.repeat&&p.TweenMax||n).from(e,t,r),o)},y.fromTo=function(e,t,r,o,i){var s=o.repeat&&p.TweenMax||n;return t?this.add(s.fromTo(e,t,r,o),i):this.set(e,o,i)},y.staggerTo=function(e,t,o,i,s,u,l,c){var f,d=new r({onComplete:u,onCompleteParams:l,callbackScope:c,smoothChildTiming:this.smoothChildTiming});for("string"==typeof e&&(e=n.selector(e)||e),e=e||[],a(e)&&(e=g(e)),i=i||0,0>i&&(e=g(e),e.reverse(),i*=-1),f=0;e.length>f;f++)o.startAt&&(o.startAt=h(o.startAt)),d.to(e[f],t,h(o),f*i);return this.add(d,s)},y.staggerFrom=function(e,t,n,r,o,i,s,a){return n.immediateRender=0!=n.immediateRender,n.runBackwards=!0,this.staggerTo(e,t,n,r,o,i,s,a)},y.staggerFromTo=function(e,t,n,r,o,i,s,a,u){return r.startAt=n,r.immediateRender=0!=r.immediateRender&&0!=n.immediateRender,this.staggerTo(e,t,r,o,i,s,a,u)},y.call=function(e,t,r,o){return this.add(n.delayedCall(0,e,t,r),o)},y.set=function(e,t,r){return r=this._parseTimeOrLabel(r,0,!0),null==t.immediateRender&&(t.immediateRender=r===this._time&&!this._paused),this.add(new n(e,0,t),r)},r.exportRoot=function(e,t){e=e||{},null==e.smoothChildTiming&&(e.smoothChildTiming=!0);var o,i,s=new r(e),a=s._timeline;for(null==t&&(t=!0),a._remove(s,!0),s._startTime=0,s._rawPrevTime=s._time=s._totalTime=a._time,o=a._first;o;)i=o._next,t&&o instanceof n&&o.target===o.vars.onComplete||s.add(o,o._startTime-o._delay),o=i;return a.add(s,0),s},y.add=function(o,i,s,a){var l,c,f,d,p,h;if("number"!=typeof i&&(i=this._parseTimeOrLabel(i,0,!0,o)),!(o instanceof e)){if(o instanceof Array||o&&o.push&&u(o)){for(s=s||"normal",a=a||0,l=i,c=o.length,f=0;c>f;f++)u(d=o[f])&&(d=new r({tweens:d})),this.add(d,l),"string"!=typeof d&&"function"!=typeof d&&("sequence"===s?l=d._startTime+d.totalDuration()/d._timeScale:"start"===s&&(d._startTime-=d.delay())),l+=a;return this._uncache(!0)}if("string"==typeof o)return this.addLabel(o,i);if("function"!=typeof o)throw"Cannot add "+o+" into the timeline; it is not a tween, timeline, function, or string.";o=n.delayedCall(0,o)}if(t.prototype.add.call(this,o,i),(this._gc||this._time===this._duration)&&!this._paused&&this._duration<this.duration())for(p=this,h=p.rawTime()>o._startTime;p._timeline;)h&&p._timeline.smoothChildTiming?p.totalTime(p._totalTime,!0):p._gc&&p._enabled(!0,!1),p=p._timeline;return this},y.remove=function(t){if(t instanceof e)return this._remove(t,!1);if(t instanceof Array||t&&t.push&&u(t)){for(var n=t.length;--n>-1;)this.remove(t[n]);return this}return"string"==typeof t?this.removeLabel(t):this.kill(null,t)},y._remove=function(e,n){t.prototype._remove.call(this,e,n);var r=this._last;return r?this._time>r._startTime+r._totalDuration/r._timeScale&&(this._time=this.duration(),this._totalTime=this._totalDuration):this._time=this._totalTime=this._duration=this._totalDuration=0,this},y.append=function(e,t){return this.add(e,this._parseTimeOrLabel(null,t,!0,e))},y.insert=y.insertMultiple=function(e,t,n,r){return this.add(e,t||0,n,r)},y.appendMultiple=function(e,t,n,r){return this.add(e,this._parseTimeOrLabel(null,t,!0,e),n,r)},y.addLabel=function(e,t){return this._labels[e]=this._parseTimeOrLabel(t),this},y.addPause=function(e,t,r,o){var i=n.delayedCall(0,m,["{self}",t,r,o],this);return i.data="isPause",this.add(i,e)},y.removeLabel=function(e){return delete this._labels[e],this},y.getLabelTime=function(e){return null!=this._labels[e]?this._labels[e]:-1},y._parseTimeOrLabel=function(t,n,r,o){var i;if(o instanceof e&&o.timeline===this)this.remove(o);else if(o&&(o instanceof Array||o.push&&u(o)))for(i=o.length;--i>-1;)o[i]instanceof e&&o[i].timeline===this&&this.remove(o[i]);if("string"==typeof n)return this._parseTimeOrLabel(n,r&&"number"==typeof t&&null==this._labels[n]?t-this.duration():0,r);if(n=n||0,"string"!=typeof t||!isNaN(t)&&null==this._labels[t])null==t&&(t=this.duration());else{if(i=t.indexOf("="),-1===i)return null==this._labels[t]?r?this._labels[t]=this.duration()+n:n:this._labels[t]+n;n=parseInt(t.charAt(i-1)+"1",10)*Number(t.substr(i+1)),t=i>1?this._parseTimeOrLabel(t.substr(0,i-1),0,r):this.duration()}return Number(t)+n},y.seek=function(e,t){return this.totalTime("number"==typeof e?e:this._parseTimeOrLabel(e),t!==!1)},y.stop=function(){return this.paused(!0)},y.gotoAndPlay=function(e,t){return this.play(e,t)},y.gotoAndStop=function(e,t){return this.pause(e,t)},y.render=function(e,t,n){this._gc&&this._enabled(!0,!1);var r,i,s,a,u,c=this._dirty?this.totalDuration():this._totalDuration,d=this._time,p=this._startTime,h=this._timeScale,m=this._paused;if(e>=c)this._totalTime=this._time=c,this._reversed||this._hasPausedChild()||(i=!0,a="onComplete",u=!!this._timeline.autoRemoveChildren,0===this._duration&&(0===e||0>this._rawPrevTime||this._rawPrevTime===o)&&this._rawPrevTime!==e&&this._first&&(u=!0,this._rawPrevTime>o&&(a="onReverseComplete"))),this._rawPrevTime=this._duration||!t||e||this._rawPrevTime===e?e:o,e=c+1e-4;else if(1e-7>e)if(this._totalTime=this._time=0,(0!==d||0===this._duration&&this._rawPrevTime!==o&&(this._rawPrevTime>0||0>e&&this._rawPrevTime>=0))&&(a="onReverseComplete",i=this._reversed),0>e)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(u=i=!0,a="onReverseComplete"):this._rawPrevTime>=0&&this._first&&(u=!0),this._rawPrevTime=e;else{if(this._rawPrevTime=this._duration||!t||e||this._rawPrevTime===e?e:o,0===e&&i)for(r=this._first;r&&0===r._startTime;)r._duration||(i=!1),r=r._next;e=0,this._initted||(u=!0)}else this._totalTime=this._time=this._rawPrevTime=e;if(this._time!==d&&this._first||n||u){if(this._initted||(this._initted=!0),this._active||!this._paused&&this._time!==d&&e>0&&(this._active=!0),0===d&&this.vars.onStart&&0!==this._time&&(t||this._callback("onStart")),this._time>=d)for(r=this._first;r&&(s=r._next,!this._paused||m);)(r._active||r._startTime<=this._time&&!r._paused&&!r._gc)&&(r._reversed?r.render((r._dirty?r.totalDuration():r._totalDuration)-(e-r._startTime)*r._timeScale,t,n):r.render((e-r._startTime)*r._timeScale,t,n)),r=s;else for(r=this._last;r&&(s=r._prev,!this._paused||m);)(r._active||d>=r._startTime&&!r._paused&&!r._gc)&&(r._reversed?r.render((r._dirty?r.totalDuration():r._totalDuration)-(e-r._startTime)*r._timeScale,t,n):r.render((e-r._startTime)*r._timeScale,t,n)),r=s;this._onUpdate&&(t||(l.length&&f(),this._callback("onUpdate"))),a&&(this._gc||(p===this._startTime||h!==this._timeScale)&&(0===this._time||c>=this.totalDuration())&&(i&&(l.length&&f(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!t&&this.vars[a]&&this._callback(a)))}},y._hasPausedChild=function(){for(var e=this._first;e;){if(e._paused||e instanceof r&&e._hasPausedChild())return!0;e=e._next}return!1},y.getChildren=function(e,t,r,o){o=o||-9999999999;for(var i=[],s=this._first,a=0;s;)o>s._startTime||(s instanceof n?t!==!1&&(i[a++]=s):(r!==!1&&(i[a++]=s),e!==!1&&(i=i.concat(s.getChildren(!0,t,r)),a=i.length))),s=s._next;return i},y.getTweensOf=function(e,t){var r,o,i=this._gc,s=[],a=0;for(i&&this._enabled(!0,!0),r=n.getTweensOf(e),o=r.length;--o>-1;)(r[o].timeline===this||t&&this._contains(r[o]))&&(s[a++]=r[o]);return i&&this._enabled(!1,!0),s},y.recent=function(){return this._recent},y._contains=function(e){for(var t=e.timeline;t;){if(t===this)return!0;t=t.timeline}return!1},y.shiftChildren=function(e,t,n){n=n||0;for(var r,o=this._first,i=this._labels;o;)o._startTime>=n&&(o._startTime+=e),o=o._next;if(t)for(r in i)i[r]>=n&&(i[r]+=e);return this._uncache(!0)},y._kill=function(e,t){if(!e&&!t)return this._enabled(!1,!1);for(var n=t?this.getTweensOf(t):this.getChildren(!0,!0,!1),r=n.length,o=!1;--r>-1;)n[r]._kill(e,t)&&(o=!0);return o},y.clear=function(e){var t=this.getChildren(!1,!0,!0),n=t.length;for(this._time=this._totalTime=0;--n>-1;)t[n]._enabled(!1,!1);return e!==!1&&(this._labels={}),this._uncache(!0)},y.invalidate=function(){for(var t=this._first;t;)t.invalidate(),t=t._next;return e.prototype.invalidate.call(this)},y._enabled=function(e,n){if(e===this._gc)for(var r=this._first;r;)r._enabled(e,!0),r=r._next;return t.prototype._enabled.call(this,e,n)},y.totalTime=function(){this._forcingPlayhead=!0;var t=e.prototype.totalTime.apply(this,arguments);return this._forcingPlayhead=!1,t},y.duration=function(e){return arguments.length?(0!==this.duration()&&0!==e&&this.timeScale(this._duration/e),this):(this._dirty&&this.totalDuration(),this._duration)},y.totalDuration=function(e){if(!arguments.length){if(this._dirty){for(var t,n,r=0,o=this._last,i=999999999999;o;)t=o._prev,o._dirty&&o.totalDuration(),o._startTime>i&&this._sortChildren&&!o._paused?this.add(o,o._startTime-o._delay):i=o._startTime,
0>o._startTime&&!o._paused&&(r-=o._startTime,this._timeline.smoothChildTiming&&(this._startTime+=o._startTime/this._timeScale),this.shiftChildren(-o._startTime,!1,-9999999999),i=0),n=o._startTime+o._totalDuration/o._timeScale,n>r&&(r=n),o=t;this._duration=this._totalDuration=r,this._dirty=!1}return this._totalDuration}return 0!==this.totalDuration()&&0!==e&&this.timeScale(this._totalDuration/e),this},y.paused=function(t){if(!t)for(var n=this._first,r=this._time;n;)n._startTime===r&&"isPause"===n.data&&(n._rawPrevTime=0),n=n._next;return e.prototype.paused.apply(this,arguments)},y.usesFrames=function(){for(var t=this._timeline;t._timeline;)t=t._timeline;return t===e._rootFramesTimeline},y.rawTime=function(){return this._paused?this._totalTime:(this._timeline.rawTime()-this._startTime)*this._timeScale},r},!0),c._gsDefine("TimelineMax",["TimelineLite","TweenLite","easing.Ease"],function(e,t,n){var r=function(t){e.call(this,t),this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._cycle=0,this._yoyo=this.vars.yoyo===!0,this._dirty=!0},o=1e-10,i=t._internals,s=i.lazyTweens,a=i.lazyRender,u=new n(null,null,1,0),l=r.prototype=new e;return l.constructor=r,l.kill()._gc=!1,r.version="1.17.0",l.invalidate=function(){return this._yoyo=this.vars.yoyo===!0,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._uncache(!0),e.prototype.invalidate.call(this)},l.addCallback=function(e,n,r,o){return this.add(t.delayedCall(0,e,r,o),n)},l.removeCallback=function(e,t){if(e)if(null==t)this._kill(null,e);else for(var n=this.getTweensOf(e,!1),r=n.length,o=this._parseTimeOrLabel(t);--r>-1;)n[r]._startTime===o&&n[r]._enabled(!1,!1);return this},l.removePause=function(t){return this.removeCallback(e._internals.pauseCallback,t)},l.tweenTo=function(e,n){n=n||{};var r,o,i,s={ease:u,useFrames:this.usesFrames(),immediateRender:!1};for(o in n)s[o]=n[o];return s.time=this._parseTimeOrLabel(e),r=Math.abs(Number(s.time)-this._time)/this._timeScale||.001,i=new t(this,r,s),s.onStart=function(){i.target.paused(!0),i.vars.time!==i.target.time()&&r===i.duration()&&i.duration(Math.abs(i.vars.time-i.target.time())/i.target._timeScale),n.onStart&&i._callback("onStart")},i},l.tweenFromTo=function(e,t,n){n=n||{},e=this._parseTimeOrLabel(e),n.startAt={onComplete:this.seek,onCompleteParams:[e],callbackScope:this},n.immediateRender=n.immediateRender!==!1;var r=this.tweenTo(t,n);return r.duration(Math.abs(r.vars.time-e)/this._timeScale||.001)},l.render=function(e,t,n){this._gc&&this._enabled(!0,!1);var r,i,u,l,c,f,d=this._dirty?this.totalDuration():this._totalDuration,p=this._duration,h=this._time,m=this._totalTime,g=this._startTime,y=this._timeScale,v=this._rawPrevTime,b=this._paused,_=this._cycle;if(e>=d)this._locked||(this._totalTime=d,this._cycle=this._repeat),this._reversed||this._hasPausedChild()||(i=!0,l="onComplete",c=!!this._timeline.autoRemoveChildren,0===this._duration&&(0===e||0>v||v===o)&&v!==e&&this._first&&(c=!0,v>o&&(l="onReverseComplete"))),this._rawPrevTime=this._duration||!t||e||this._rawPrevTime===e?e:o,this._yoyo&&0!==(1&this._cycle)?this._time=e=0:(this._time=p,e=p+1e-4);else if(1e-7>e)if(this._locked||(this._totalTime=this._cycle=0),this._time=0,(0!==h||0===p&&v!==o&&(v>0||0>e&&v>=0)&&!this._locked)&&(l="onReverseComplete",i=this._reversed),0>e)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(c=i=!0,l="onReverseComplete"):v>=0&&this._first&&(c=!0),this._rawPrevTime=e;else{if(this._rawPrevTime=p||!t||e||this._rawPrevTime===e?e:o,0===e&&i)for(r=this._first;r&&0===r._startTime;)r._duration||(i=!1),r=r._next;e=0,this._initted||(c=!0)}else 0===p&&0>v&&(c=!0),this._time=this._rawPrevTime=e,this._locked||(this._totalTime=e,0!==this._repeat&&(f=p+this._repeatDelay,this._cycle=this._totalTime/f>>0,0!==this._cycle&&this._cycle===this._totalTime/f&&this._cycle--,this._time=this._totalTime-this._cycle*f,this._yoyo&&0!==(1&this._cycle)&&(this._time=p-this._time),this._time>p?(this._time=p,e=p+1e-4):0>this._time?this._time=e=0:e=this._time));if(this._cycle!==_&&!this._locked){var w=this._yoyo&&0!==(1&_),T=w===(this._yoyo&&0!==(1&this._cycle)),E=this._totalTime,x=this._cycle,S=this._rawPrevTime,C=this._time;if(this._totalTime=_*p,_>this._cycle?w=!w:this._totalTime+=p,this._time=h,this._rawPrevTime=0===p?v-1e-4:v,this._cycle=_,this._locked=!0,h=w?0:p,this.render(h,t,0===p),t||this._gc||this.vars.onRepeat&&this._callback("onRepeat"),T&&(h=w?p+1e-4:-1e-4,this.render(h,!0,!1)),this._locked=!1,this._paused&&!b)return;this._time=C,this._totalTime=E,this._cycle=x,this._rawPrevTime=S}if(!(this._time!==h&&this._first||n||c))return void(m!==this._totalTime&&this._onUpdate&&(t||this._callback("onUpdate")));if(this._initted||(this._initted=!0),this._active||!this._paused&&this._totalTime!==m&&e>0&&(this._active=!0),0===m&&this.vars.onStart&&0!==this._totalTime&&(t||this._callback("onStart")),this._time>=h)for(r=this._first;r&&(u=r._next,!this._paused||b);)(r._active||r._startTime<=this._time&&!r._paused&&!r._gc)&&(r._reversed?r.render((r._dirty?r.totalDuration():r._totalDuration)-(e-r._startTime)*r._timeScale,t,n):r.render((e-r._startTime)*r._timeScale,t,n)),r=u;else for(r=this._last;r&&(u=r._prev,!this._paused||b);)(r._active||h>=r._startTime&&!r._paused&&!r._gc)&&(r._reversed?r.render((r._dirty?r.totalDuration():r._totalDuration)-(e-r._startTime)*r._timeScale,t,n):r.render((e-r._startTime)*r._timeScale,t,n)),r=u;this._onUpdate&&(t||(s.length&&a(),this._callback("onUpdate"))),l&&(this._locked||this._gc||(g===this._startTime||y!==this._timeScale)&&(0===this._time||d>=this.totalDuration())&&(i&&(s.length&&a(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!t&&this.vars[l]&&this._callback(l)))},l.getActive=function(e,t,n){null==e&&(e=!0),null==t&&(t=!0),null==n&&(n=!1);var r,o,i=[],s=this.getChildren(e,t,n),a=0,u=s.length;for(r=0;u>r;r++)o=s[r],o.isActive()&&(i[a++]=o);return i},l.getLabelAfter=function(e){e||0!==e&&(e=this._time);var t,n=this.getLabelsArray(),r=n.length;for(t=0;r>t;t++)if(n[t].time>e)return n[t].name;return null},l.getLabelBefore=function(e){null==e&&(e=this._time);for(var t=this.getLabelsArray(),n=t.length;--n>-1;)if(e>t[n].time)return t[n].name;return null},l.getLabelsArray=function(){var e,t=[],n=0;for(e in this._labels)t[n++]={time:this._labels[e],name:e};return t.sort(function(e,t){return e.time-t.time}),t},l.progress=function(e,t){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&0!==(1&this._cycle)?1-e:e)+this._cycle*(this._duration+this._repeatDelay),t):this._time/this.duration()},l.totalProgress=function(e,t){return arguments.length?this.totalTime(this.totalDuration()*e,t):this._totalTime/this.totalDuration()},l.totalDuration=function(t){return arguments.length?-1===this._repeat?this:this.duration((t-this._repeat*this._repeatDelay)/(this._repeat+1)):(this._dirty&&(e.prototype.totalDuration.call(this),this._totalDuration=-1===this._repeat?999999999999:this._duration*(this._repeat+1)+this._repeatDelay*this._repeat),this._totalDuration)},l.time=function(e,t){return arguments.length?(this._dirty&&this.totalDuration(),e>this._duration&&(e=this._duration),this._yoyo&&0!==(1&this._cycle)?e=this._duration-e+this._cycle*(this._duration+this._repeatDelay):0!==this._repeat&&(e+=this._cycle*(this._duration+this._repeatDelay)),this.totalTime(e,t)):this._time},l.repeat=function(e){return arguments.length?(this._repeat=e,this._uncache(!0)):this._repeat},l.repeatDelay=function(e){return arguments.length?(this._repeatDelay=e,this._uncache(!0)):this._repeatDelay},l.yoyo=function(e){return arguments.length?(this._yoyo=e,this):this._yoyo},l.currentLabel=function(e){return arguments.length?this.seek(e,!0):this.getLabelBefore(this._time+1e-8)},r},!0),function(){var e=180/Math.PI,t=[],n=[],r=[],o={},i=c._gsDefine.globals,s=function(e,t,n,r){this.a=e,this.b=t,this.c=n,this.d=r,this.da=r-e,this.ca=n-e,this.ba=t-e},a=",x,y,z,left,top,right,bottom,marginTop,marginLeft,marginRight,marginBottom,paddingLeft,paddingTop,paddingRight,paddingBottom,backgroundPosition,backgroundPosition_y,",u=function(e,t,n,r){var o={a:e},i={},s={},a={c:r},u=(e+t)/2,l=(t+n)/2,c=(n+r)/2,f=(u+l)/2,d=(l+c)/2,p=(d-f)/8;return o.b=u+(e-u)/4,i.b=f+p,o.c=i.a=(o.b+i.b)/2,i.c=s.a=(f+d)/2,s.b=d-p,a.b=c+(r-c)/4,s.c=a.a=(s.b+a.b)/2,[o,i,s,a]},l=function(e,o,i,s,a){var l,c,f,d,p,h,m,g,y,v,b,_,w,T=e.length-1,E=0,x=e[0].a;for(l=0;T>l;l++)p=e[E],c=p.a,f=p.d,d=e[E+1].d,a?(b=t[l],_=n[l],w=.25*(_+b)*o/(s?.5:r[l]||.5),h=f-(f-c)*(s?.5*o:0!==b?w/b:0),m=f+(d-f)*(s?.5*o:0!==_?w/_:0),g=f-(h+((m-h)*(3*b/(b+_)+.5)/4||0))):(h=f-.5*(f-c)*o,m=f+.5*(d-f)*o,g=f-(h+m)/2),h+=g,m+=g,p.c=y=h,p.b=0!==l?x:x=p.a+.6*(p.c-p.a),p.da=f-c,p.ca=y-c,p.ba=x-c,i?(v=u(c,x,y,f),e.splice(E,1,v[0],v[1],v[2],v[3]),E+=4):E++,x=m;p=e[E],p.b=x,p.c=x+.4*(p.d-x),p.da=p.d-p.a,p.ca=p.c-p.a,p.ba=x-p.a,i&&(v=u(p.a,x,p.c,p.d),e.splice(E,1,v[0],v[1],v[2],v[3]))},f=function(e,r,o,i){var a,u,l,c,f,d,p=[];if(i)for(e=[i].concat(e),u=e.length;--u>-1;)"string"==typeof(d=e[u][r])&&"="===d.charAt(1)&&(e[u][r]=i[r]+Number(d.charAt(0)+d.substr(2)));if(a=e.length-2,0>a)return p[0]=new s(e[0][r],0,0,e[-1>a?0:1][r]),p;for(u=0;a>u;u++)l=e[u][r],c=e[u+1][r],p[u]=new s(l,0,0,c),o&&(f=e[u+2][r],t[u]=(t[u]||0)+(c-l)*(c-l),n[u]=(n[u]||0)+(f-c)*(f-c));return p[u]=new s(e[u][r],0,0,e[u+1][r]),p},d=function(e,i,s,u,c,d){var p,h,m,g,y,v,b,_,w={},T=[],E=d||e[0];c="string"==typeof c?","+c+",":a,null==i&&(i=1);for(h in e[0])T.push(h);if(e.length>1){for(_=e[e.length-1],b=!0,p=T.length;--p>-1;)if(h=T[p],Math.abs(E[h]-_[h])>.05){b=!1;break}b&&(e=e.concat(),d&&e.unshift(d),e.push(e[1]),d=e[e.length-3])}for(t.length=n.length=r.length=0,p=T.length;--p>-1;)h=T[p],o[h]=-1!==c.indexOf(","+h+","),w[h]=f(e,h,o[h],d);for(p=t.length;--p>-1;)t[p]=Math.sqrt(t[p]),n[p]=Math.sqrt(n[p]);if(!u){for(p=T.length;--p>-1;)if(o[h])for(m=w[T[p]],v=m.length-1,g=0;v>g;g++)y=m[g+1].da/n[g]+m[g].da/t[g],r[g]=(r[g]||0)+y*y;for(p=r.length;--p>-1;)r[p]=Math.sqrt(r[p])}for(p=T.length,g=s?4:1;--p>-1;)h=T[p],m=w[h],l(m,i,s,u,o[h]),b&&(m.splice(0,g),m.splice(m.length-g,g));return w},p=function(e,t,n){t=t||"soft";var r,o,i,a,u,l,c,f,d,p,h,m={},g="cubic"===t?3:2,y="soft"===t,v=[];if(y&&n&&(e=[n].concat(e)),null==e||g+1>e.length)throw"invalid Bezier data";for(d in e[0])v.push(d);for(l=v.length;--l>-1;){for(d=v[l],m[d]=u=[],p=0,f=e.length,c=0;f>c;c++)r=null==n?e[c][d]:"string"==typeof(h=e[c][d])&&"="===h.charAt(1)?n[d]+Number(h.charAt(0)+h.substr(2)):Number(h),y&&c>1&&f-1>c&&(u[p++]=(r+u[p-2])/2),u[p++]=r;for(f=p-g+1,p=0,c=0;f>c;c+=g)r=u[c],o=u[c+1],i=u[c+2],a=2===g?0:u[c+3],u[p++]=h=3===g?new s(r,o,i,a):new s(r,(2*o+r)/3,(2*o+i)/3,i);u.length=p}return m},h=function(e,t,n){for(var r,o,i,s,a,u,l,c,f,d,p,h=1/n,m=e.length;--m>-1;)for(d=e[m],i=d.a,s=d.d-i,a=d.c-i,u=d.b-i,r=o=0,c=1;n>=c;c++)l=h*c,f=1-l,r=o-(o=(l*l*s+3*f*(l*a+f*u))*l),p=m*n+c-1,t[p]=(t[p]||0)+r*r},m=function(e,t){t=t>>0||6;var n,r,o,i,s=[],a=[],u=0,l=0,c=t-1,f=[],d=[];for(n in e)h(e[n],s,t);for(o=s.length,r=0;o>r;r++)u+=Math.sqrt(s[r]),i=r%t,d[i]=u,i===c&&(l+=u,i=r/t>>0,f[i]=d,a[i]=l,u=0,d=[]);return{length:l,lengths:a,segments:f}},g=c._gsDefine.plugin({propName:"bezier",priority:-1,version:"1.3.4",API:2,global:!0,init:function(e,t,n){this._target=e,t instanceof Array&&(t={values:t}),this._func={},this._round={},this._props=[],this._timeRes=null==t.timeResolution?6:parseInt(t.timeResolution,10);var r,o,i,s,a,u=t.values||[],l={},c=u[0],f=t.autoRotate||n.vars.orientToBezier;this._autoRotate=f?f instanceof Array?f:[["x","y","rotation",f===!0?0:Number(f)||0]]:null;for(r in c)this._props.push(r);for(i=this._props.length;--i>-1;)r=this._props[i],this._overwriteProps.push(r),o=this._func[r]="function"==typeof e[r],l[r]=o?e[r.indexOf("set")||"function"!=typeof e["get"+r.substr(3)]?r:"get"+r.substr(3)]():parseFloat(e[r]),a||l[r]!==u[0][r]&&(a=l);if(this._beziers="cubic"!==t.type&&"quadratic"!==t.type&&"soft"!==t.type?d(u,isNaN(t.curviness)?1:t.curviness,!1,"thruBasic"===t.type,t.correlate,a):p(u,t.type,l),this._segCount=this._beziers[r].length,this._timeRes){var h=m(this._beziers,this._timeRes);this._length=h.length,this._lengths=h.lengths,this._segments=h.segments,this._l1=this._li=this._s1=this._si=0,this._l2=this._lengths[0],this._curSeg=this._segments[0],this._s2=this._curSeg[0],this._prec=1/this._curSeg.length}if(f=this._autoRotate)for(this._initialRotations=[],f[0]instanceof Array||(this._autoRotate=f=[f]),i=f.length;--i>-1;){for(s=0;3>s;s++)r=f[i][s],this._func[r]="function"==typeof e[r]?e[r.indexOf("set")||"function"!=typeof e["get"+r.substr(3)]?r:"get"+r.substr(3)]:!1;r=f[i][2],this._initialRotations[i]=this._func[r]?this._func[r].call(this._target):this._target[r]}return this._startRatio=n.vars.runBackwards?1:0,!0},set:function(t){var n,r,o,i,s,a,u,l,c,f,d=this._segCount,p=this._func,h=this._target,m=t!==this._startRatio;if(this._timeRes){if(c=this._lengths,f=this._curSeg,t*=this._length,o=this._li,t>this._l2&&d-1>o){for(l=d-1;l>o&&t>=(this._l2=c[++o]););this._l1=c[o-1],this._li=o,this._curSeg=f=this._segments[o],this._s2=f[this._s1=this._si=0]}else if(this._l1>t&&o>0){for(;o>0&&(this._l1=c[--o])>=t;);0===o&&this._l1>t?this._l1=0:o++,this._l2=c[o],this._li=o,this._curSeg=f=this._segments[o],this._s1=f[(this._si=f.length-1)-1]||0,this._s2=f[this._si]}if(n=o,t-=this._l1,o=this._si,t>this._s2&&f.length-1>o){for(l=f.length-1;l>o&&t>=(this._s2=f[++o]););this._s1=f[o-1],this._si=o}else if(this._s1>t&&o>0){for(;o>0&&(this._s1=f[--o])>=t;);0===o&&this._s1>t?this._s1=0:o++,this._s2=f[o],this._si=o}a=(o+(t-this._s1)/(this._s2-this._s1))*this._prec}else n=0>t?0:t>=1?d-1:d*t>>0,a=(t-n*(1/d))*d;for(r=1-a,o=this._props.length;--o>-1;)i=this._props[o],s=this._beziers[i][n],u=(a*a*s.da+3*r*(a*s.ca+r*s.ba))*a+s.a,this._round[i]&&(u=Math.round(u)),p[i]?h[i](u):h[i]=u;if(this._autoRotate){var g,y,v,b,_,w,T,E=this._autoRotate;for(o=E.length;--o>-1;)i=E[o][2],w=E[o][3]||0,T=E[o][4]===!0?1:e,s=this._beziers[E[o][0]],g=this._beziers[E[o][1]],s&&g&&(s=s[n],g=g[n],y=s.a+(s.b-s.a)*a,b=s.b+(s.c-s.b)*a,y+=(b-y)*a,b+=(s.c+(s.d-s.c)*a-b)*a,v=g.a+(g.b-g.a)*a,_=g.b+(g.c-g.b)*a,v+=(_-v)*a,_+=(g.c+(g.d-g.c)*a-_)*a,u=m?Math.atan2(_-v,b-y)*T+w:this._initialRotations[o],p[i]?h[i](u):h[i]=u)}}}),y=g.prototype;g.bezierThrough=d,g.cubicToQuadratic=u,g._autoCSS=!0,g.quadraticToCubic=function(e,t,n){return new s(e,(2*t+e)/3,(2*t+n)/3,n)},g._cssRegister=function(){var e=i.CSSPlugin;if(e){var t=e._internals,n=t._parseToProxy,r=t._setPluginRatio,o=t.CSSPropTween;t._registerComplexSpecialProp("bezier",{parser:function(e,t,i,s,a,u){t instanceof Array&&(t={values:t}),u=new g;var l,c,f,d=t.values,p=d.length-1,h=[],m={};if(0>p)return a;for(l=0;p>=l;l++)f=n(e,d[l],s,a,u,p!==l),h[l]=f.end;for(c in t)m[c]=t[c];return m.values=h,a=new o(e,"bezier",0,0,f.pt,2),a.data=f,a.plugin=u,a.setRatio=r,0===m.autoRotate&&(m.autoRotate=!0),!m.autoRotate||m.autoRotate instanceof Array||(l=m.autoRotate===!0?0:Number(m.autoRotate),m.autoRotate=null!=f.end.left?[["left","top","rotation",l,!1]]:null!=f.end.x?[["x","y","rotation",l,!1]]:!1),m.autoRotate&&(s._transform||s._enableTransforms(!1),f.autoRotate=s._target._gsTransform),u._onInitTween(f.proxy,m,s._tween),a}})}},y._roundProps=function(e,t){for(var n=this._overwriteProps,r=n.length;--r>-1;)(e[n[r]]||e.bezier||e.bezierThrough)&&(this._round[n[r]]=t)},y._kill=function(e){var t,n,r=this._props;for(t in this._beziers)if(t in e)for(delete this._beziers[t],delete this._func[t],n=r.length;--n>-1;)r[n]===t&&r.splice(n,1);return this._super._kill.call(this,e)}}(),c._gsDefine("plugins.CSSPlugin",["plugins.TweenPlugin","TweenLite"],function(e,t){var n,r,o,i,s=function(){e.call(this,"css"),this._overwriteProps.length=0,this.setRatio=s.prototype.setRatio},a=c._gsDefine.globals,u={},l=s.prototype=new e("css");l.constructor=s,s.version="1.17.0",s.API=2,s.defaultTransformPerspective=0,s.defaultSkewType="compensated",s.defaultSmoothOrigin=!0,l="px",s.suffixMap={top:l,right:l,bottom:l,left:l,width:l,height:l,fontSize:l,padding:l,margin:l,perspective:l,lineHeight:""};var f,d,p,h,m,g,y=/(?:\d|\-\d|\.\d|\-\.\d)+/g,v=/(?:\d|\-\d|\.\d|\-\.\d|\+=\d|\-=\d|\+=.\d|\-=\.\d)+/g,b=/(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b)/gi,_=/(?![+-]?\d*\.?\d+|[+-]|e[+-]\d+)[^0-9]/g,w=/(?:\d|\-|\+|=|#|\.)*/g,T=/opacity *= *([^)]*)/i,E=/opacity:([^;]*)/i,x=/alpha\(opacity *=.+?\)/i,S=/^(rgb|hsl)/,C=/([A-Z])/g,P=/-([a-z])/gi,M=/(^(?:url\(\"|url\())|(?:(\"\))$|\)$)/gi,R=function(e,t){return t.toUpperCase()},D=/(?:Left|Right|Width)/i,O=/(M11|M12|M21|M22)=[\d\-\.e]+/gi,N=/progid\:DXImageTransform\.Microsoft\.Matrix\(.+?\)/i,A=/,(?=[^\)]*(?:\(|$))/gi,I=Math.PI/180,B=180/Math.PI,k={},L=document,j=function(e){return L.createElementNS?L.createElementNS("http://www.w3.org/1999/xhtml",e):L.createElement(e)},G=j("div"),H=j("img"),V=s._internals={_specialProps:u},U=navigator.userAgent,F=function(){var e=U.indexOf("Android"),t=j("a");return p=-1!==U.indexOf("Safari")&&-1===U.indexOf("Chrome")&&(-1===e||Number(U.substr(e+8,1))>3),m=p&&6>Number(U.substr(U.indexOf("Version/")+8,1)),h=-1!==U.indexOf("Firefox"),(/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(U)||/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(U))&&(g=parseFloat(RegExp.$1)),t?(t.style.cssText="top:1px;opacity:.55;",/^0.55/.test(t.style.opacity)):!1}(),W=function(e){return T.test("string"==typeof e?e:(e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?parseFloat(RegExp.$1)/100:1},q=function(e){window.console&&console.log(e)},X="",z="",Y=function(e,t){t=t||G;var n,r,o=t.style;if(void 0!==o[e])return e;for(e=e.charAt(0).toUpperCase()+e.substr(1),n=["O","Moz","ms","Ms","Webkit"],r=5;--r>-1&&void 0===o[n[r]+e];);return r>=0?(z=3===r?"ms":n[r],X="-"+z.toLowerCase()+"-",z+e):null},K=L.defaultView?L.defaultView.getComputedStyle:function(){},Q=s.getStyle=function(e,t,n,r,o){var i;return F||"opacity"!==t?(!r&&e.style[t]?i=e.style[t]:(n=n||K(e))?i=n[t]||n.getPropertyValue(t)||n.getPropertyValue(t.replace(C,"-$1").toLowerCase()):e.currentStyle&&(i=e.currentStyle[t]),null==o||i&&"none"!==i&&"auto"!==i&&"auto auto"!==i?i:o):W(e)},$=V.convertToPixels=function(e,n,r,o,i){if("px"===o||!o)return r;if("auto"===o||!r)return 0;var a,u,l,c=D.test(n),f=e,d=G.style,p=0>r;if(p&&(r=-r),"%"===o&&-1!==n.indexOf("border"))a=r/100*(c?e.clientWidth:e.clientHeight);else{if(d.cssText="border:0 solid red;position:"+Q(e,"position")+";line-height:0;","%"!==o&&f.appendChild)d[c?"borderLeftWidth":"borderTopWidth"]=r+o;else{if(f=e.parentNode||L.body,u=f._gsCache,l=t.ticker.frame,u&&c&&u.time===l)return u.width*r/100;d[c?"width":"height"]=r+o}f.appendChild(G),a=parseFloat(G[c?"offsetWidth":"offsetHeight"]),f.removeChild(G),c&&"%"===o&&s.cacheWidths!==!1&&(u=f._gsCache=f._gsCache||{},u.time=l,u.width=100*(a/r)),0!==a||i||(a=$(e,n,r,o,!0))}return p?-a:a},Z=V.calculateOffset=function(e,t,n){if("absolute"!==Q(e,"position",n))return 0;var r="left"===t?"Left":"Top",o=Q(e,"margin"+r,n);return e["offset"+r]-($(e,t,parseFloat(o),o.replace(w,""))||0)},J=function(e,t){var n,r,o,i={};if(t=t||K(e,null))if(n=t.length)for(;--n>-1;)o=t[n],(-1===o.indexOf("-transform")||Se===o)&&(i[o.replace(P,R)]=t.getPropertyValue(o));else for(n in t)(-1===n.indexOf("Transform")||xe===n)&&(i[n]=t[n]);else if(t=e.currentStyle||e.style)for(n in t)"string"==typeof n&&void 0===i[n]&&(i[n.replace(P,R)]=t[n]);return F||(i.opacity=W(e)),r=Le(e,t,!1),i.rotation=r.rotation,i.skewX=r.skewX,i.scaleX=r.scaleX,i.scaleY=r.scaleY,i.x=r.x,i.y=r.y,Pe&&(i.z=r.z,i.rotationX=r.rotationX,i.rotationY=r.rotationY,i.scaleZ=r.scaleZ),i.filters&&delete i.filters,i},ee=function(e,t,n,r,o){var i,s,a,u={},l=e.style;for(s in n)"cssText"!==s&&"length"!==s&&isNaN(s)&&(t[s]!==(i=n[s])||o&&o[s])&&-1===s.indexOf("Origin")&&("number"==typeof i||"string"==typeof i)&&(u[s]="auto"!==i||"left"!==s&&"top"!==s?""!==i&&"auto"!==i&&"none"!==i||"string"!=typeof t[s]||""===t[s].replace(_,"")?i:0:Z(e,s),void 0!==l[s]&&(a=new he(l,s,l[s],a)));if(r)for(s in r)"className"!==s&&(u[s]=r[s]);return{difs:u,firstMPT:a}},te={width:["Left","Right"],height:["Top","Bottom"]},ne=["marginLeft","marginRight","marginTop","marginBottom"],re=function(e,t,n){var r=parseFloat("width"===t?e.offsetWidth:e.offsetHeight),o=te[t],i=o.length;for(n=n||K(e,null);--i>-1;)r-=parseFloat(Q(e,"padding"+o[i],n,!0))||0,r-=parseFloat(Q(e,"border"+o[i]+"Width",n,!0))||0;return r},oe=function(e,t){(null==e||""===e||"auto"===e||"auto auto"===e)&&(e="0 0");var n=e.split(" "),r=-1!==e.indexOf("left")?"0%":-1!==e.indexOf("right")?"100%":n[0],o=-1!==e.indexOf("top")?"0%":-1!==e.indexOf("bottom")?"100%":n[1];return null==o?o="center"===r?"50%":"0":"center"===o&&(o="50%"),("center"===r||isNaN(parseFloat(r))&&-1===(r+"").indexOf("="))&&(r="50%"),e=r+" "+o+(n.length>2?" "+n[2]:""),t&&(t.oxp=-1!==r.indexOf("%"),t.oyp=-1!==o.indexOf("%"),t.oxr="="===r.charAt(1),t.oyr="="===o.charAt(1),t.ox=parseFloat(r.replace(_,"")),t.oy=parseFloat(o.replace(_,"")),t.v=e),t||e},ie=function(e,t){return"string"==typeof e&&"="===e.charAt(1)?parseInt(e.charAt(0)+"1",10)*parseFloat(e.substr(2)):parseFloat(e)-parseFloat(t)},se=function(e,t){return null==e?t:"string"==typeof e&&"="===e.charAt(1)?parseInt(e.charAt(0)+"1",10)*parseFloat(e.substr(2))+t:parseFloat(e)},ae=function(e,t,n,r){var o,i,s,a,u,l=1e-6;return null==e?a=t:"number"==typeof e?a=e:(o=360,i=e.split("_"),u="="===e.charAt(1),s=(u?parseInt(e.charAt(0)+"1",10)*parseFloat(i[0].substr(2)):parseFloat(i[0]))*(-1===e.indexOf("rad")?1:B)-(u?0:t),i.length&&(r&&(r[n]=t+s),-1!==e.indexOf("short")&&(s%=o,s!==s%(o/2)&&(s=0>s?s+o:s-o)),-1!==e.indexOf("_cw")&&0>s?s=(s+9999999999*o)%o-(0|s/o)*o:-1!==e.indexOf("ccw")&&s>0&&(s=(s-9999999999*o)%o-(0|s/o)*o)),a=t+s),l>a&&a>-l&&(a=0),a},ue={aqua:[0,255,255],lime:[0,255,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,255],navy:[0,0,128],white:[255,255,255],fuchsia:[255,0,255],olive:[128,128,0],yellow:[255,255,0],orange:[255,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[255,0,0],pink:[255,192,203],cyan:[0,255,255],transparent:[255,255,255,0]},le=function(e,t,n){return e=0>e?e+1:e>1?e-1:e,0|255*(1>6*e?t+6*(n-t)*e:.5>e?n:2>3*e?t+6*(n-t)*(2/3-e):t)+.5},ce=s.parseColor=function(e){var t,n,r,o,i,s;return e&&""!==e?"number"==typeof e?[e>>16,255&e>>8,255&e]:(","===e.charAt(e.length-1)&&(e=e.substr(0,e.length-1)),ue[e]?ue[e]:"#"===e.charAt(0)?(4===e.length&&(t=e.charAt(1),n=e.charAt(2),r=e.charAt(3),e="#"+t+t+n+n+r+r),e=parseInt(e.substr(1),16),[e>>16,255&e>>8,255&e]):"hsl"===e.substr(0,3)?(e=e.match(y),o=Number(e[0])%360/360,i=Number(e[1])/100,s=Number(e[2])/100,n=.5>=s?s*(i+1):s+i-s*i,t=2*s-n,e.length>3&&(e[3]=Number(e[3])),e[0]=le(o+1/3,t,n),e[1]=le(o,t,n),e[2]=le(o-1/3,t,n),e):(e=e.match(y)||ue.transparent,e[0]=Number(e[0]),e[1]=Number(e[1]),e[2]=Number(e[2]),e.length>3&&(e[3]=Number(e[3])),e)):ue.black},fe="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#.+?\\b";for(l in ue)fe+="|"+l+"\\b";fe=RegExp(fe+")","gi");var de=function(e,t,n,r){if(null==e)return function(e){return e};var o,i=t?(e.match(fe)||[""])[0]:"",s=e.split(i).join("").match(b)||[],a=e.substr(0,e.indexOf(s[0])),u=")"===e.charAt(e.length-1)?")":"",l=-1!==e.indexOf(" ")?" ":",",c=s.length,f=c>0?s[0].replace(y,""):"";return c?o=t?function(e){var t,d,p,h;if("number"==typeof e)e+=f;else if(r&&A.test(e)){for(h=e.replace(A,"|").split("|"),p=0;h.length>p;p++)h[p]=o(h[p]);return h.join(",")}if(t=(e.match(fe)||[i])[0],d=e.split(t).join("").match(b)||[],p=d.length,c>p--)for(;c>++p;)d[p]=n?d[0|(p-1)/2]:s[p];return a+d.join(l)+l+t+u+(-1!==e.indexOf("inset")?" inset":"")}:function(e){var t,i,d;if("number"==typeof e)e+=f;else if(r&&A.test(e)){for(i=e.replace(A,"|").split("|"),d=0;i.length>d;d++)i[d]=o(i[d]);return i.join(",")}if(t=e.match(b)||[],d=t.length,c>d--)for(;c>++d;)t[d]=n?t[0|(d-1)/2]:s[d];return a+t.join(l)+u}:function(e){return e}},pe=function(e){return e=e.split(","),function(t,n,r,o,i,s,a){var u,l=(n+"").split(" ");for(a={},u=0;4>u;u++)a[e[u]]=l[u]=l[u]||l[(u-1)/2>>0];return o.parse(t,a,i,s)}},he=(V._setPluginRatio=function(e){this.plugin.setRatio(e);for(var t,n,r,o,i=this.data,s=i.proxy,a=i.firstMPT,u=1e-6;a;)t=s[a.v],a.r?t=Math.round(t):u>t&&t>-u&&(t=0),a.t[a.p]=t,a=a._next;if(i.autoRotate&&(i.autoRotate.rotation=s.rotation),1===e)for(a=i.firstMPT;a;){if(n=a.t,n.type){if(1===n.type){for(o=n.xs0+n.s+n.xs1,r=1;n.l>r;r++)o+=n["xn"+r]+n["xs"+(r+1)];n.e=o}}else n.e=n.s+n.xs0;a=a._next}},function(e,t,n,r,o){this.t=e,this.p=t,this.v=n,this.r=o,r&&(r._prev=this,this._next=r)}),me=(V._parseToProxy=function(e,t,n,r,o,i){var s,a,u,l,c,f=r,d={},p={},h=n._transform,m=k;for(n._transform=null,k=t,r=c=n.parse(e,t,r,o),k=m,i&&(n._transform=h,f&&(f._prev=null,f._prev&&(f._prev._next=null)));r&&r!==f;){if(1>=r.type&&(a=r.p,p[a]=r.s+r.c,d[a]=r.s,i||(l=new he(r,"s",a,l,r.r),r.c=0),1===r.type))for(s=r.l;--s>0;)u="xn"+s,a=r.p+"_"+u,p[a]=r.data[u],d[a]=r[u],i||(l=new he(r,u,a,l,r.rxp[u]));r=r._next}return{proxy:d,end:p,firstMPT:l,pt:c}},V.CSSPropTween=function(e,t,r,o,s,a,u,l,c,f,d){this.t=e,this.p=t,this.s=r,this.c=o,this.n=u||t,e instanceof me||i.push(this.n),this.r=l,this.type=a||0,c&&(this.pr=c,n=!0),this.b=void 0===f?r:f,this.e=void 0===d?r+o:d,s&&(this._next=s,s._prev=this)}),ge=function(e,t,n,r,o,i){var s=new me(e,t,n,r-n,o,-1,i);return s.b=n,s.e=s.xs0=r,s},ye=s.parseComplex=function(e,t,n,r,o,i,s,a,u,l){n=n||i||"",s=new me(e,t,0,0,s,l?2:1,null,!1,a,n,r),r+="";var c,d,p,h,m,g,b,_,w,T,E,x,C=n.split(", ").join(",").split(" "),P=r.split(", ").join(",").split(" "),M=C.length,R=f!==!1;for((-1!==r.indexOf(",")||-1!==n.indexOf(","))&&(C=C.join(" ").replace(A,", ").split(" "),P=P.join(" ").replace(A,", ").split(" "),M=C.length),M!==P.length&&(C=(i||"").split(" "),M=C.length),s.plugin=u,s.setRatio=l,c=0;M>c;c++)if(h=C[c],m=P[c],_=parseFloat(h),_||0===_)s.appendXtra("",_,ie(m,_),m.replace(v,""),R&&-1!==m.indexOf("px"),!0);else if(o&&("#"===h.charAt(0)||ue[h]||S.test(h)))x=","===m.charAt(m.length-1)?"),":")",h=ce(h),m=ce(m),w=h.length+m.length>6,w&&!F&&0===m[3]?(s["xs"+s.l]+=s.l?" transparent":"transparent",s.e=s.e.split(P[c]).join("transparent")):(F||(w=!1),s.appendXtra(w?"rgba(":"rgb(",h[0],m[0]-h[0],",",!0,!0).appendXtra("",h[1],m[1]-h[1],",",!0).appendXtra("",h[2],m[2]-h[2],w?",":x,!0),w&&(h=4>h.length?1:h[3],s.appendXtra("",h,(4>m.length?1:m[3])-h,x,!1)));else if(g=h.match(y)){if(b=m.match(v),!b||b.length!==g.length)return s;for(p=0,d=0;g.length>d;d++)E=g[d],T=h.indexOf(E,p),s.appendXtra(h.substr(p,T-p),Number(E),ie(b[d],E),"",R&&"px"===h.substr(T+E.length,2),0===d),p=T+E.length;s["xs"+s.l]+=h.substr(p)}else s["xs"+s.l]+=s.l?" "+h:h;if(-1!==r.indexOf("=")&&s.data){for(x=s.xs0+s.data.s,c=1;s.l>c;c++)x+=s["xs"+c]+s.data["xn"+c];s.e=x+s["xs"+c]}return s.l||(s.type=-1,s.xs0=s.e),s.xfirst||s},ve=9;for(l=me.prototype,l.l=l.pr=0;--ve>0;)l["xn"+ve]=0,l["xs"+ve]="";l.xs0="",l._next=l._prev=l.xfirst=l.data=l.plugin=l.setRatio=l.rxp=null,l.appendXtra=function(e,t,n,r,o,i){var s=this,a=s.l;return s["xs"+a]+=i&&a?" "+e:e||"",n||0===a||s.plugin?(s.l++,s.type=s.setRatio?2:1,s["xs"+s.l]=r||"",a>0?(s.data["xn"+a]=t+n,s.rxp["xn"+a]=o,s["xn"+a]=t,s.plugin||(s.xfirst=new me(s,"xn"+a,t,n,s.xfirst||s,0,s.n,o,s.pr),s.xfirst.xs0=0),s):(s.data={s:t+n},s.rxp={},s.s=t,s.c=n,s.r=o,s)):(s["xs"+a]+=t+(r||""),s)};var be=function(e,t){t=t||{},this.p=t.prefix?Y(e)||e:e,u[e]=u[this.p]=this,this.format=t.formatter||de(t.defaultValue,t.color,t.collapsible,t.multi),t.parser&&(this.parse=t.parser),this.clrs=t.color,this.multi=t.multi,this.keyword=t.keyword,this.dflt=t.defaultValue,this.pr=t.priority||0},_e=V._registerComplexSpecialProp=function(e,t,n){"object"!=typeof t&&(t={parser:n});var r,o,i=e.split(","),s=t.defaultValue;for(n=n||[s],r=0;i.length>r;r++)t.prefix=0===r&&t.prefix,t.defaultValue=n[r]||s,o=new be(i[r],t)},we=function(e){if(!u[e]){var t=e.charAt(0).toUpperCase()+e.substr(1)+"Plugin";_e(e,{parser:function(e,n,r,o,i,s,l){var c=a.com.greensock.plugins[t];return c?(c._cssRegister(),u[r].parse(e,n,r,o,i,s,l)):(q("Error: "+t+" js file not loaded."),i)}})}};l=be.prototype,l.parseComplex=function(e,t,n,r,o,i){var s,a,u,l,c,f,d=this.keyword;if(this.multi&&(A.test(n)||A.test(t)?(a=t.replace(A,"|").split("|"),u=n.replace(A,"|").split("|")):d&&(a=[t],u=[n])),u){for(l=u.length>a.length?u.length:a.length,s=0;l>s;s++)t=a[s]=a[s]||this.dflt,n=u[s]=u[s]||this.dflt,d&&(c=t.indexOf(d),f=n.indexOf(d),c!==f&&(-1===f?a[s]=a[s].split(d).join(""):-1===c&&(a[s]+=" "+d)));t=a.join(", "),n=u.join(", ")}return ye(e,this.p,t,n,this.clrs,this.dflt,r,this.pr,o,i)},l.parse=function(e,t,n,r,i,s){return this.parseComplex(e.style,this.format(Q(e,this.p,o,!1,this.dflt)),this.format(t),i,s)},s.registerSpecialProp=function(e,t,n){_e(e,{parser:function(e,r,o,i,s,a){var u=new me(e,o,0,0,s,2,o,!1,n);return u.plugin=a,u.setRatio=t(e,r,i._tween,o),u},priority:n})},s.useSVGTransformAttr=p||h;var Te,Ee="scaleX,scaleY,scaleZ,x,y,z,skewX,skewY,rotation,rotationX,rotationY,perspective,xPercent,yPercent".split(","),xe=Y("transform"),Se=X+"transform",Ce=Y("transformOrigin"),Pe=null!==Y("perspective"),Me=V.Transform=function(){this.perspective=parseFloat(s.defaultTransformPerspective)||0,this.force3D=s.defaultForce3D!==!1&&Pe?s.defaultForce3D||"auto":!1},Re=window.SVGElement,De=function(e,t,n){var r,o=L.createElementNS("http://www.w3.org/2000/svg",e),i=/([a-z])([A-Z])/g;for(r in n)o.setAttributeNS(null,r.replace(i,"$1-$2").toLowerCase(),n[r]);return t.appendChild(o),o},Oe=L.documentElement,Ne=function(){var e,t,n,r=g||/Android/i.test(U)&&!window.chrome;return L.createElementNS&&!r&&(e=De("svg",Oe),t=De("rect",e,{width:100,height:50,x:100}),n=t.getBoundingClientRect().width,t.style[Ce]="50% 50%",t.style[xe]="scaleX(0.5)",r=n===t.getBoundingClientRect().width&&!(h&&Pe),Oe.removeChild(e)),r}(),Ae=function(e,t,n,r,o){var i,a,u,l,c,f,d,p,h,m,g,y,v,b,_=e._gsTransform,w=ke(e,!0);_&&(v=_.xOrigin,b=_.yOrigin),(!r||2>(i=r.split(" ")).length)&&(d=e.getBBox(),t=oe(t).split(" "),i=[(-1!==t[0].indexOf("%")?parseFloat(t[0])/100*d.width:parseFloat(t[0]))+d.x,(-1!==t[1].indexOf("%")?parseFloat(t[1])/100*d.height:parseFloat(t[1]))+d.y]),n.xOrigin=l=parseFloat(i[0]),n.yOrigin=c=parseFloat(i[1]),r&&w!==Be&&(f=w[0],d=w[1],p=w[2],h=w[3],m=w[4],g=w[5],y=f*h-d*p,a=l*(h/y)+c*(-p/y)+(p*g-h*m)/y,u=l*(-d/y)+c*(f/y)-(f*g-d*m)/y,l=n.xOrigin=i[0]=a,c=n.yOrigin=i[1]=u),_&&(o||o!==!1&&s.defaultSmoothOrigin!==!1?(a=l-v,u=c-b,_.xOffset+=a*w[0]+u*w[2]-a,_.yOffset+=a*w[1]+u*w[3]-u):_.xOffset=_.yOffset=0),e.setAttribute("data-svg-origin",i.join(" "))},Ie=function(e){return!!(Re&&"function"==typeof e.getBBox&&e.getCTM&&(!e.parentNode||e.parentNode.getBBox&&e.parentNode.getCTM))},Be=[1,0,0,1,0,0],ke=function(e,t){var n,r,o,i,s,a=e._gsTransform||new Me,u=1e5;if(xe?r=Q(e,Se,null,!0):e.currentStyle&&(r=e.currentStyle.filter.match(O),r=r&&4===r.length?[r[0].substr(4),Number(r[2].substr(4)),Number(r[1].substr(4)),r[3].substr(4),a.x||0,a.y||0].join(","):""),n=!r||"none"===r||"matrix(1, 0, 0, 1, 0, 0)"===r,(a.svg||e.getBBox&&Ie(e))&&(n&&-1!==(e.style[xe]+"").indexOf("matrix")&&(r=e.style[xe],n=0),o=e.getAttribute("transform"),n&&o&&(-1!==o.indexOf("matrix")?(r=o,n=0):-1!==o.indexOf("translate")&&(r="matrix(1,0,0,1,"+o.match(/(?:\-|\b)[\d\-\.e]+\b/gi).join(",")+")",n=0))),n)return Be;for(o=(r||"").match(/(?:\-|\b)[\d\-\.e]+\b/gi)||[],ve=o.length;--ve>-1;)i=Number(o[ve]),o[ve]=(s=i-(i|=0))?(0|s*u+(0>s?-.5:.5))/u+i:i;return t&&o.length>6?[o[0],o[1],o[4],o[5],o[12],o[13]]:o},Le=V.getTransform=function(e,n,r,i){if(e._gsTransform&&r&&!i)return e._gsTransform;var a,u,l,c,f,d,p=r?e._gsTransform||new Me:new Me,h=0>p.scaleX,m=2e-5,g=1e5,y=Pe?parseFloat(Q(e,Ce,n,!1,"0 0 0").split(" ")[2])||p.zOrigin||0:0,v=parseFloat(s.defaultTransformPerspective)||0;if(p.svg=!(!e.getBBox||!Ie(e)),p.svg&&(Ae(e,Q(e,Ce,o,!1,"50% 50%")+"",p,e.getAttribute("data-svg-origin")),Te=s.useSVGTransformAttr||Ne),a=ke(e),a!==Be){if(16===a.length){var b,_,w,T,E,x=a[0],S=a[1],C=a[2],P=a[3],M=a[4],R=a[5],D=a[6],O=a[7],N=a[8],A=a[9],I=a[10],k=a[12],L=a[13],j=a[14],G=a[11],H=Math.atan2(D,I);p.zOrigin&&(j=-p.zOrigin,k=N*j-a[12],L=A*j-a[13],j=I*j+p.zOrigin-a[14]),p.rotationX=H*B,H&&(T=Math.cos(-H),E=Math.sin(-H),
b=M*T+N*E,_=R*T+A*E,w=D*T+I*E,N=M*-E+N*T,A=R*-E+A*T,I=D*-E+I*T,G=O*-E+G*T,M=b,R=_,D=w),H=Math.atan2(N,I),p.rotationY=H*B,H&&(T=Math.cos(-H),E=Math.sin(-H),b=x*T-N*E,_=S*T-A*E,w=C*T-I*E,A=S*E+A*T,I=C*E+I*T,G=P*E+G*T,x=b,S=_,C=w),H=Math.atan2(S,x),p.rotation=H*B,H&&(T=Math.cos(-H),E=Math.sin(-H),x=x*T+M*E,_=S*T+R*E,R=S*-E+R*T,D=C*-E+D*T,S=_),p.rotationX&&Math.abs(p.rotationX)+Math.abs(p.rotation)>359.9&&(p.rotationX=p.rotation=0,p.rotationY+=180),p.scaleX=(0|Math.sqrt(x*x+S*S)*g+.5)/g,p.scaleY=(0|Math.sqrt(R*R+A*A)*g+.5)/g,p.scaleZ=(0|Math.sqrt(D*D+I*I)*g+.5)/g,p.skewX=0,p.perspective=G?1/(0>G?-G:G):0,p.x=k,p.y=L,p.z=j,p.svg&&(p.x-=p.xOrigin-(p.xOrigin*x-p.yOrigin*M),p.y-=p.yOrigin-(p.yOrigin*S-p.xOrigin*R))}else if(!(Pe&&!i&&a.length&&p.x===a[4]&&p.y===a[5]&&(p.rotationX||p.rotationY)||void 0!==p.x&&"none"===Q(e,"display",n))){var V=a.length>=6,U=V?a[0]:1,F=a[1]||0,W=a[2]||0,q=V?a[3]:1;p.x=a[4]||0,p.y=a[5]||0,l=Math.sqrt(U*U+F*F),c=Math.sqrt(q*q+W*W),f=U||F?Math.atan2(F,U)*B:p.rotation||0,d=W||q?Math.atan2(W,q)*B+f:p.skewX||0,Math.abs(d)>90&&270>Math.abs(d)&&(h?(l*=-1,d+=0>=f?180:-180,f+=0>=f?180:-180):(c*=-1,d+=0>=d?180:-180)),p.scaleX=l,p.scaleY=c,p.rotation=f,p.skewX=d,Pe&&(p.rotationX=p.rotationY=p.z=0,p.perspective=v,p.scaleZ=1),p.svg&&(p.x-=p.xOrigin-(p.xOrigin*U+p.yOrigin*W),p.y-=p.yOrigin-(p.xOrigin*F+p.yOrigin*q))}p.zOrigin=y;for(u in p)m>p[u]&&p[u]>-m&&(p[u]=0)}return r&&(e._gsTransform=p,p.svg&&(Te&&e.style[xe]?t.delayedCall(.001,function(){Ve(e.style,xe)}):!Te&&e.getAttribute("transform")&&t.delayedCall(.001,function(){e.removeAttribute("transform")}))),p},je=function(e){var t,n,r=this.data,o=-r.rotation*I,i=o+r.skewX*I,s=1e5,a=(0|Math.cos(o)*r.scaleX*s)/s,u=(0|Math.sin(o)*r.scaleX*s)/s,l=(0|Math.sin(i)*-r.scaleY*s)/s,c=(0|Math.cos(i)*r.scaleY*s)/s,f=this.t.style,d=this.t.currentStyle;if(d){n=u,u=-l,l=-n,t=d.filter,f.filter="";var p,h,m=this.t.offsetWidth,y=this.t.offsetHeight,v="absolute"!==d.position,b="progid:DXImageTransform.Microsoft.Matrix(M11="+a+", M12="+u+", M21="+l+", M22="+c,_=r.x+m*r.xPercent/100,E=r.y+y*r.yPercent/100;if(null!=r.ox&&(p=(r.oxp?.01*m*r.ox:r.ox)-m/2,h=(r.oyp?.01*y*r.oy:r.oy)-y/2,_+=p-(p*a+h*u),E+=h-(p*l+h*c)),v?(p=m/2,h=y/2,b+=", Dx="+(p-(p*a+h*u)+_)+", Dy="+(h-(p*l+h*c)+E)+")"):b+=", sizingMethod='auto expand')",f.filter=-1!==t.indexOf("DXImageTransform.Microsoft.Matrix(")?t.replace(N,b):b+" "+t,(0===e||1===e)&&1===a&&0===u&&0===l&&1===c&&(v&&-1===b.indexOf("Dx=0, Dy=0")||T.test(t)&&100!==parseFloat(RegExp.$1)||-1===t.indexOf(t.indexOf("Alpha"))&&f.removeAttribute("filter")),!v){var x,S,C,P=8>g?1:-1;for(p=r.ieOffsetX||0,h=r.ieOffsetY||0,r.ieOffsetX=Math.round((m-((0>a?-a:a)*m+(0>u?-u:u)*y))/2+_),r.ieOffsetY=Math.round((y-((0>c?-c:c)*y+(0>l?-l:l)*m))/2+E),ve=0;4>ve;ve++)S=ne[ve],x=d[S],n=-1!==x.indexOf("px")?parseFloat(x):$(this.t,S,parseFloat(x),x.replace(w,""))||0,C=n!==r[S]?2>ve?-r.ieOffsetX:-r.ieOffsetY:2>ve?p-r.ieOffsetX:h-r.ieOffsetY,f[S]=(r[S]=Math.round(n-C*(0===ve||2===ve?1:P)))+"px"}}},Ge=V.set3DTransformRatio=V.setTransformRatio=function(e){var t,n,r,o,i,s,a,u,l,c,f,d,p,m,g,y,v,b,_,w,T,E,x,S=this.data,C=this.t.style,P=S.rotation,M=S.rotationX,R=S.rotationY,D=S.scaleX,O=S.scaleY,N=S.scaleZ,A=S.x,B=S.y,k=S.z,L=S.svg,j=S.perspective,G=S.force3D;if(!((1!==e&&0!==e||"auto"!==G||this.tween._totalTime!==this.tween._totalDuration&&this.tween._totalTime)&&G||k||j||R||M)||Te&&L||!Pe)return void(P||S.skewX||L?(P*=I,E=S.skewX*I,x=1e5,t=Math.cos(P)*D,o=Math.sin(P)*D,n=Math.sin(P-E)*-O,i=Math.cos(P-E)*O,E&&"simple"===S.skewType&&(v=Math.tan(E),v=Math.sqrt(1+v*v),n*=v,i*=v,S.skewY&&(t*=v,o*=v)),L&&(A+=S.xOrigin-(S.xOrigin*t+S.yOrigin*n)+S.xOffset,B+=S.yOrigin-(S.xOrigin*o+S.yOrigin*i)+S.yOffset,Te&&(S.xPercent||S.yPercent)&&(m=this.t.getBBox(),A+=.01*S.xPercent*m.width,B+=.01*S.yPercent*m.height),m=1e-6,m>A&&A>-m&&(A=0),m>B&&B>-m&&(B=0)),_=(0|t*x)/x+","+(0|o*x)/x+","+(0|n*x)/x+","+(0|i*x)/x+","+A+","+B+")",L&&Te?this.t.setAttribute("transform","matrix("+_):C[xe]=(S.xPercent||S.yPercent?"translate("+S.xPercent+"%,"+S.yPercent+"%) matrix(":"matrix(")+_):C[xe]=(S.xPercent||S.yPercent?"translate("+S.xPercent+"%,"+S.yPercent+"%) matrix(":"matrix(")+D+",0,0,"+O+","+A+","+B+")");if(h&&(m=1e-4,m>D&&D>-m&&(D=N=2e-5),m>O&&O>-m&&(O=N=2e-5),!j||S.z||S.rotationX||S.rotationY||(j=0)),P||S.skewX)P*=I,g=t=Math.cos(P),y=o=Math.sin(P),S.skewX&&(P-=S.skewX*I,g=Math.cos(P),y=Math.sin(P),"simple"===S.skewType&&(v=Math.tan(S.skewX*I),v=Math.sqrt(1+v*v),g*=v,y*=v,S.skewY&&(t*=v,o*=v))),n=-y,i=g;else{if(!(R||M||1!==N||j||L))return void(C[xe]=(S.xPercent||S.yPercent?"translate("+S.xPercent+"%,"+S.yPercent+"%) translate3d(":"translate3d(")+A+"px,"+B+"px,"+k+"px)"+(1!==D||1!==O?" scale("+D+","+O+")":""));t=i=1,n=o=0}l=1,r=s=a=u=c=f=0,d=j?-1/j:0,p=S.zOrigin,m=1e-6,w=",",T="0",P=R*I,P&&(g=Math.cos(P),y=Math.sin(P),a=-y,c=d*-y,r=t*y,s=o*y,l=g,d*=g,t*=g,o*=g),P=M*I,P&&(g=Math.cos(P),y=Math.sin(P),v=n*g+r*y,b=i*g+s*y,u=l*y,f=d*y,r=n*-y+r*g,s=i*-y+s*g,l*=g,d*=g,n=v,i=b),1!==N&&(r*=N,s*=N,l*=N,d*=N),1!==O&&(n*=O,i*=O,u*=O,f*=O),1!==D&&(t*=D,o*=D,a*=D,c*=D),(p||L)&&(p&&(A+=r*-p,B+=s*-p,k+=l*-p+p),L&&(A+=S.xOrigin-(S.xOrigin*t+S.yOrigin*n)+S.xOffset,B+=S.yOrigin-(S.xOrigin*o+S.yOrigin*i)+S.yOffset),m>A&&A>-m&&(A=T),m>B&&B>-m&&(B=T),m>k&&k>-m&&(k=0)),_=S.xPercent||S.yPercent?"translate("+S.xPercent+"%,"+S.yPercent+"%) matrix3d(":"matrix3d(",_+=(m>t&&t>-m?T:t)+w+(m>o&&o>-m?T:o)+w+(m>a&&a>-m?T:a),_+=w+(m>c&&c>-m?T:c)+w+(m>n&&n>-m?T:n)+w+(m>i&&i>-m?T:i),M||R?(_+=w+(m>u&&u>-m?T:u)+w+(m>f&&f>-m?T:f)+w+(m>r&&r>-m?T:r),_+=w+(m>s&&s>-m?T:s)+w+(m>l&&l>-m?T:l)+w+(m>d&&d>-m?T:d)+w):_+=",0,0,0,0,1,0,",_+=A+w+B+w+k+w+(j?1+-k/j:1)+")",C[xe]=_};l=Me.prototype,l.x=l.y=l.z=l.skewX=l.skewY=l.rotation=l.rotationX=l.rotationY=l.zOrigin=l.xPercent=l.yPercent=l.xOffset=l.yOffset=0,l.scaleX=l.scaleY=l.scaleZ=1,_e("transform,scale,scaleX,scaleY,scaleZ,x,y,z,rotation,rotationX,rotationY,rotationZ,skewX,skewY,shortRotation,shortRotationX,shortRotationY,shortRotationZ,transformOrigin,svgOrigin,transformPerspective,directionalRotation,parseTransform,force3D,skewType,xPercent,yPercent,smoothOrigin",{parser:function(e,t,n,r,i,a,u){if(r._lastParsedTransform===u)return i;r._lastParsedTransform=u;var l,c,f,d,p,h,m,g,y,v=e._gsTransform,b=r._transform=Le(e,o,!0,u.parseTransform),_=e.style,w=1e-6,T=Ee.length,E=u,x={},S="transformOrigin";if("string"==typeof E.transform&&xe)f=G.style,f[xe]=E.transform,f.display="block",f.position="absolute",L.body.appendChild(G),l=Le(G,null,!1),L.body.removeChild(G),null!=E.xPercent&&(l.xPercent=se(E.xPercent,b.xPercent)),null!=E.yPercent&&(l.yPercent=se(E.yPercent,b.yPercent));else if("object"==typeof E){if(l={scaleX:se(null!=E.scaleX?E.scaleX:E.scale,b.scaleX),scaleY:se(null!=E.scaleY?E.scaleY:E.scale,b.scaleY),scaleZ:se(E.scaleZ,b.scaleZ),x:se(E.x,b.x),y:se(E.y,b.y),z:se(E.z,b.z),xPercent:se(E.xPercent,b.xPercent),yPercent:se(E.yPercent,b.yPercent),perspective:se(E.transformPerspective,b.perspective)},m=E.directionalRotation,null!=m)if("object"==typeof m)for(f in m)E[f]=m[f];else E.rotation=m;"string"==typeof E.x&&-1!==E.x.indexOf("%")&&(l.x=0,l.xPercent=se(E.x,b.xPercent)),"string"==typeof E.y&&-1!==E.y.indexOf("%")&&(l.y=0,l.yPercent=se(E.y,b.yPercent)),l.rotation=ae("rotation"in E?E.rotation:"shortRotation"in E?E.shortRotation+"_short":"rotationZ"in E?E.rotationZ:b.rotation,b.rotation,"rotation",x),Pe&&(l.rotationX=ae("rotationX"in E?E.rotationX:"shortRotationX"in E?E.shortRotationX+"_short":b.rotationX||0,b.rotationX,"rotationX",x),l.rotationY=ae("rotationY"in E?E.rotationY:"shortRotationY"in E?E.shortRotationY+"_short":b.rotationY||0,b.rotationY,"rotationY",x)),l.skewX=null==E.skewX?b.skewX:ae(E.skewX,b.skewX),l.skewY=null==E.skewY?b.skewY:ae(E.skewY,b.skewY),(c=l.skewY-b.skewY)&&(l.skewX+=c,l.rotation+=c)}for(Pe&&null!=E.force3D&&(b.force3D=E.force3D,h=!0),b.skewType=E.skewType||b.skewType||s.defaultSkewType,p=b.force3D||b.z||b.rotationX||b.rotationY||l.z||l.rotationX||l.rotationY||l.perspective,p||null==E.scale||(l.scaleZ=1);--T>-1;)n=Ee[T],d=l[n]-b[n],(d>w||-w>d||null!=E[n]||null!=k[n])&&(h=!0,i=new me(b,n,b[n],d,i),n in x&&(i.e=x[n]),i.xs0=0,i.plugin=a,r._overwriteProps.push(i.n));return d=E.transformOrigin,b.svg&&(d||E.svgOrigin)&&(g=b.xOffset,y=b.yOffset,Ae(e,oe(d),l,E.svgOrigin,E.smoothOrigin),i=ge(b,"xOrigin",(v?b:l).xOrigin,l.xOrigin,i,S),i=ge(b,"yOrigin",(v?b:l).yOrigin,l.yOrigin,i,S),(g!==b.xOffset||y!==b.yOffset)&&(i=ge(b,"xOffset",v?g:b.xOffset,b.xOffset,i,S),i=ge(b,"yOffset",v?y:b.yOffset,b.yOffset,i,S)),d=Te?null:"0px 0px"),(d||Pe&&p&&b.zOrigin)&&(xe?(h=!0,n=Ce,d=(d||Q(e,n,o,!1,"50% 50%"))+"",i=new me(_,n,0,0,i,-1,S),i.b=_[n],i.plugin=a,Pe?(f=b.zOrigin,d=d.split(" "),b.zOrigin=(d.length>2&&(0===f||"0px"!==d[2])?parseFloat(d[2]):f)||0,i.xs0=i.e=d[0]+" "+(d[1]||"50%")+" 0px",i=new me(b,"zOrigin",0,0,i,-1,i.n),i.b=f,i.xs0=i.e=b.zOrigin):i.xs0=i.e=d):oe(d+"",b)),h&&(r._transformType=b.svg&&Te||!p&&3!==this._transformType?2:3),i},prefix:!0}),_e("boxShadow",{defaultValue:"0px 0px 0px 0px #999",prefix:!0,color:!0,multi:!0,keyword:"inset"}),_e("borderRadius",{defaultValue:"0px",parser:function(e,t,n,i,s){t=this.format(t);var a,u,l,c,f,d,p,h,m,g,y,v,b,_,w,T,E=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],x=e.style;for(m=parseFloat(e.offsetWidth),g=parseFloat(e.offsetHeight),a=t.split(" "),u=0;E.length>u;u++)this.p.indexOf("border")&&(E[u]=Y(E[u])),f=c=Q(e,E[u],o,!1,"0px"),-1!==f.indexOf(" ")&&(c=f.split(" "),f=c[0],c=c[1]),d=l=a[u],p=parseFloat(f),v=f.substr((p+"").length),b="="===d.charAt(1),b?(h=parseInt(d.charAt(0)+"1",10),d=d.substr(2),h*=parseFloat(d),y=d.substr((h+"").length-(0>h?1:0))||""):(h=parseFloat(d),y=d.substr((h+"").length)),""===y&&(y=r[n]||v),y!==v&&(_=$(e,"borderLeft",p,v),w=$(e,"borderTop",p,v),"%"===y?(f=100*(_/m)+"%",c=100*(w/g)+"%"):"em"===y?(T=$(e,"borderLeft",1,"em"),f=_/T+"em",c=w/T+"em"):(f=_+"px",c=w+"px"),b&&(d=parseFloat(f)+h+y,l=parseFloat(c)+h+y)),s=ye(x,E[u],f+" "+c,d+" "+l,!1,"0px",s);return s},prefix:!0,formatter:de("0px 0px 0px 0px",!1,!0)}),_e("backgroundPosition",{defaultValue:"0 0",parser:function(e,t,n,r,i,s){var a,u,l,c,f,d,p="background-position",h=o||K(e,null),m=this.format((h?g?h.getPropertyValue(p+"-x")+" "+h.getPropertyValue(p+"-y"):h.getPropertyValue(p):e.currentStyle.backgroundPositionX+" "+e.currentStyle.backgroundPositionY)||"0 0"),y=this.format(t);if(-1!==m.indexOf("%")!=(-1!==y.indexOf("%"))&&(d=Q(e,"backgroundImage").replace(M,""),d&&"none"!==d)){for(a=m.split(" "),u=y.split(" "),H.setAttribute("src",d),l=2;--l>-1;)m=a[l],c=-1!==m.indexOf("%"),c!==(-1!==u[l].indexOf("%"))&&(f=0===l?e.offsetWidth-H.width:e.offsetHeight-H.height,a[l]=c?parseFloat(m)/100*f+"px":100*(parseFloat(m)/f)+"%");m=a.join(" ")}return this.parseComplex(e.style,m,y,i,s)},formatter:oe}),_e("backgroundSize",{defaultValue:"0 0",formatter:oe}),_e("perspective",{defaultValue:"0px",prefix:!0}),_e("perspectiveOrigin",{defaultValue:"50% 50%",prefix:!0}),_e("transformStyle",{prefix:!0}),_e("backfaceVisibility",{prefix:!0}),_e("userSelect",{prefix:!0}),_e("margin",{parser:pe("marginTop,marginRight,marginBottom,marginLeft")}),_e("padding",{parser:pe("paddingTop,paddingRight,paddingBottom,paddingLeft")}),_e("clip",{defaultValue:"rect(0px,0px,0px,0px)",parser:function(e,t,n,r,i,s){var a,u,l;return 9>g?(u=e.currentStyle,l=8>g?" ":",",a="rect("+u.clipTop+l+u.clipRight+l+u.clipBottom+l+u.clipLeft+")",t=this.format(t).split(",").join(l)):(a=this.format(Q(e,this.p,o,!1,this.dflt)),t=this.format(t)),this.parseComplex(e.style,a,t,i,s)}}),_e("textShadow",{defaultValue:"0px 0px 0px #999",color:!0,multi:!0}),_e("autoRound,strictUnits",{parser:function(e,t,n,r,o){return o}}),_e("border",{defaultValue:"0px solid #000",parser:function(e,t,n,r,i,s){return this.parseComplex(e.style,this.format(Q(e,"borderTopWidth",o,!1,"0px")+" "+Q(e,"borderTopStyle",o,!1,"solid")+" "+Q(e,"borderTopColor",o,!1,"#000")),this.format(t),i,s)},color:!0,formatter:function(e){var t=e.split(" ");return t[0]+" "+(t[1]||"solid")+" "+(e.match(fe)||["#000"])[0]}}),_e("borderWidth",{parser:pe("borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth")}),_e("float,cssFloat,styleFloat",{parser:function(e,t,n,r,o){var i=e.style,s="cssFloat"in i?"cssFloat":"styleFloat";return new me(i,s,0,0,o,-1,n,!1,0,i[s],t)}});var He=function(e){var t,n=this.t,r=n.filter||Q(this.data,"filter")||"",o=0|this.s+this.c*e;100===o&&(-1===r.indexOf("atrix(")&&-1===r.indexOf("radient(")&&-1===r.indexOf("oader(")?(n.removeAttribute("filter"),t=!Q(this.data,"filter")):(n.filter=r.replace(x,""),t=!0)),t||(this.xn1&&(n.filter=r=r||"alpha(opacity="+o+")"),-1===r.indexOf("pacity")?0===o&&this.xn1||(n.filter=r+" alpha(opacity="+o+")"):n.filter=r.replace(T,"opacity="+o))};_e("opacity,alpha,autoAlpha",{defaultValue:"1",parser:function(e,t,n,r,i,s){var a=parseFloat(Q(e,"opacity",o,!1,"1")),u=e.style,l="autoAlpha"===n;return"string"==typeof t&&"="===t.charAt(1)&&(t=("-"===t.charAt(0)?-1:1)*parseFloat(t.substr(2))+a),l&&1===a&&"hidden"===Q(e,"visibility",o)&&0!==t&&(a=0),F?i=new me(u,"opacity",a,t-a,i):(i=new me(u,"opacity",100*a,100*(t-a),i),i.xn1=l?1:0,u.zoom=1,i.type=2,i.b="alpha(opacity="+i.s+")",i.e="alpha(opacity="+(i.s+i.c)+")",i.data=e,i.plugin=s,i.setRatio=He),l&&(i=new me(u,"visibility",0,0,i,-1,null,!1,0,0!==a?"inherit":"hidden",0===t?"hidden":"inherit"),i.xs0="inherit",r._overwriteProps.push(i.n),r._overwriteProps.push(n)),i}});var Ve=function(e,t){t&&(e.removeProperty?(("ms"===t.substr(0,2)||"webkit"===t.substr(0,6))&&(t="-"+t),e.removeProperty(t.replace(C,"-$1").toLowerCase())):e.removeAttribute(t))},Ue=function(e){if(this.t._gsClassPT=this,1===e||0===e){this.t.setAttribute("class",0===e?this.b:this.e);for(var t=this.data,n=this.t.style;t;)t.v?n[t.p]=t.v:Ve(n,t.p),t=t._next;1===e&&this.t._gsClassPT===this&&(this.t._gsClassPT=null)}else this.t.getAttribute("class")!==this.e&&this.t.setAttribute("class",this.e)};_e("className",{parser:function(e,t,r,i,s,a,u){var l,c,f,d,p,h=e.getAttribute("class")||"",m=e.style.cssText;if(s=i._classNamePT=new me(e,r,0,0,s,2),s.setRatio=Ue,s.pr=-11,n=!0,s.b=h,c=J(e,o),f=e._gsClassPT){for(d={},p=f.data;p;)d[p.p]=1,p=p._next;f.setRatio(1)}return e._gsClassPT=s,s.e="="!==t.charAt(1)?t:h.replace(RegExp("\\s*\\b"+t.substr(2)+"\\b"),"")+("+"===t.charAt(0)?" "+t.substr(2):""),e.setAttribute("class",s.e),l=ee(e,c,J(e),u,d),e.setAttribute("class",h),s.data=l.firstMPT,e.style.cssText=m,s=s.xfirst=i.parse(e,l.difs,s,a)}});var Fe=function(e){if((1===e||0===e)&&this.data._totalTime===this.data._totalDuration&&"isFromStart"!==this.data.data){var t,n,r,o,i,s=this.t.style,a=u.transform.parse;if("all"===this.e)s.cssText="",o=!0;else for(t=this.e.split(" ").join("").split(","),r=t.length;--r>-1;)n=t[r],u[n]&&(u[n].parse===a?o=!0:n="transformOrigin"===n?Ce:u[n].p),Ve(s,n);o&&(Ve(s,xe),i=this.t._gsTransform,i&&(i.svg&&this.t.removeAttribute("data-svg-origin"),delete this.t._gsTransform))}};for(_e("clearProps",{parser:function(e,t,r,o,i){return i=new me(e,r,0,0,i,2),i.setRatio=Fe,i.e=t,i.pr=-10,i.data=o._tween,n=!0,i}}),l="bezier,throwProps,physicsProps,physics2D".split(","),ve=l.length;ve--;)we(l[ve]);l=s.prototype,l._firstPT=l._lastParsedTransform=l._transform=null,l._onInitTween=function(e,t,a){if(!e.nodeType)return!1;this._target=e,this._tween=a,this._vars=t,f=t.autoRound,n=!1,r=t.suffixMap||s.suffixMap,o=K(e,""),i=this._overwriteProps;var l,c,h,g,y,v,b,_,w,T=e.style;if(d&&""===T.zIndex&&(l=Q(e,"zIndex",o),("auto"===l||""===l)&&this._addLazySet(T,"zIndex",0)),"string"==typeof t&&(g=T.cssText,l=J(e,o),T.cssText=g+";"+t,l=ee(e,l,J(e)).difs,!F&&E.test(t)&&(l.opacity=parseFloat(RegExp.$1)),t=l,T.cssText=g),this._firstPT=c=t.className?u.className.parse(e,t.className,"className",this,null,null,t):this.parse(e,t,null),this._transformType){for(w=3===this._transformType,xe?p&&(d=!0,""===T.zIndex&&(b=Q(e,"zIndex",o),("auto"===b||""===b)&&this._addLazySet(T,"zIndex",0)),m&&this._addLazySet(T,"WebkitBackfaceVisibility",this._vars.WebkitBackfaceVisibility||(w?"visible":"hidden"))):T.zoom=1,h=c;h&&h._next;)h=h._next;_=new me(e,"transform",0,0,null,2),this._linkCSSP(_,null,h),_.setRatio=xe?Ge:je,_.data=this._transform||Le(e,o,!0),_.tween=a,_.pr=-1,i.pop()}if(n){for(;c;){for(v=c._next,h=g;h&&h.pr>c.pr;)h=h._next;(c._prev=h?h._prev:y)?c._prev._next=c:g=c,(c._next=h)?h._prev=c:y=c,c=v}this._firstPT=g}return!0},l.parse=function(e,t,n,i){var s,a,l,c,d,p,h,m,g,y,v=e.style;for(s in t)p=t[s],a=u[s],a?n=a.parse(e,p,s,this,n,i,t):(d=Q(e,s,o)+"",g="string"==typeof p,"color"===s||"fill"===s||"stroke"===s||-1!==s.indexOf("Color")||g&&S.test(p)?(g||(p=ce(p),p=(p.length>3?"rgba(":"rgb(")+p.join(",")+")"),n=ye(v,s,d,p,!0,"transparent",n,0,i)):!g||-1===p.indexOf(" ")&&-1===p.indexOf(",")?(l=parseFloat(d),h=l||0===l?d.substr((l+"").length):"",(""===d||"auto"===d)&&("width"===s||"height"===s?(l=re(e,s,o),h="px"):"left"===s||"top"===s?(l=Z(e,s,o),h="px"):(l="opacity"!==s?0:1,h="")),y=g&&"="===p.charAt(1),y?(c=parseInt(p.charAt(0)+"1",10),p=p.substr(2),c*=parseFloat(p),m=p.replace(w,"")):(c=parseFloat(p),m=g?p.replace(w,""):""),""===m&&(m=s in r?r[s]:h),p=c||0===c?(y?c+l:c)+m:t[s],h!==m&&""!==m&&(c||0===c)&&l&&(l=$(e,s,l,h),"%"===m?(l/=$(e,s,100,"%")/100,t.strictUnits!==!0&&(d=l+"%")):"em"===m?l/=$(e,s,1,"em"):"px"!==m&&(c=$(e,s,c,m),m="px"),y&&(c||0===c)&&(p=c+l+m)),y&&(c+=l),!l&&0!==l||!c&&0!==c?void 0!==v[s]&&(p||"NaN"!=p+""&&null!=p)?(n=new me(v,s,c||l||0,0,n,-1,s,!1,0,d,p),n.xs0="none"!==p||"display"!==s&&-1===s.indexOf("Style")?p:d):q("invalid "+s+" tween value: "+t[s]):(n=new me(v,s,l,c-l,n,0,s,f!==!1&&("px"===m||"zIndex"===s),0,d,p),n.xs0=m)):n=ye(v,s,d,p,!0,null,n,0,i)),i&&n&&!n.plugin&&(n.plugin=i);return n},l.setRatio=function(e){var t,n,r,o=this._firstPT,i=1e-6;if(1!==e||this._tween._time!==this._tween._duration&&0!==this._tween._time)if(e||this._tween._time!==this._tween._duration&&0!==this._tween._time||this._tween._rawPrevTime===-1e-6)for(;o;){if(t=o.c*e+o.s,o.r?t=Math.round(t):i>t&&t>-i&&(t=0),o.type)if(1===o.type)if(r=o.l,2===r)o.t[o.p]=o.xs0+t+o.xs1+o.xn1+o.xs2;else if(3===r)o.t[o.p]=o.xs0+t+o.xs1+o.xn1+o.xs2+o.xn2+o.xs3;else if(4===r)o.t[o.p]=o.xs0+t+o.xs1+o.xn1+o.xs2+o.xn2+o.xs3+o.xn3+o.xs4;else if(5===r)o.t[o.p]=o.xs0+t+o.xs1+o.xn1+o.xs2+o.xn2+o.xs3+o.xn3+o.xs4+o.xn4+o.xs5;else{for(n=o.xs0+t+o.xs1,r=1;o.l>r;r++)n+=o["xn"+r]+o["xs"+(r+1)];o.t[o.p]=n}else-1===o.type?o.t[o.p]=o.xs0:o.setRatio&&o.setRatio(e);else o.t[o.p]=t+o.xs0;o=o._next}else for(;o;)2!==o.type?o.t[o.p]=o.b:o.setRatio(e),o=o._next;else for(;o;){if(2!==o.type)if(o.r&&-1!==o.type)if(t=Math.round(o.s+o.c),o.type){if(1===o.type){for(r=o.l,n=o.xs0+t+o.xs1,r=1;o.l>r;r++)n+=o["xn"+r]+o["xs"+(r+1)];o.t[o.p]=n}}else o.t[o.p]=t+o.xs0;else o.t[o.p]=o.e;else o.setRatio(e);o=o._next}},l._enableTransforms=function(e){this._transform=this._transform||Le(this._target,o,!0),this._transformType=this._transform.svg&&Te||!e&&3!==this._transformType?2:3};var We=function(){this.t[this.p]=this.e,this.data._linkCSSP(this,this._next,null,!0)};l._addLazySet=function(e,t,n){var r=this._firstPT=new me(e,t,0,0,this._firstPT,2);r.e=n,r.setRatio=We,r.data=this},l._linkCSSP=function(e,t,n,r){return e&&(t&&(t._prev=e),e._next&&(e._next._prev=e._prev),e._prev?e._prev._next=e._next:this._firstPT===e&&(this._firstPT=e._next,r=!0),n?n._next=e:r||null!==this._firstPT||(this._firstPT=e),e._next=t,e._prev=n),e},l._kill=function(t){var n,r,o,i=t;if(t.autoAlpha||t.alpha){i={};for(r in t)i[r]=t[r];i.opacity=1,i.autoAlpha&&(i.visibility=1)}return t.className&&(n=this._classNamePT)&&(o=n.xfirst,o&&o._prev?this._linkCSSP(o._prev,n._next,o._prev._prev):o===this._firstPT&&(this._firstPT=n._next),n._next&&this._linkCSSP(n._next,n._next._next,o._prev),this._classNamePT=null),e.prototype._kill.call(this,i)};var qe=function(e,t,n){var r,o,i,s;if(e.slice)for(o=e.length;--o>-1;)qe(e[o],t,n);else for(r=e.childNodes,o=r.length;--o>-1;)i=r[o],s=i.type,i.style&&(t.push(J(i)),n&&n.push(i)),1!==s&&9!==s&&11!==s||!i.childNodes.length||qe(i,t,n)};return s.cascadeTo=function(e,n,r){var o,i,s,a,u=t.to(e,n,r),l=[u],c=[],f=[],d=[],p=t._internals.reservedProps;for(e=u._targets||u.target,qe(e,c,d),u.render(n,!0,!0),qe(e,f),u.render(0,!0,!0),u._enabled(!0),o=d.length;--o>-1;)if(i=ee(d[o],c[o],f[o]),i.firstMPT){i=i.difs;for(s in r)p[s]&&(i[s]=r[s]);a={};for(s in i)a[s]=c[o][s];l.push(t.fromTo(d[o],n,a,i))}return l},e.activate([s]),s},!0),function(){var e=c._gsDefine.plugin({propName:"roundProps",priority:-1,API:2,init:function(e,t,n){return this._tween=n,!0}}),t=e.prototype;t._onInitAllProps=function(){for(var e,t,n,r=this._tween,o=r.vars.roundProps instanceof Array?r.vars.roundProps:r.vars.roundProps.split(","),i=o.length,s={},a=r._propLookup.roundProps;--i>-1;)s[o[i]]=1;for(i=o.length;--i>-1;)for(e=o[i],t=r._firstPT;t;)n=t._next,t.pg?t.t._roundProps(s,!0):t.n===e&&(this._add(t.t,e,t.s,t.c),n&&(n._prev=t._prev),t._prev?t._prev._next=n:r._firstPT===t&&(r._firstPT=n),t._next=t._prev=null,r._propLookup[e]=a),t=n;return!1},t._add=function(e,t,n,r){this._addTween(e,t,n,n+r,t,!0),this._overwriteProps.push(t)}}(),function(){var e=/(?:\d|\-|\+|=|#|\.)*/g,t=/[A-Za-z%]/g;c._gsDefine.plugin({propName:"attr",API:2,version:"0.4.0",init:function(n,r){var o,i,s,a,u;if("function"!=typeof n.setAttribute)return!1;this._target=n,this._proxy={},this._start={},this._end={},this._suffix={};for(o in r)this._start[o]=this._proxy[o]=i=n.getAttribute(o)+"",this._end[o]=s=r[o]+"",this._suffix[o]=a=t.test(s)?s.replace(e,""):t.test(i)?i.replace(e,""):"",a&&(u=s.indexOf(a),-1!==u&&(s=s.substr(0,u))),this._addTween(this._proxy,o,parseFloat(i),s,o)||(this._suffix[o]=""),"="===s.charAt(1)&&(this._end[o]=this._firstPT.s+this._firstPT.c+a),this._overwriteProps.push(o);return!0},set:function(e){this._super.setRatio.call(this,e);for(var t,n=this._overwriteProps,r=n.length,o=1===e?this._end:e?this._proxy:this._start,i=o===this._proxy;--r>-1;)t=n[r],this._target.setAttribute(t,o[t]+(i?this._suffix[t]:""))}})}(),c._gsDefine.plugin({propName:"directionalRotation",version:"0.2.1",API:2,init:function(e,t){"object"!=typeof t&&(t={rotation:t}),this.finals={};var n,r,o,i,s,a,u=t.useRadians===!0?2*Math.PI:360,l=1e-6;for(n in t)"useRadians"!==n&&(a=(t[n]+"").split("_"),r=a[0],o=parseFloat("function"!=typeof e[n]?e[n]:e[n.indexOf("set")||"function"!=typeof e["get"+n.substr(3)]?n:"get"+n.substr(3)]()),i=this.finals[n]="string"==typeof r&&"="===r.charAt(1)?o+parseInt(r.charAt(0)+"1",10)*Number(r.substr(2)):Number(r)||0,s=i-o,a.length&&(r=a.join("_"),-1!==r.indexOf("short")&&(s%=u,s!==s%(u/2)&&(s=0>s?s+u:s-u)),-1!==r.indexOf("_cw")&&0>s?s=(s+9999999999*u)%u-(0|s/u)*u:-1!==r.indexOf("ccw")&&s>0&&(s=(s-9999999999*u)%u-(0|s/u)*u)),(s>l||-l>s)&&(this._addTween(e,n,o,o+s,n),this._overwriteProps.push(n)));return!0},set:function(e){var t;if(1!==e)this._super.setRatio.call(this,e);else for(t=this._firstPT;t;)t.f?t.t[t.p](this.finals[t.p]):t.t[t.p]=this.finals[t.p],t=t._next}})._autoCSS=!0,c._gsDefine("easing.Back",["easing.Ease"],function(e){var t,n,r,o=c.GreenSockGlobals||c,i=o.com.greensock,s=2*Math.PI,a=Math.PI/2,u=i._class,l=function(t,n){var r=u("easing."+t,function(){},!0),o=r.prototype=new e;return o.constructor=r,o.getRatio=n,r},f=e.register||function(){},d=function(e,t,n,r){var o=u("easing."+e,{easeOut:new t,easeIn:new n,easeInOut:new r},!0);return f(o,e),o},p=function(e,t,n){this.t=e,this.v=t,n&&(this.next=n,n.prev=this,this.c=n.v-t,this.gap=n.t-e)},h=function(t,n){var r=u("easing."+t,function(e){this._p1=e||0===e?e:1.70158,this._p2=1.525*this._p1},!0),o=r.prototype=new e;return o.constructor=r,o.getRatio=n,o.config=function(e){return new r(e)},r},m=d("Back",h("BackOut",function(e){return(e-=1)*e*((this._p1+1)*e+this._p1)+1}),h("BackIn",function(e){return e*e*((this._p1+1)*e-this._p1)}),h("BackInOut",function(e){return 1>(e*=2)?.5*e*e*((this._p2+1)*e-this._p2):.5*((e-=2)*e*((this._p2+1)*e+this._p2)+2)})),g=u("easing.SlowMo",function(e,t,n){t=t||0===t?t:.7,null==e?e=.7:e>1&&(e=1),this._p=1!==e?t:0,this._p1=(1-e)/2,this._p2=e,this._p3=this._p1+this._p2,this._calcEnd=n===!0},!0),y=g.prototype=new e;return y.constructor=g,y.getRatio=function(e){var t=e+(.5-e)*this._p;return this._p1>e?this._calcEnd?1-(e=1-e/this._p1)*e:t-(e=1-e/this._p1)*e*e*e*t:e>this._p3?this._calcEnd?1-(e=(e-this._p3)/this._p1)*e:t+(e-t)*(e=(e-this._p3)/this._p1)*e*e*e:this._calcEnd?1:t},g.ease=new g(.7,.7),y.config=g.config=function(e,t,n){return new g(e,t,n)},t=u("easing.SteppedEase",function(e){e=e||1,this._p1=1/e,this._p2=e+1},!0),y=t.prototype=new e,y.constructor=t,y.getRatio=function(e){return 0>e?e=0:e>=1&&(e=.999999999),(this._p2*e>>0)*this._p1},y.config=t.config=function(e){return new t(e)},n=u("easing.RoughEase",function(t){t=t||{};for(var n,r,o,i,s,a,u=t.taper||"none",l=[],c=0,f=0|(t.points||20),d=f,h=t.randomize!==!1,m=t.clamp===!0,g=t.template instanceof e?t.template:null,y="number"==typeof t.strength?.4*t.strength:.4;--d>-1;)n=h?Math.random():1/f*d,r=g?g.getRatio(n):n,"none"===u?o=y:"out"===u?(i=1-n,o=i*i*y):"in"===u?o=n*n*y:.5>n?(i=2*n,o=.5*i*i*y):(i=2*(1-n),o=.5*i*i*y),h?r+=Math.random()*o-.5*o:d%2?r+=.5*o:r-=.5*o,m&&(r>1?r=1:0>r&&(r=0)),l[c++]={x:n,y:r};for(l.sort(function(e,t){return e.x-t.x}),a=new p(1,1,null),d=f;--d>-1;)s=l[d],a=new p(s.x,s.y,a);this._prev=new p(0,0,0!==a.t?a:a.next)},!0),y=n.prototype=new e,y.constructor=n,y.getRatio=function(e){var t=this._prev;if(e>t.t){for(;t.next&&e>=t.t;)t=t.next;t=t.prev}else for(;t.prev&&t.t>=e;)t=t.prev;return this._prev=t,t.v+(e-t.t)/t.gap*t.c},y.config=function(e){return new n(e)},n.ease=new n,d("Bounce",l("BounceOut",function(e){return 1/2.75>e?7.5625*e*e:2/2.75>e?7.5625*(e-=1.5/2.75)*e+.75:2.5/2.75>e?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}),l("BounceIn",function(e){return 1/2.75>(e=1-e)?1-7.5625*e*e:2/2.75>e?1-(7.5625*(e-=1.5/2.75)*e+.75):2.5/2.75>e?1-(7.5625*(e-=2.25/2.75)*e+.9375):1-(7.5625*(e-=2.625/2.75)*e+.984375)}),l("BounceInOut",function(e){var t=.5>e;return e=t?1-2*e:2*e-1,e=1/2.75>e?7.5625*e*e:2/2.75>e?7.5625*(e-=1.5/2.75)*e+.75:2.5/2.75>e?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,t?.5*(1-e):.5*e+.5})),d("Circ",l("CircOut",function(e){return Math.sqrt(1-(e-=1)*e)}),l("CircIn",function(e){return-(Math.sqrt(1-e*e)-1)}),l("CircInOut",function(e){return 1>(e*=2)?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)})),r=function(t,n,r){var o=u("easing."+t,function(e,t){this._p1=e>=1?e:1,this._p2=(t||r)/(1>e?e:1),this._p3=this._p2/s*(Math.asin(1/this._p1)||0),this._p2=s/this._p2},!0),i=o.prototype=new e;return i.constructor=o,i.getRatio=n,i.config=function(e,t){return new o(e,t)},o},d("Elastic",r("ElasticOut",function(e){return this._p1*Math.pow(2,-10*e)*Math.sin((e-this._p3)*this._p2)+1},.3),r("ElasticIn",function(e){return-(this._p1*Math.pow(2,10*(e-=1))*Math.sin((e-this._p3)*this._p2))},.3),r("ElasticInOut",function(e){return 1>(e*=2)?-.5*this._p1*Math.pow(2,10*(e-=1))*Math.sin((e-this._p3)*this._p2):.5*this._p1*Math.pow(2,-10*(e-=1))*Math.sin((e-this._p3)*this._p2)+1},.45)),d("Expo",l("ExpoOut",function(e){return 1-Math.pow(2,-10*e)}),l("ExpoIn",function(e){return Math.pow(2,10*(e-1))-.001}),l("ExpoInOut",function(e){return 1>(e*=2)?.5*Math.pow(2,10*(e-1)):.5*(2-Math.pow(2,-10*(e-1)))})),d("Sine",l("SineOut",function(e){return Math.sin(e*a)}),l("SineIn",function(e){return-Math.cos(e*a)+1}),l("SineInOut",function(e){return-.5*(Math.cos(Math.PI*e)-1)})),u("easing.EaseLookup",{find:function(t){return e.map[t]}},!0),f(o.SlowMo,"SlowMo","ease,"),f(n,"RoughEase","ease,"),f(t,"SteppedEase","ease,"),m},!0)}),c._gsDefine&&c._gsQueue.pop()(),function(e,n){"use strict";var r=e.GreenSockGlobals=e.GreenSockGlobals||e;if(!r.TweenLite){var o,i,s,a,u,l=function(e){var t,n=e.split("."),o=r;for(t=0;n.length>t;t++)o[n[t]]=o=o[n[t]]||{};return o},c=l("com.greensock"),f=1e-10,d=function(e){var t,n=[],r=e.length;for(t=0;t!==r;n.push(e[t++]));return n},p=function(){},h=function(){var e=Object.prototype.toString,t=e.call([]);return function(n){return null!=n&&(n instanceof Array||"object"==typeof n&&!!n.push&&e.call(n)===t)}}(),m={},g=function(o,i,s,a){this.sc=m[o]?m[o].sc:[],m[o]=this,this.gsClass=null,this.func=s;var u=[];this.check=function(c){for(var f,d,p,h,y=i.length,v=y;--y>-1;)(f=m[i[y]]||new g(i[y],[])).gsClass?(u[y]=f.gsClass,v--):c&&f.sc.push(this);if(0===v&&s)for(d=("com.greensock."+o).split("."),p=d.pop(),h=l(d.join("."))[p]=this.gsClass=s.apply(s,u),a&&(r[p]=h,"function"==typeof define&&define.amd?define((e.GreenSockAMDPath?e.GreenSockAMDPath+"/":"")+o.split(".").pop(),[],function(){return h}):o===n&&"undefined"!=typeof t&&t.exports&&(t.exports=h)),y=0;this.sc.length>y;y++)this.sc[y].check()},this.check(!0)},y=e._gsDefine=function(e,t,n,r){return new g(e,t,n,r)},v=c._class=function(e,t,n){return t=t||function(){},y(e,[],function(){return t},n),t};y.globals=r;var b=[0,0,1,1],_=[],w=v("easing.Ease",function(e,t,n,r){this._func=e,this._type=n||0,this._power=r||0,this._params=t?b.concat(t):b},!0),T=w.map={},E=w.register=function(e,t,n,r){for(var o,i,s,a,u=t.split(","),l=u.length,f=(n||"easeIn,easeOut,easeInOut").split(",");--l>-1;)for(i=u[l],o=r?v("easing."+i,null,!0):c.easing[i]||{},s=f.length;--s>-1;)a=f[s],T[i+"."+a]=T[a+i]=o[a]=e.getRatio?e:e[a]||new e};for(s=w.prototype,s._calcEnd=!1,s.getRatio=function(e){if(this._func)return this._params[0]=e,this._func.apply(null,this._params);var t=this._type,n=this._power,r=1===t?1-e:2===t?e:.5>e?2*e:2*(1-e);return 1===n?r*=r:2===n?r*=r*r:3===n?r*=r*r*r:4===n&&(r*=r*r*r*r),1===t?1-r:2===t?r:.5>e?r/2:1-r/2},o=["Linear","Quad","Cubic","Quart","Quint,Strong"],i=o.length;--i>-1;)s=o[i]+",Power"+i,E(new w(null,null,1,i),s,"easeOut",!0),E(new w(null,null,2,i),s,"easeIn"+(0===i?",easeNone":"")),E(new w(null,null,3,i),s,"easeInOut");T.linear=c.easing.Linear.easeIn,T.swing=c.easing.Quad.easeInOut;var x=v("events.EventDispatcher",function(e){this._listeners={},this._eventTarget=e||this});s=x.prototype,s.addEventListener=function(e,t,n,r,o){o=o||0;var i,s,l=this._listeners[e],c=0;for(null==l&&(this._listeners[e]=l=[]),s=l.length;--s>-1;)i=l[s],i.c===t&&i.s===n?l.splice(s,1):0===c&&o>i.pr&&(c=s+1);l.splice(c,0,{c:t,s:n,up:r,pr:o}),this!==a||u||a.wake()},s.removeEventListener=function(e,t){var n,r=this._listeners[e];if(r)for(n=r.length;--n>-1;)if(r[n].c===t)return void r.splice(n,1)},s.dispatchEvent=function(e){var t,n,r,o=this._listeners[e];if(o)for(t=o.length,n=this._eventTarget;--t>-1;)r=o[t],r&&(r.up?r.c.call(r.s||n,{type:e,target:n}):r.c.call(r.s||n))};var S=e.requestAnimationFrame,C=e.cancelAnimationFrame,P=Date.now||function(){return(new Date).getTime()},M=P();for(o=["ms","moz","webkit","o"],i=o.length;--i>-1&&!S;)S=e[o[i]+"RequestAnimationFrame"],C=e[o[i]+"CancelAnimationFrame"]||e[o[i]+"CancelRequestAnimationFrame"];v("Ticker",function(e,t){var n,r,o,i,s,l=this,c=P(),d=t!==!1&&S,h=500,m=33,g="tick",y=function(e){var t,a,u=P()-M;u>h&&(c+=u-m),M+=u,l.time=(M-c)/1e3,t=l.time-s,(!n||t>0||e===!0)&&(l.frame++,s+=t+(t>=i?.004:i-t),a=!0),e!==!0&&(o=r(y)),a&&l.dispatchEvent(g)};x.call(l),l.time=l.frame=0,l.tick=function(){y(!0)},l.lagSmoothing=function(e,t){h=e||1/f,m=Math.min(t,h,0)},l.sleep=function(){null!=o&&(d&&C?C(o):clearTimeout(o),r=p,o=null,l===a&&(u=!1))},l.wake=function(){null!==o?l.sleep():l.frame>10&&(M=P()-h+5),r=0===n?p:d&&S?S:function(e){return setTimeout(e,0|1e3*(s-l.time)+1)},l===a&&(u=!0),y(2)},l.fps=function(e){return arguments.length?(n=e,i=1/(n||60),s=this.time+i,void l.wake()):n},l.useRAF=function(e){return arguments.length?(l.sleep(),d=e,void l.fps(n)):d},l.fps(e),setTimeout(function(){d&&5>l.frame&&l.useRAF(!1)},1500)}),s=c.Ticker.prototype=new c.events.EventDispatcher,s.constructor=c.Ticker;var R=v("core.Animation",function(e,t){if(this.vars=t=t||{},this._duration=this._totalDuration=e||0,this._delay=Number(t.delay)||0,this._timeScale=1,this._active=t.immediateRender===!0,this.data=t.data,this._reversed=t.reversed===!0,W){u||a.wake();var n=this.vars.useFrames?F:W;n.add(this,n._time),this.vars.paused&&this.paused(!0)}});a=R.ticker=new c.Ticker,s=R.prototype,s._dirty=s._gc=s._initted=s._paused=!1,s._totalTime=s._time=0,
s._rawPrevTime=-1,s._next=s._last=s._onUpdate=s._timeline=s.timeline=null,s._paused=!1;var D=function(){u&&P()-M>2e3&&a.wake(),setTimeout(D,2e3)};D(),s.play=function(e,t){return null!=e&&this.seek(e,t),this.reversed(!1).paused(!1)},s.pause=function(e,t){return null!=e&&this.seek(e,t),this.paused(!0)},s.resume=function(e,t){return null!=e&&this.seek(e,t),this.paused(!1)},s.seek=function(e,t){return this.totalTime(Number(e),t!==!1)},s.restart=function(e,t){return this.reversed(!1).paused(!1).totalTime(e?-this._delay:0,t!==!1,!0)},s.reverse=function(e,t){return null!=e&&this.seek(e||this.totalDuration(),t),this.reversed(!0).paused(!1)},s.render=function(){},s.invalidate=function(){return this._time=this._totalTime=0,this._initted=this._gc=!1,this._rawPrevTime=-1,(this._gc||!this.timeline)&&this._enabled(!0),this},s.isActive=function(){var e,t=this._timeline,n=this._startTime;return!t||!this._gc&&!this._paused&&t.isActive()&&(e=t.rawTime())>=n&&n+this.totalDuration()/this._timeScale>e},s._enabled=function(e,t){return u||a.wake(),this._gc=!e,this._active=this.isActive(),t!==!0&&(e&&!this.timeline?this._timeline.add(this,this._startTime-this._delay):!e&&this.timeline&&this._timeline._remove(this,!0)),!1},s._kill=function(){return this._enabled(!1,!1)},s.kill=function(e,t){return this._kill(e,t),this},s._uncache=function(e){for(var t=e?this:this.timeline;t;)t._dirty=!0,t=t.timeline;return this},s._swapSelfInParams=function(e){for(var t=e.length,n=e.concat();--t>-1;)"{self}"===e[t]&&(n[t]=this);return n},s._callback=function(e){var t=this.vars;t[e].apply(t[e+"Scope"]||t.callbackScope||this,t[e+"Params"]||_)},s.eventCallback=function(e,t,n,r){if("on"===(e||"").substr(0,2)){var o=this.vars;if(1===arguments.length)return o[e];null==t?delete o[e]:(o[e]=t,o[e+"Params"]=h(n)&&-1!==n.join("").indexOf("{self}")?this._swapSelfInParams(n):n,o[e+"Scope"]=r),"onUpdate"===e&&(this._onUpdate=t)}return this},s.delay=function(e){return arguments.length?(this._timeline.smoothChildTiming&&this.startTime(this._startTime+e-this._delay),this._delay=e,this):this._delay},s.duration=function(e){return arguments.length?(this._duration=this._totalDuration=e,this._uncache(!0),this._timeline.smoothChildTiming&&this._time>0&&this._time<this._duration&&0!==e&&this.totalTime(this._totalTime*(e/this._duration),!0),this):(this._dirty=!1,this._duration)},s.totalDuration=function(e){return this._dirty=!1,arguments.length?this.duration(e):this._totalDuration},s.time=function(e,t){return arguments.length?(this._dirty&&this.totalDuration(),this.totalTime(e>this._duration?this._duration:e,t)):this._time},s.totalTime=function(e,t,n){if(u||a.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(0>e&&!n&&(e+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var r=this._totalDuration,o=this._timeline;if(e>r&&!n&&(e=r),this._startTime=(this._paused?this._pauseTime:o._time)-(this._reversed?r-e:e)/this._timeScale,o._dirty||this._uncache(!1),o._timeline)for(;o._timeline;)o._timeline._time!==(o._startTime+o._totalTime)/o._timeScale&&o.totalTime(o._totalTime,!0),o=o._timeline}this._gc&&this._enabled(!0,!1),(this._totalTime!==e||0===this._duration)&&(this.render(e,t,!1),B.length&&X())}return this},s.progress=s.totalProgress=function(e,t){return arguments.length?this.totalTime(this.duration()*e,t):this._time/this.duration()},s.startTime=function(e){return arguments.length?(e!==this._startTime&&(this._startTime=e,this.timeline&&this.timeline._sortChildren&&this.timeline.add(this,e-this._delay)),this):this._startTime},s.endTime=function(e){return this._startTime+(0!=e?this.totalDuration():this.duration())/this._timeScale},s.timeScale=function(e){if(!arguments.length)return this._timeScale;if(e=e||f,this._timeline&&this._timeline.smoothChildTiming){var t=this._pauseTime,n=t||0===t?t:this._timeline.totalTime();this._startTime=n-(n-this._startTime)*this._timeScale/e}return this._timeScale=e,this._uncache(!1)},s.reversed=function(e){return arguments.length?(e!=this._reversed&&(this._reversed=e,this.totalTime(this._timeline&&!this._timeline.smoothChildTiming?this.totalDuration()-this._totalTime:this._totalTime,!0)),this):this._reversed},s.paused=function(e){if(!arguments.length)return this._paused;var t,n,r=this._timeline;return e!=this._paused&&r&&(u||e||a.wake(),t=r.rawTime(),n=t-this._pauseTime,!e&&r.smoothChildTiming&&(this._startTime+=n,this._uncache(!1)),this._pauseTime=e?t:null,this._paused=e,this._active=this.isActive(),!e&&0!==n&&this._initted&&this.duration()&&this.render(r.smoothChildTiming?this._totalTime:(t-this._startTime)/this._timeScale,!0,!0)),this._gc&&!e&&this._enabled(!0,!1),this};var O=v("core.SimpleTimeline",function(e){R.call(this,0,e),this.autoRemoveChildren=this.smoothChildTiming=!0});s=O.prototype=new R,s.constructor=O,s.kill()._gc=!1,s._first=s._last=s._recent=null,s._sortChildren=!1,s.add=s.insert=function(e,t){var n,r;if(e._startTime=Number(t||0)+e._delay,e._paused&&this!==e._timeline&&(e._pauseTime=e._startTime+(this.rawTime()-e._startTime)/e._timeScale),e.timeline&&e.timeline._remove(e,!0),e.timeline=e._timeline=this,e._gc&&e._enabled(!0,!0),n=this._last,this._sortChildren)for(r=e._startTime;n&&n._startTime>r;)n=n._prev;return n?(e._next=n._next,n._next=e):(e._next=this._first,this._first=e),e._next?e._next._prev=e:this._last=e,e._prev=n,this._recent=e,this._timeline&&this._uncache(!0),this},s._remove=function(e,t){return e.timeline===this&&(t||e._enabled(!1,!0),e._prev?e._prev._next=e._next:this._first===e&&(this._first=e._next),e._next?e._next._prev=e._prev:this._last===e&&(this._last=e._prev),e._next=e._prev=e.timeline=null,e===this._recent&&(this._recent=this._last),this._timeline&&this._uncache(!0)),this},s.render=function(e,t,n){var r,o=this._first;for(this._totalTime=this._time=this._rawPrevTime=e;o;)r=o._next,(o._active||e>=o._startTime&&!o._paused)&&(o._reversed?o.render((o._dirty?o.totalDuration():o._totalDuration)-(e-o._startTime)*o._timeScale,t,n):o.render((e-o._startTime)*o._timeScale,t,n)),o=r},s.rawTime=function(){return u||a.wake(),this._totalTime};var N=v("TweenLite",function(t,n,r){if(R.call(this,n,r),this.render=N.prototype.render,null==t)throw"Cannot tween a null target.";this.target=t="string"!=typeof t?t:N.selector(t)||t;var o,i,s,a=t.jquery||t.length&&t!==e&&t[0]&&(t[0]===e||t[0].nodeType&&t[0].style&&!t.nodeType),u=this.vars.overwrite;if(this._overwrite=u=null==u?U[N.defaultOverwrite]:"number"==typeof u?u>>0:U[u],(a||t instanceof Array||t.push&&h(t))&&"number"!=typeof t[0])for(this._targets=s=d(t),this._propLookup=[],this._siblings=[],o=0;s.length>o;o++)i=s[o],i?"string"!=typeof i?i.length&&i!==e&&i[0]&&(i[0]===e||i[0].nodeType&&i[0].style&&!i.nodeType)?(s.splice(o--,1),this._targets=s=s.concat(d(i))):(this._siblings[o]=z(i,this,!1),1===u&&this._siblings[o].length>1&&K(i,this,null,1,this._siblings[o])):(i=s[o--]=N.selector(i),"string"==typeof i&&s.splice(o+1,1)):s.splice(o--,1);else this._propLookup={},this._siblings=z(t,this,!1),1===u&&this._siblings.length>1&&K(t,this,null,1,this._siblings);(this.vars.immediateRender||0===n&&0===this._delay&&this.vars.immediateRender!==!1)&&(this._time=-f,this.render(-this._delay))},!0),A=function(t){return t&&t.length&&t!==e&&t[0]&&(t[0]===e||t[0].nodeType&&t[0].style&&!t.nodeType)},I=function(e,t){var n,r={};for(n in e)V[n]||n in t&&"transform"!==n&&"x"!==n&&"y"!==n&&"width"!==n&&"height"!==n&&"className"!==n&&"border"!==n||!(!j[n]||j[n]&&j[n]._autoCSS)||(r[n]=e[n],delete e[n]);e.css=r};s=N.prototype=new R,s.constructor=N,s.kill()._gc=!1,s.ratio=0,s._firstPT=s._targets=s._overwrittenProps=s._startAt=null,s._notifyPluginsOfEnabled=s._lazy=!1,N.version="1.17.0",N.defaultEase=s._ease=new w(null,null,1,1),N.defaultOverwrite="auto",N.ticker=a,N.autoSleep=120,N.lagSmoothing=function(e,t){a.lagSmoothing(e,t)},N.selector=e.$||e.jQuery||function(t){var n=e.$||e.jQuery;return n?(N.selector=n,n(t)):"undefined"==typeof document?t:document.querySelectorAll?document.querySelectorAll(t):document.getElementById("#"===t.charAt(0)?t.substr(1):t)};var B=[],k={},L=N._internals={isArray:h,isSelector:A,lazyTweens:B},j=N._plugins={},G=L.tweenLookup={},H=0,V=L.reservedProps={ease:1,delay:1,overwrite:1,onComplete:1,onCompleteParams:1,onCompleteScope:1,useFrames:1,runBackwards:1,startAt:1,onUpdate:1,onUpdateParams:1,onUpdateScope:1,onStart:1,onStartParams:1,onStartScope:1,onReverseComplete:1,onReverseCompleteParams:1,onReverseCompleteScope:1,onRepeat:1,onRepeatParams:1,onRepeatScope:1,easeParams:1,yoyo:1,immediateRender:1,repeat:1,repeatDelay:1,data:1,paused:1,reversed:1,autoCSS:1,lazy:1,onOverwrite:1,callbackScope:1},U={none:0,all:1,auto:2,concurrent:3,allOnStart:4,preexisting:5,"true":1,"false":0},F=R._rootFramesTimeline=new O,W=R._rootTimeline=new O,q=30,X=L.lazyRender=function(){var e,t=B.length;for(k={};--t>-1;)e=B[t],e&&e._lazy!==!1&&(e.render(e._lazy[0],e._lazy[1],!0),e._lazy=!1);B.length=0};W._startTime=a.time,F._startTime=a.frame,W._active=F._active=!0,setTimeout(X,1),R._updateRoot=N.render=function(){var e,t,n;if(B.length&&X(),W.render((a.time-W._startTime)*W._timeScale,!1,!1),F.render((a.frame-F._startTime)*F._timeScale,!1,!1),B.length&&X(),a.frame>=q){q=a.frame+(parseInt(N.autoSleep,10)||120);for(n in G){for(t=G[n].tweens,e=t.length;--e>-1;)t[e]._gc&&t.splice(e,1);0===t.length&&delete G[n]}if(n=W._first,(!n||n._paused)&&N.autoSleep&&!F._first&&1===a._listeners.tick.length){for(;n&&n._paused;)n=n._next;n||a.sleep()}}},a.addEventListener("tick",R._updateRoot);var z=function(e,t,n){var r,o,i=e._gsTweenID;if(G[i||(e._gsTweenID=i="t"+H++)]||(G[i]={target:e,tweens:[]}),t&&(r=G[i].tweens,r[o=r.length]=t,n))for(;--o>-1;)r[o]===t&&r.splice(o,1);return G[i].tweens},Y=function(e,t,n,r){var o,i,s=e.vars.onOverwrite;return s&&(o=s(e,t,n,r)),s=N.onOverwrite,s&&(i=s(e,t,n,r)),o!==!1&&i!==!1},K=function(e,t,n,r,o){var i,s,a,u;if(1===r||r>=4){for(u=o.length,i=0;u>i;i++)if((a=o[i])!==t)a._gc||a._kill(null,e,t)&&(s=!0);else if(5===r)break;return s}var l,c=t._startTime+f,d=[],p=0,h=0===t._duration;for(i=o.length;--i>-1;)(a=o[i])===t||a._gc||a._paused||(a._timeline!==t._timeline?(l=l||Q(t,0,h),0===Q(a,l,h)&&(d[p++]=a)):c>=a._startTime&&a._startTime+a.totalDuration()/a._timeScale>c&&((h||!a._initted)&&2e-10>=c-a._startTime||(d[p++]=a)));for(i=p;--i>-1;)if(a=d[i],2===r&&a._kill(n,e,t)&&(s=!0),2!==r||!a._firstPT&&a._initted){if(2!==r&&!Y(a,t))continue;a._enabled(!1,!1)&&(s=!0)}return s},Q=function(e,t,n){for(var r=e._timeline,o=r._timeScale,i=e._startTime;r._timeline;){if(i+=r._startTime,o*=r._timeScale,r._paused)return-100;r=r._timeline}return i/=o,i>t?i-t:n&&i===t||!e._initted&&2*f>i-t?f:(i+=e.totalDuration()/e._timeScale/o)>t+f?0:i-t-f};s._init=function(){var e,t,n,r,o,i=this.vars,s=this._overwrittenProps,a=this._duration,u=!!i.immediateRender,l=i.ease;if(i.startAt){this._startAt&&(this._startAt.render(-1,!0),this._startAt.kill()),o={};for(r in i.startAt)o[r]=i.startAt[r];if(o.overwrite=!1,o.immediateRender=!0,o.lazy=u&&i.lazy!==!1,o.startAt=o.delay=null,this._startAt=N.to(this.target,0,o),u)if(this._time>0)this._startAt=null;else if(0!==a)return}else if(i.runBackwards&&0!==a)if(this._startAt)this._startAt.render(-1,!0),this._startAt.kill(),this._startAt=null;else{0!==this._time&&(u=!1),n={};for(r in i)V[r]&&"autoCSS"!==r||(n[r]=i[r]);if(n.overwrite=0,n.data="isFromStart",n.lazy=u&&i.lazy!==!1,n.immediateRender=u,this._startAt=N.to(this.target,0,n),u){if(0===this._time)return}else this._startAt._init(),this._startAt._enabled(!1),this.vars.immediateRender&&(this._startAt=null)}if(this._ease=l=l?l instanceof w?l:"function"==typeof l?new w(l,i.easeParams):T[l]||N.defaultEase:N.defaultEase,i.easeParams instanceof Array&&l.config&&(this._ease=l.config.apply(l,i.easeParams)),this._easeType=this._ease._type,this._easePower=this._ease._power,this._firstPT=null,this._targets)for(e=this._targets.length;--e>-1;)this._initProps(this._targets[e],this._propLookup[e]={},this._siblings[e],s?s[e]:null)&&(t=!0);else t=this._initProps(this.target,this._propLookup,this._siblings,s);if(t&&N._onPluginEvent("_onInitAllProps",this),s&&(this._firstPT||"function"!=typeof this.target&&this._enabled(!1,!1)),i.runBackwards)for(n=this._firstPT;n;)n.s+=n.c,n.c=-n.c,n=n._next;this._onUpdate=i.onUpdate,this._initted=!0},s._initProps=function(t,n,r,o){var i,s,a,u,l,c;if(null==t)return!1;k[t._gsTweenID]&&X(),this.vars.css||t.style&&t!==e&&t.nodeType&&j.css&&this.vars.autoCSS!==!1&&I(this.vars,t);for(i in this.vars){if(c=this.vars[i],V[i])c&&(c instanceof Array||c.push&&h(c))&&-1!==c.join("").indexOf("{self}")&&(this.vars[i]=c=this._swapSelfInParams(c,this));else if(j[i]&&(u=new j[i])._onInitTween(t,this.vars[i],this)){for(this._firstPT=l={_next:this._firstPT,t:u,p:"setRatio",s:0,c:1,f:!0,n:i,pg:!0,pr:u._priority},s=u._overwriteProps.length;--s>-1;)n[u._overwriteProps[s]]=this._firstPT;(u._priority||u._onInitAllProps)&&(a=!0),(u._onDisable||u._onEnable)&&(this._notifyPluginsOfEnabled=!0)}else this._firstPT=n[i]=l={_next:this._firstPT,t:t,p:i,f:"function"==typeof t[i],n:i,pg:!1,pr:0},l.s=l.f?t[i.indexOf("set")||"function"!=typeof t["get"+i.substr(3)]?i:"get"+i.substr(3)]():parseFloat(t[i]),l.c="string"==typeof c&&"="===c.charAt(1)?parseInt(c.charAt(0)+"1",10)*Number(c.substr(2)):Number(c)-l.s||0;l&&l._next&&(l._next._prev=l)}return o&&this._kill(o,t)?this._initProps(t,n,r,o):this._overwrite>1&&this._firstPT&&r.length>1&&K(t,this,n,this._overwrite,r)?(this._kill(n,t),this._initProps(t,n,r,o)):(this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration)&&(k[t._gsTweenID]=!0),a)},s.render=function(e,t,n){var r,o,i,s,a=this._time,u=this._duration,l=this._rawPrevTime;if(e>=u)this._totalTime=this._time=u,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1,this._reversed||(r=!0,o="onComplete",n=n||this._timeline.autoRemoveChildren),0===u&&(this._initted||!this.vars.lazy||n)&&(this._startTime===this._timeline._duration&&(e=0),(0===e||0>l||l===f&&"isPause"!==this.data)&&l!==e&&(n=!0,l>f&&(o="onReverseComplete")),this._rawPrevTime=s=!t||e||l===e?e:f);else if(1e-7>e)this._totalTime=this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==a||0===u&&l>0)&&(o="onReverseComplete",r=this._reversed),0>e&&(this._active=!1,0===u&&(this._initted||!this.vars.lazy||n)&&(l>=0&&(l!==f||"isPause"!==this.data)&&(n=!0),this._rawPrevTime=s=!t||e||l===e?e:f)),this._initted||(n=!0);else if(this._totalTime=this._time=e,this._easeType){var c=e/u,d=this._easeType,p=this._easePower;(1===d||3===d&&c>=.5)&&(c=1-c),3===d&&(c*=2),1===p?c*=c:2===p?c*=c*c:3===p?c*=c*c*c:4===p&&(c*=c*c*c*c),this.ratio=1===d?1-c:2===d?c:.5>e/u?c/2:1-c/2}else this.ratio=this._ease.getRatio(e/u);if(this._time!==a||n){if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!n&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=this._totalTime=a,this._rawPrevTime=l,B.push(this),void(this._lazy=[e,t]);this._time&&!r?this.ratio=this._ease.getRatio(this._time/u):r&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(0===this._time?0:1))}for(this._lazy!==!1&&(this._lazy=!1),this._active||!this._paused&&this._time!==a&&e>=0&&(this._active=!0),0===a&&(this._startAt&&(e>=0?this._startAt.render(e,t,n):o||(o="_dummyGS")),this.vars.onStart&&(0!==this._time||0===u)&&(t||this._callback("onStart"))),i=this._firstPT;i;)i.f?i.t[i.p](i.c*this.ratio+i.s):i.t[i.p]=i.c*this.ratio+i.s,i=i._next;this._onUpdate&&(0>e&&this._startAt&&e!==-1e-4&&this._startAt.render(e,t,n),t||(this._time!==a||r)&&this._callback("onUpdate")),o&&(!this._gc||n)&&(0>e&&this._startAt&&!this._onUpdate&&e!==-1e-4&&this._startAt.render(e,t,n),r&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!t&&this.vars[o]&&this._callback(o),0===u&&this._rawPrevTime===f&&s!==f&&(this._rawPrevTime=0))}},s._kill=function(e,t,n){if("all"===e&&(e=null),null==e&&(null==t||t===this.target))return this._lazy=!1,this._enabled(!1,!1);t="string"!=typeof t?t||this._targets||this.target:N.selector(t)||t;var r,o,i,s,a,u,l,c,f,d=n&&this._time&&n._startTime===this._startTime&&this._timeline===n._timeline;if((h(t)||A(t))&&"number"!=typeof t[0])for(r=t.length;--r>-1;)this._kill(e,t[r],n)&&(u=!0);else{if(this._targets){for(r=this._targets.length;--r>-1;)if(t===this._targets[r]){a=this._propLookup[r]||{},this._overwrittenProps=this._overwrittenProps||[],o=this._overwrittenProps[r]=e?this._overwrittenProps[r]||{}:"all";break}}else{if(t!==this.target)return!1;a=this._propLookup,o=this._overwrittenProps=e?this._overwrittenProps||{}:"all"}if(a){if(l=e||a,c=e!==o&&"all"!==o&&e!==a&&("object"!=typeof e||!e._tempKill),n&&(N.onOverwrite||this.vars.onOverwrite)){for(i in l)a[i]&&(f||(f=[]),f.push(i));if((f||!e)&&!Y(this,n,t,f))return!1}for(i in l)(s=a[i])&&(d&&(s.f?s.t[s.p](s.s):s.t[s.p]=s.s,u=!0),s.pg&&s.t._kill(l)&&(u=!0),s.pg&&0!==s.t._overwriteProps.length||(s._prev?s._prev._next=s._next:s===this._firstPT&&(this._firstPT=s._next),s._next&&(s._next._prev=s._prev),s._next=s._prev=null),delete a[i]),c&&(o[i]=1);!this._firstPT&&this._initted&&this._enabled(!1,!1)}}return u},s.invalidate=function(){return this._notifyPluginsOfEnabled&&N._onPluginEvent("_onDisable",this),this._firstPT=this._overwrittenProps=this._startAt=this._onUpdate=null,this._notifyPluginsOfEnabled=this._active=this._lazy=!1,this._propLookup=this._targets?{}:[],R.prototype.invalidate.call(this),this.vars.immediateRender&&(this._time=-f,this.render(-this._delay)),this},s._enabled=function(e,t){if(u||a.wake(),e&&this._gc){var n,r=this._targets;if(r)for(n=r.length;--n>-1;)this._siblings[n]=z(r[n],this,!0);else this._siblings=z(this.target,this,!0)}return R.prototype._enabled.call(this,e,t),this._notifyPluginsOfEnabled&&this._firstPT?N._onPluginEvent(e?"_onEnable":"_onDisable",this):!1},N.to=function(e,t,n){return new N(e,t,n)},N.from=function(e,t,n){return n.runBackwards=!0,n.immediateRender=0!=n.immediateRender,new N(e,t,n)},N.fromTo=function(e,t,n,r){return r.startAt=n,r.immediateRender=0!=r.immediateRender&&0!=n.immediateRender,new N(e,t,r)},N.delayedCall=function(e,t,n,r,o){return new N(t,0,{delay:e,onComplete:t,onCompleteParams:n,callbackScope:r,onReverseComplete:t,onReverseCompleteParams:n,immediateRender:!1,lazy:!1,useFrames:o,overwrite:0})},N.set=function(e,t){return new N(e,0,t)},N.getTweensOf=function(e,t){if(null==e)return[];e="string"!=typeof e?e:N.selector(e)||e;var n,r,o,i;if((h(e)||A(e))&&"number"!=typeof e[0]){for(n=e.length,r=[];--n>-1;)r=r.concat(N.getTweensOf(e[n],t));for(n=r.length;--n>-1;)for(i=r[n],o=n;--o>-1;)i===r[o]&&r.splice(n,1)}else for(r=z(e).concat(),n=r.length;--n>-1;)(r[n]._gc||t&&!r[n].isActive())&&r.splice(n,1);return r},N.killTweensOf=N.killDelayedCallsTo=function(e,t,n){"object"==typeof t&&(n=t,t=!1);for(var r=N.getTweensOf(e,t),o=r.length;--o>-1;)r[o]._kill(n,e)};var $=v("plugins.TweenPlugin",function(e,t){this._overwriteProps=(e||"").split(","),this._propName=this._overwriteProps[0],this._priority=t||0,this._super=$.prototype},!0);if(s=$.prototype,$.version="1.10.1",$.API=2,s._firstPT=null,s._addTween=function(e,t,n,r,o,i){var s,a;return null!=r&&(s="number"==typeof r||"="!==r.charAt(1)?Number(r)-Number(n):parseInt(r.charAt(0)+"1",10)*Number(r.substr(2)))?(this._firstPT=a={_next:this._firstPT,t:e,p:t,s:n,c:s,f:"function"==typeof e[t],n:o||t,r:i},a._next&&(a._next._prev=a),a):void 0},s.setRatio=function(e){for(var t,n=this._firstPT,r=1e-6;n;)t=n.c*e+n.s,n.r?t=Math.round(t):r>t&&t>-r&&(t=0),n.f?n.t[n.p](t):n.t[n.p]=t,n=n._next},s._kill=function(e){var t,n=this._overwriteProps,r=this._firstPT;if(null!=e[this._propName])this._overwriteProps=[];else for(t=n.length;--t>-1;)null!=e[n[t]]&&n.splice(t,1);for(;r;)null!=e[r.n]&&(r._next&&(r._next._prev=r._prev),r._prev?(r._prev._next=r._next,r._prev=null):this._firstPT===r&&(this._firstPT=r._next)),r=r._next;return!1},s._roundProps=function(e,t){for(var n=this._firstPT;n;)(e[this._propName]||null!=n.n&&e[n.n.split(this._propName+"_").join("")])&&(n.r=t),n=n._next},N._onPluginEvent=function(e,t){var n,r,o,i,s,a=t._firstPT;if("_onInitAllProps"===e){for(;a;){for(s=a._next,r=o;r&&r.pr>a.pr;)r=r._next;(a._prev=r?r._prev:i)?a._prev._next=a:o=a,(a._next=r)?r._prev=a:i=a,a=s}a=t._firstPT=o}for(;a;)a.pg&&"function"==typeof a.t[e]&&a.t[e]()&&(n=!0),a=a._next;return n},$.activate=function(e){for(var t=e.length;--t>-1;)e[t].API===$.API&&(j[(new e[t])._propName]=e[t]);return!0},y.plugin=function(e){if(!(e&&e.propName&&e.init&&e.API))throw"illegal plugin definition.";var t,n=e.propName,r=e.priority||0,o=e.overwriteProps,i={init:"_onInitTween",set:"setRatio",kill:"_kill",round:"_roundProps",initAll:"_onInitAllProps"},s=v("plugins."+n.charAt(0).toUpperCase()+n.substr(1)+"Plugin",function(){$.call(this,n,r),this._overwriteProps=o||[]},e.global===!0),a=s.prototype=new $(n);a.constructor=s,s.API=e.API;for(t in i)"function"==typeof e[t]&&(a[i[t]]=e[t]);return s.version=e.version,$.activate([s]),s},o=e._gsQueue){for(i=0;o.length>i;i++)o[i]();for(s in m)m[s].func||e.console.log("GSAP encountered missing dependency: com.greensock."+s)}u=!1}}("undefined"!=typeof t&&t.exports&&"undefined"!=typeof n?n:this||window,"TweenMax")}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/components/gsap/src/minified/TweenMax.min.js","/components/gsap/src/minified")},{_process:43,buffer:3}],hasher:[function(e,t,n){(function(r,o,i,s,a,u,l,c,f){!function(){var r=function(e){var t=function(t){function n(e){return String(e||"").replace(/\W/g,"\\$&")}function r(e){if(!e)return"";var t=new RegExp("^"+n(p.prependHash)+"|"+n(p.appendHash)+"$","g");return e.replace(t,"")}function o(){var e=T.exec(p.getURL()),t=e&&e[1]||"";try{return p.raw?t:decodeURIComponent(t)}catch(n){return t}}function i(){return y?y.contentWindow.frameHash:null}function s(){y=_.createElement("iframe"),y.src="about:blank",y.style.display="none",_.body.appendChild(y)}function a(){if(y&&h!==i()){var e=y.contentWindow.document;e.open(),e.write("<html><head><title>"+_.title+'</title><script type="text/javascript">var frameHash="'+h+'";</script></head><body> </body></html>'),e.close()}}function u(e,t){if(h!==e){var n=h;h=e,P&&(t?y.contentWindow.frameHash=e:a()),p.changed.dispatch(r(e),r(n))}}function l(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent&&e.attachEvent("on"+t,n)}function c(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent&&e.detachEvent("on"+t,n)}function f(e){e=Array.prototype.slice.call(arguments);var t=e.join(p.separator);return t=t?p.prependHash+t.replace(x,"")+p.appendHash:t}function d(e){return e=encodeURI(e),S&&M&&(e=e.replace(/\?/,"%3F")),e}var p,h,m,g,y,v,b=25,_=t.document,w=(t.history,e.Signal),T=/#(.*)$/,E=/(\?.*)|(\#.*)/,x=/^\#/,S=!1,C="onhashchange"in t&&7!==_.documentMode,P=S&&!C,M="file:"===location.protocol;return v=P?function(){var e=o(),t=i();t!==h&&t!==e?p.setHash(r(t)):e!==h&&u(e)}:function(){var e=o();e!==h&&u(e)},p={VERSION:"1.2.0",raw:!1,appendHash:"",prependHash:"/",separator:"/",changed:new w,stopped:new w,initialized:new w,init:function(){g||(h=o(),C?l(t,"hashchange",v):(P&&(y||s(),a()),m=setInterval(v,b)),g=!0,p.initialized.dispatch(r(h)))},stop:function(){g&&(C?c(t,"hashchange",v):(clearInterval(m),m=null),g=!1,p.stopped.dispatch(r(h)))},isActive:function(){return g},getURL:function(){return t.location.href},getBaseURL:function(){return p.getURL().replace(E,"")},setHash:function(e){e=f.apply(null,arguments),e!==h&&(u(e),e===h&&(p.raw||(e=d(e)),t.location.hash="#"+e))},replaceHash:function(e){e=f.apply(null,arguments),e!==h&&(u(e,!0),e===h&&(p.raw||(e=d(e)),t.location.replace("#"+e)))},getHash:function(){return r(h)},getHashAsArray:function(){return p.getHash().split(p.separator)},dispose:function(){p.stop(),p.initialized.dispose(),p.stopped.dispose(),p.changed.dispose(),y=p=t.hasher=null},toString:function(){return'[hasher version="'+p.VERSION+'" hash="'+p.getHash()+'"]'}},p.initialized.memorize=!0,p}(window);return t};"function"==typeof define&&define.amd?define(["signals"],r):"object"==typeof n?t.exports=r(e("signals")):window.hasher=r(window.signals)}()}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/hasher/dist/js/hasher.js","/node_modules/hasher/dist/js")},{_process:43,buffer:3,signals:202}],is:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){var c,f=Object.prototype,d=f.hasOwnProperty,p=f.toString;"function"==typeof Symbol&&(c=Symbol.prototype.valueOf);var h=function(e){return e!==e},m={"boolean":1,number:1,string:1,undefined:1},g=/^([A-Za-z0-9+\/]{4})*([A-Za-z0-9+\/]{4}|[A-Za-z0-9+\/]{3}=|[A-Za-z0-9+\/]{2}==)$/,y=/^[A-Fa-f0-9]+$/,v=t.exports={};v.a=v.type=function(e,t){return typeof e===t},v.defined=function(e){return"undefined"!=typeof e},v.empty=function(e){var t,n=p.call(e);if("[object Array]"===n||"[object Arguments]"===n||"[object String]"===n)return 0===e.length;if("[object Object]"===n){for(t in e)if(d.call(e,t))return!1;return!0}return!e},v.equal=function(e,t){if(e===t)return!0;var n,r=p.call(e);if(r!==p.call(t))return!1;if("[object Object]"===r){for(n in e)if(!(v.equal(e[n],t[n])&&n in t))return!1;for(n in t)if(!(v.equal(e[n],t[n])&&n in e))return!1;return!0}if("[object Array]"===r){if(n=e.length,n!==t.length)return!1;for(;--n;)if(!v.equal(e[n],t[n]))return!1;return!0}return"[object Function]"===r?e.prototype===t.prototype:"[object Date]"===r?e.getTime()===t.getTime():!1},v.hosted=function(e,t){var n=typeof t[e];return"object"===n?!!t[e]:!m[n]},v.instance=v["instanceof"]=function(e,t){return e instanceof t},v.nil=v["null"]=function(e){return null===e},v.undef=v.undefined=function(e){return"undefined"==typeof e},v.args=v.arguments=function(e){var t="[object Arguments]"===p.call(e),n=!v.array(e)&&v.arraylike(e)&&v.object(e)&&v.fn(e.callee);return t||n},v.array=Array.isArray||function(e){return"[object Array]"===p.call(e)},v.args.empty=function(e){return v.args(e)&&0===e.length},v.array.empty=function(e){return v.array(e)&&0===e.length},v.arraylike=function(e){return!!e&&!v.bool(e)&&d.call(e,"length")&&isFinite(e.length)&&v.number(e.length)&&e.length>=0},v.bool=v["boolean"]=function(e){return"[object Boolean]"===p.call(e)},v["false"]=function(e){return v.bool(e)&&Boolean(Number(e))===!1},v["true"]=function(e){return v.bool(e)&&Boolean(Number(e))===!0},v.date=function(e){return"[object Date]"===p.call(e)},v.element=function(e){return void 0!==e&&"undefined"!=typeof HTMLElement&&e instanceof HTMLElement&&1===e.nodeType},v.error=function(e){return"[object Error]"===p.call(e)},v.fn=v["function"]=function(e){var t="undefined"!=typeof window&&e===window.alert;return t||"[object Function]"===p.call(e)},v.number=function(e){return"[object Number]"===p.call(e)},v.infinite=function(e){return e===1/0||e===-(1/0)},v.decimal=function(e){return v.number(e)&&!h(e)&&!v.infinite(e)&&e%1!==0},v.divisibleBy=function(e,t){var n=v.infinite(e),r=v.infinite(t),o=v.number(e)&&!h(e)&&v.number(t)&&!h(t)&&0!==t;return n||r||o&&e%t===0},v.integer=v["int"]=function(e){return v.number(e)&&!h(e)&&e%1===0},v.maximum=function(e,t){if(h(e))throw new TypeError("NaN is not a valid value");if(!v.arraylike(t))throw new TypeError("second argument must be array-like");for(var n=t.length;--n>=0;)if(e<t[n])return!1;return!0},v.minimum=function(e,t){if(h(e))throw new TypeError("NaN is not a valid value");if(!v.arraylike(t))throw new TypeError("second argument must be array-like");for(var n=t.length;--n>=0;)if(e>t[n])return!1;return!0},v.nan=function(e){return!v.number(e)||e!==e},v.even=function(e){return v.infinite(e)||v.number(e)&&e===e&&e%2===0},v.odd=function(e){return v.infinite(e)||v.number(e)&&e===e&&e%2!==0},v.ge=function(e,t){if(h(e)||h(t))throw new TypeError("NaN is not a valid value");return!v.infinite(e)&&!v.infinite(t)&&e>=t},v.gt=function(e,t){if(h(e)||h(t))throw new TypeError("NaN is not a valid value");return!v.infinite(e)&&!v.infinite(t)&&e>t},v.le=function(e,t){if(h(e)||h(t))throw new TypeError("NaN is not a valid value");return!v.infinite(e)&&!v.infinite(t)&&t>=e},v.lt=function(e,t){if(h(e)||h(t))throw new TypeError("NaN is not a valid value");return!v.infinite(e)&&!v.infinite(t)&&t>e},v.within=function(e,t,n){if(h(e)||h(t)||h(n))throw new TypeError("NaN is not a valid value");if(!v.number(e)||!v.number(t)||!v.number(n))throw new TypeError("all arguments must be numbers");var r=v.infinite(e)||v.infinite(t)||v.infinite(n);return r||e>=t&&n>=e},v.object=function(e){return"[object Object]"===p.call(e)},v.hash=function(e){return v.object(e)&&e.constructor===Object&&!e.nodeType&&!e.setInterval},v.regexp=function(e){return"[object RegExp]"===p.call(e)},v.string=function(e){return"[object String]"===p.call(e)},v.base64=function(e){return v.string(e)&&(!e.length||g.test(e))},v.hex=function(e){return v.string(e)&&(!e.length||y.test(e))},v.symbol=function(e){return"function"==typeof Symbol&&"[object Symbol]"===p.call(e)&&"symbol"==typeof c.call(e)}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/is/index.js","/node_modules/is")},{_process:43,buffer:3}],"jquery-mousewheel":[function(e,t,n){(function(e,r,o,i,s,a,u,l,c){!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof n?t.exports=e:e(jQuery)}(function(e){function t(t){var s=t||window.event,a=u.call(arguments,1),l=0,f=0,d=0,p=0,h=0,m=0;if(t=e.event.fix(s),t.type="mousewheel","detail"in s&&(d=-1*s.detail),"wheelDelta"in s&&(d=s.wheelDelta),"wheelDeltaY"in s&&(d=s.wheelDeltaY),"wheelDeltaX"in s&&(f=-1*s.wheelDeltaX),"axis"in s&&s.axis===s.HORIZONTAL_AXIS&&(f=-1*d,d=0),l=0===d?f:d,"deltaY"in s&&(d=-1*s.deltaY,l=d),"deltaX"in s&&(f=s.deltaX,0===d&&(l=-1*f)),0!==d||0!==f){if(1===s.deltaMode){var g=e.data(this,"mousewheel-line-height");l*=g,d*=g,f*=g}else if(2===s.deltaMode){var y=e.data(this,"mousewheel-page-height");l*=y,d*=y,f*=y}if(p=Math.max(Math.abs(d),Math.abs(f)),(!i||i>p)&&(i=p,r(s,p)&&(i/=40)),r(s,p)&&(l/=40,f/=40,d/=40),l=Math[l>=1?"floor":"ceil"](l/i),f=Math[f>=1?"floor":"ceil"](f/i),d=Math[d>=1?"floor":"ceil"](d/i),c.settings.normalizeOffset&&this.getBoundingClientRect){var v=this.getBoundingClientRect();h=t.clientX-v.left,m=t.clientY-v.top}return t.deltaX=f,t.deltaY=d,t.deltaFactor=i,t.offsetX=h,t.offsetY=m,t.deltaMode=0,a.unshift(t,l,f,d),o&&clearTimeout(o),o=setTimeout(n,200),(e.event.dispatch||e.event.handle).apply(this,a)}}function n(){i=null}function r(e,t){return c.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120===0}var o,i,s=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],a="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],u=Array.prototype.slice;if(e.event.fixHooks)for(var l=s.length;l;)e.event.fixHooks[s[--l]]=e.event.mouseHooks;var c=e.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var n=a.length;n;)this.addEventListener(a[--n],t,!1);else this.onmousewheel=t;e.data(this,"mousewheel-line-height",c.getLineHeight(this)),e.data(this,"mousewheel-page-height",c.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var n=a.length;n;)this.removeEventListener(a[--n],t,!1);else this.onmousewheel=null;e.removeData(this,"mousewheel-line-height"),e.removeData(this,"mousewheel-page-height")},getLineHeight:function(t){var n=e(t),r=n["offsetParent"in e.fn?"offsetParent":"parent"]();return r.length||(r=e("body")),parseInt(r.css("fontSize"),10)||parseInt(n.css("fontSize"),10)||16},getPageHeight:function(t){return e(t).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel");
},unmousewheel:function(e){return this.unbind("mousewheel",e)}})})}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/components/jquery-mousewheel/jquery.mousewheel.js","/components/jquery-mousewheel")},{_process:43,buffer:3}],"jquery-touchswipe":[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){!function(n){"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],n):n("undefined"!=typeof t&&t.exports?e("jquery"):jQuery)}(function(e){function t(t){return!t||void 0!==t.allowPageScroll||void 0===t.swipe&&void 0===t.swipeStatus||(t.allowPageScroll=c),void 0!==t.click&&void 0===t.tap&&(t.tap=t.click),t||(t={}),t=e.extend({},e.fn.swipe.defaults,t),this.each(function(){var r=e(this),o=r.data(M);o||(o=new n(this,t),r.data(M,o))})}function n(t,n){function r(t){if(!(le()||e(t.target).closest(n.excludedElements,We).length>0)){var r,o=t.originalEvent?t.originalEvent:t,i=o.touches,s=i?i[0]:o;return qe=w,i?Xe=i.length:n.preventDefaultEvents!==!1&&t.preventDefault(),Ie=0,Be=null,ke=null,Ue=null,Le=0,je=0,Ge=0,He=1,Ve=0,Fe=ge(),ae(),fe(0,s),!i||Xe===n.fingers||n.fingers===b||F()?(Ye=Se(),2==Xe&&(fe(1,i[1]),je=Ge=be(ze[0].start,ze[1].start)),(n.swipeStatus||n.pinchStatus)&&(r=B(o,qe))):r=!1,r===!1?(qe=x,B(o,qe),r):(n.hold&&(et=setTimeout(e.proxy(function(){We.trigger("hold",[o.target]),n.hold&&(r=n.hold.call(We,o,o.target))},this),n.longTapThreshold)),ce(!0),null)}}function R(e){var t=e.originalEvent?e.originalEvent:e;if(qe!==E&&qe!==x&&!ue()){var r,o=t.touches,i=o?o[0]:t,s=de(i);if(Ke=Se(),o&&(Xe=o.length),n.hold&&clearTimeout(et),qe=T,2==Xe&&(0==je?(fe(1,o[1]),je=Ge=be(ze[0].start,ze[1].start)):(de(o[1]),Ge=be(ze[0].end,ze[1].end),Ue=we(ze[0].end,ze[1].end)),He=_e(je,Ge),Ve=Math.abs(je-Ge)),Xe===n.fingers||n.fingers===b||!o||F()){if(Be=xe(s.start,s.end),ke=xe(s.last,s.end),V(e,ke),Ie=Te(s.start,s.end),Le=ve(),he(Be,Ie),r=B(t,qe),!n.triggerOnTouchEnd||n.triggerOnTouchLeave){var a=!0;if(n.triggerOnTouchLeave){var u=Ce(this);a=Pe(s.end,u)}!n.triggerOnTouchEnd&&a?qe=I(T):n.triggerOnTouchLeave&&!a&&(qe=I(E)),(qe==x||qe==E)&&B(t,qe)}}else qe=x,B(t,qe);r===!1&&(qe=x,B(t,qe))}}function D(e){var t=e.originalEvent?e.originalEvent:e,r=t.touches;if(r){if(r.length&&!ue())return se(t),!0;if(r.length&&ue())return!0}return ue()&&(Xe=$e),Ke=Se(),Le=ve(),j()||!L()?(qe=x,B(t,qe)):n.triggerOnTouchEnd||0==n.triggerOnTouchEnd&&qe===T?(n.preventDefaultEvents!==!1&&e.preventDefault(),qe=E,B(t,qe)):!n.triggerOnTouchEnd&&Q()?(qe=E,k(t,qe,h)):qe===T&&(qe=x,B(t,qe)),ce(!1),null}function O(){Xe=0,Ke=0,Ye=0,je=0,Ge=0,He=1,ae(),ce(!1)}function N(e){var t=e.originalEvent?e.originalEvent:e;n.triggerOnTouchLeave&&(qe=I(E),B(t,qe))}function A(){We.unbind(Re,r),We.unbind(Ae,O),We.unbind(De,R),We.unbind(Oe,D),Ne&&We.unbind(Ne,N),ce(!1)}function I(e){var t=e,r=H(),o=L(),i=j();return!r||i?t=x:!o||e!=T||n.triggerOnTouchEnd&&!n.triggerOnTouchLeave?!o&&e==E&&n.triggerOnTouchLeave&&(t=x):t=E,t}function B(e,t){var n,r=e.touches;return(z()||X())&&(n=k(e,t,d)),(W()||F())&&n!==!1&&(n=k(e,t,p)),oe()&&n!==!1?n=k(e,t,m):ie()&&n!==!1?n=k(e,t,g):re()&&n!==!1&&(n=k(e,t,h)),t===x&&(X()&&(n=k(e,t,d)),F()&&(n=k(e,t,p)),O(e)),t===E&&(r?r.length||O(e):O(e)),n}function k(t,r,c){var f;if(c==d){if(We.trigger("swipeStatus",[r,Be||null,Ie||0,Le||0,Xe,ze,ke]),n.swipeStatus&&(f=n.swipeStatus.call(We,t,r,Be||null,Ie||0,Le||0,Xe,ze,ke),f===!1))return!1;if(r==E&&q()){if(clearTimeout(Je),clearTimeout(et),We.trigger("swipe",[Be,Ie,Le,Xe,ze,ke]),n.swipe&&(f=n.swipe.call(We,t,Be,Ie,Le,Xe,ze,ke),f===!1))return!1;switch(Be){case o:We.trigger("swipeLeft",[Be,Ie,Le,Xe,ze,ke]),n.swipeLeft&&(f=n.swipeLeft.call(We,t,Be,Ie,Le,Xe,ze,ke));break;case i:We.trigger("swipeRight",[Be,Ie,Le,Xe,ze,ke]),n.swipeRight&&(f=n.swipeRight.call(We,t,Be,Ie,Le,Xe,ze,ke));break;case s:We.trigger("swipeUp",[Be,Ie,Le,Xe,ze,ke]),n.swipeUp&&(f=n.swipeUp.call(We,t,Be,Ie,Le,Xe,ze,ke));break;case a:We.trigger("swipeDown",[Be,Ie,Le,Xe,ze,ke]),n.swipeDown&&(f=n.swipeDown.call(We,t,Be,Ie,Le,Xe,ze,ke))}}}if(c==p){if(We.trigger("pinchStatus",[r,Ue||null,Ve||0,Le||0,Xe,He,ze]),n.pinchStatus&&(f=n.pinchStatus.call(We,t,r,Ue||null,Ve||0,Le||0,Xe,He,ze),f===!1))return!1;if(r==E&&U())switch(Ue){case u:We.trigger("pinchIn",[Ue||null,Ve||0,Le||0,Xe,He,ze]),n.pinchIn&&(f=n.pinchIn.call(We,t,Ue||null,Ve||0,Le||0,Xe,He,ze));break;case l:We.trigger("pinchOut",[Ue||null,Ve||0,Le||0,Xe,He,ze]),n.pinchOut&&(f=n.pinchOut.call(We,t,Ue||null,Ve||0,Le||0,Xe,He,ze))}}return c==h?(r===x||r===E)&&(clearTimeout(Je),clearTimeout(et),$()&&!ee()?(Ze=Se(),Je=setTimeout(e.proxy(function(){Ze=null,We.trigger("tap",[t.target]),n.tap&&(f=n.tap.call(We,t,t.target))},this),n.doubleTapThreshold)):(Ze=null,We.trigger("tap",[t.target]),n.tap&&(f=n.tap.call(We,t,t.target)))):c==m?(r===x||r===E)&&(clearTimeout(Je),clearTimeout(et),Ze=null,We.trigger("doubletap",[t.target]),n.doubleTap&&(f=n.doubleTap.call(We,t,t.target))):c==g&&(r===x||r===E)&&(clearTimeout(Je),Ze=null,We.trigger("longtap",[t.target]),n.longTap&&(f=n.longTap.call(We,t,t.target))),f}function L(){var e=!0;return null!==n.threshold&&(e=Ie>=n.threshold),e}function j(){var e=!1;return null!==n.cancelThreshold&&null!==Be&&(e=me(Be)-Ie>=n.cancelThreshold),e}function G(){return null!==n.pinchThreshold?Ve>=n.pinchThreshold:!0}function H(){var e;return e=n.maxTimeThreshold&&Le>=n.maxTimeThreshold?!1:!0}function V(e,t){if(n.preventDefaultEvents!==!1)if(n.allowPageScroll===c)e.preventDefault();else{var r=n.allowPageScroll===f;switch(t){case o:(n.swipeLeft&&r||!r&&n.allowPageScroll!=y)&&e.preventDefault();break;case i:(n.swipeRight&&r||!r&&n.allowPageScroll!=y)&&e.preventDefault();break;case s:(n.swipeUp&&r||!r&&n.allowPageScroll!=v)&&e.preventDefault();break;case a:(n.swipeDown&&r||!r&&n.allowPageScroll!=v)&&e.preventDefault()}}}function U(){var e=Y(),t=K(),n=G();return e&&t&&n}function F(){return!!(n.pinchStatus||n.pinchIn||n.pinchOut)}function W(){return!(!U()||!F())}function q(){var e=H(),t=L(),n=Y(),r=K(),o=j(),i=!o&&r&&n&&t&&e;return i}function X(){return!!(n.swipe||n.swipeStatus||n.swipeLeft||n.swipeRight||n.swipeUp||n.swipeDown)}function z(){return!(!q()||!X())}function Y(){return Xe===n.fingers||n.fingers===b||!S}function K(){return 0!==ze[0].end.x}function Q(){return!!n.tap}function $(){return!!n.doubleTap}function Z(){return!!n.longTap}function J(){if(null==Ze)return!1;var e=Se();return $()&&e-Ze<=n.doubleTapThreshold}function ee(){return J()}function te(){return(1===Xe||!S)&&(isNaN(Ie)||Ie<n.threshold)}function ne(){return Le>n.longTapThreshold&&_>Ie}function re(){return!(!te()||!Q())}function oe(){return!(!J()||!$())}function ie(){return!(!ne()||!Z())}function se(e){Qe=Se(),$e=e.touches.length+1}function ae(){Qe=0,$e=0}function ue(){var e=!1;if(Qe){var t=Se()-Qe;t<=n.fingerReleaseThreshold&&(e=!0)}return e}function le(){return!(We.data(M+"_intouch")!==!0)}function ce(e){We&&(e===!0?(We.bind(De,R),We.bind(Oe,D),Ne&&We.bind(Ne,N)):(We.unbind(De,R,!1),We.unbind(Oe,D,!1),Ne&&We.unbind(Ne,N,!1)),We.data(M+"_intouch",e===!0))}function fe(e,t){var n={start:{x:0,y:0},last:{x:0,y:0},end:{x:0,y:0}};return n.start.x=n.last.x=n.end.x=t.pageX||t.clientX,n.start.y=n.last.y=n.end.y=t.pageY||t.clientY,ze[e]=n,n}function de(e){var t=void 0!==e.identifier?e.identifier:0,n=pe(t);return null===n&&(n=fe(t,e)),n.last.x=n.end.x,n.last.y=n.end.y,n.end.x=e.pageX||e.clientX,n.end.y=e.pageY||e.clientY,n}function pe(e){return ze[e]||null}function he(e,t){t=Math.max(t,me(e)),Fe[e].distance=t}function me(e){return Fe[e]?Fe[e].distance:void 0}function ge(){var e={};return e[o]=ye(o),e[i]=ye(i),e[s]=ye(s),e[a]=ye(a),e}function ye(e){return{direction:e,distance:0}}function ve(){return Ke-Ye}function be(e,t){var n=Math.abs(e.x-t.x),r=Math.abs(e.y-t.y);return Math.round(Math.sqrt(n*n+r*r))}function _e(e,t){var n=t/e*1;return n.toFixed(2)}function we(){return 1>He?l:u}function Te(e,t){return Math.round(Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)))}function Ee(e,t){var n=e.x-t.x,r=t.y-e.y,o=Math.atan2(r,n),i=Math.round(180*o/Math.PI);return 0>i&&(i=360-Math.abs(i)),i}function xe(e,t){var n=Ee(e,t);return 45>=n&&n>=0?o:360>=n&&n>=315?o:n>=135&&225>=n?i:n>45&&135>n?a:s}function Se(){var e=new Date;return e.getTime()}function Ce(t){t=e(t);var n=t.offset(),r={left:n.left,right:n.left+t.outerWidth(),top:n.top,bottom:n.top+t.outerHeight()};return r}function Pe(e,t){return e.x>t.left&&e.x<t.right&&e.y>t.top&&e.y<t.bottom}var n=e.extend({},n),Me=S||P||!n.fallbackToMouseEvents,Re=Me?P?C?"MSPointerDown":"pointerdown":"touchstart":"mousedown",De=Me?P?C?"MSPointerMove":"pointermove":"touchmove":"mousemove",Oe=Me?P?C?"MSPointerUp":"pointerup":"touchend":"mouseup",Ne=Me?P?"mouseleave":null:"mouseleave",Ae=P?C?"MSPointerCancel":"pointercancel":"touchcancel",Ie=0,Be=null,ke=null,Le=0,je=0,Ge=0,He=1,Ve=0,Ue=0,Fe=null,We=e(t),qe="start",Xe=0,ze={},Ye=0,Ke=0,Qe=0,$e=0,Ze=0,Je=null,et=null;try{We.bind(Re,r),We.bind(Ae,O)}catch(tt){e.error("events not supported "+Re+","+Ae+" on jQuery.swipe")}this.enable=function(){return We.bind(Re,r),We.bind(Ae,O),We},this.disable=function(){return A(),We},this.destroy=function(){A(),We.data(M,null),We=null},this.option=function(t,r){if("object"==typeof t)n=e.extend(n,t);else if(void 0!==n[t]){if(void 0===r)return n[t];n[t]=r}else{if(!t)return n;e.error("Option "+t+" does not exist on jQuery.swipe.options")}return null}}var r="1.6.15",o="left",i="right",s="up",a="down",u="in",l="out",c="none",f="auto",d="swipe",p="pinch",h="tap",m="doubletap",g="longtap",y="horizontal",v="vertical",b="all",_=10,w="start",T="move",E="end",x="cancel",S="ontouchstart"in window,C=window.navigator.msPointerEnabled&&!window.navigator.pointerEnabled&&!S,P=(window.navigator.pointerEnabled||window.navigator.msPointerEnabled)&&!S,M="TouchSwipe",R={fingers:1,threshold:75,cancelThreshold:null,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,longTapThreshold:500,doubleTapThreshold:200,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,tap:null,doubleTap:null,longTap:null,hold:null,triggerOnTouchEnd:!0,triggerOnTouchLeave:!1,allowPageScroll:"auto",fallbackToMouseEvents:!0,excludedElements:"label, button, input, select, textarea, a, .noSwipe",preventDefaultEvents:!0};e.fn.swipe=function(n){var r=e(this),o=r.data(M);if(o&&"string"==typeof n){if(o[n])return o[n].apply(this,Array.prototype.slice.call(arguments,1));e.error("Method "+n+" does not exist on jQuery.swipe")}else if(o&&"object"==typeof n)o.option.apply(this,arguments);else if(!(o||"object"!=typeof n&&n))return t.apply(this,arguments);return r},e.fn.swipe.version=r,e.fn.swipe.defaults=R,e.fn.swipe.phases={PHASE_START:w,PHASE_MOVE:T,PHASE_END:E,PHASE_CANCEL:x},e.fn.swipe.directions={LEFT:o,RIGHT:i,UP:s,DOWN:a,IN:u,OUT:l},e.fn.swipe.pageScroll={NONE:c,HORIZONTAL:y,VERTICAL:v,AUTO:f},e.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,FOUR:4,FIVE:5,ALL:b}})}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/jquery-touchswipe/jquery.touchSwipe.min.js","/node_modules/jquery-touchswipe")},{_process:43,buffer:3,jquery:"jquery"}],jquery:[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){!function(e,n){"object"==typeof t&&"object"==typeof t.exports?t.exports=e.document?n(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(e)}("undefined"!=typeof window?window:this,function(e,t){function n(e){var t=!!e&&"length"in e&&e.length,n=ie.type(e);return"function"===n||ie.isWindow(e)?!1:"array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e}function r(e,t,n){if(ie.isFunction(t))return ie.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return ie.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(me.test(t))return ie.filter(t,e,n);t=ie.filter(t,e)}return ie.grep(e,function(e){return J.call(t,e)>-1!==n})}function o(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function i(e){var t={};return ie.each(e.match(we)||[],function(e,n){t[n]=!0}),t}function s(){K.removeEventListener("DOMContentLoaded",s),e.removeEventListener("load",s),ie.ready()}function a(){this.expando=ie.expando+a.uid++}function u(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(Me,"-$&").toLowerCase(),n=e.getAttribute(r),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:Pe.test(n)?ie.parseJSON(n):n}catch(o){}Ce.set(e,t,n)}else n=void 0;return n}function l(e,t,n,r){var o,i=1,s=20,a=r?function(){return r.cur()}:function(){return ie.css(e,t,"")},u=a(),l=n&&n[3]||(ie.cssNumber[t]?"":"px"),c=(ie.cssNumber[t]||"px"!==l&&+u)&&De.exec(ie.css(e,t));if(c&&c[3]!==l){l=l||c[3],n=n||[],c=+u||1;do i=i||".5",c/=i,ie.style(e,t,c+l);while(i!==(i=a()/u)&&1!==i&&--s)}return n&&(c=+c||+u||0,o=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=o)),o}function c(e,t){var n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&ie.nodeName(e,t)?ie.merge([e],n):n}function f(e,t){for(var n=0,r=e.length;r>n;n++)Se.set(e[n],"globalEval",!t||Se.get(t[n],"globalEval"))}function d(e,t,n,r,o){for(var i,s,a,u,l,d,p=t.createDocumentFragment(),h=[],m=0,g=e.length;g>m;m++)if(i=e[m],i||0===i)if("object"===ie.type(i))ie.merge(h,i.nodeType?[i]:i);else if(Le.test(i)){for(s=s||p.appendChild(t.createElement("div")),a=(Ie.exec(i)||["",""])[1].toLowerCase(),u=ke[a]||ke._default,s.innerHTML=u[1]+ie.htmlPrefilter(i)+u[2],d=u[0];d--;)s=s.lastChild;ie.merge(h,s.childNodes),s=p.firstChild,s.textContent=""}else h.push(t.createTextNode(i));for(p.textContent="",m=0;i=h[m++];)if(r&&ie.inArray(i,r)>-1)o&&o.push(i);else if(l=ie.contains(i.ownerDocument,i),s=c(p.appendChild(i),"script"),l&&f(s),n)for(d=0;i=s[d++];)Be.test(i.type||"")&&n.push(i);return p}function p(){return!0}function h(){return!1}function m(){try{return K.activeElement}catch(e){}}function g(e,t,n,r,o,i){var s,a;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(a in t)g(e,a,n,r,t[a],i);return e}if(null==r&&null==o?(o=n,r=n=void 0):null==o&&("string"==typeof n?(o=r,r=void 0):(o=r,r=n,n=void 0)),o===!1)o=h;else if(!o)return this;return 1===i&&(s=o,o=function(e){return ie().off(e),s.apply(this,arguments)},o.guid=s.guid||(s.guid=ie.guid++)),e.each(function(){ie.event.add(this,t,o,r,n)})}function y(e,t){return ie.nodeName(e,"table")&&ie.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e:e}function v(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function b(e){var t=We.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function _(e,t){var n,r,o,i,s,a,u,l;if(1===t.nodeType){if(Se.hasData(e)&&(i=Se.access(e),s=Se.set(t,i),l=i.events)){delete s.handle,s.events={};for(o in l)for(n=0,r=l[o].length;r>n;n++)ie.event.add(t,o,l[o][n])}Ce.hasData(e)&&(a=Ce.access(e),u=ie.extend({},a),Ce.set(t,u))}}function w(e,t){var n=t.nodeName.toLowerCase();"input"===n&&Ae.test(e.type)?t.checked=e.checked:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}function T(e,t,n,r){t=$.apply([],t);var o,i,s,a,u,l,f=0,p=e.length,h=p-1,m=t[0],g=ie.isFunction(m);if(g||p>1&&"string"==typeof m&&!re.checkClone&&Fe.test(m))return e.each(function(o){var i=e.eq(o);g&&(t[0]=m.call(this,o,i.html())),T(i,t,n,r)});if(p&&(o=d(t,e[0].ownerDocument,!1,e,r),i=o.firstChild,1===o.childNodes.length&&(o=i),i||r)){for(s=ie.map(c(o,"script"),v),a=s.length;p>f;f++)u=o,f!==h&&(u=ie.clone(u,!0,!0),a&&ie.merge(s,c(u,"script"))),n.call(e[f],u,f);if(a)for(l=s[s.length-1].ownerDocument,ie.map(s,b),f=0;a>f;f++)u=s[f],Be.test(u.type||"")&&!Se.access(u,"globalEval")&&ie.contains(l,u)&&(u.src?ie._evalUrl&&ie._evalUrl(u.src):ie.globalEval(u.textContent.replace(qe,"")))}return e}function E(e,t,n){for(var r,o=t?ie.filter(t,e):e,i=0;null!=(r=o[i]);i++)n||1!==r.nodeType||ie.cleanData(c(r)),r.parentNode&&(n&&ie.contains(r.ownerDocument,r)&&f(c(r,"script")),r.parentNode.removeChild(r));return e}function x(e,t){var n=ie(t.createElement(e)).appendTo(t.body),r=ie.css(n[0],"display");return n.detach(),r}function S(e){var t=K,n=ze[e];return n||(n=x(e,t),"none"!==n&&n||(Xe=(Xe||ie("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement),t=Xe[0].contentDocument,t.write(),t.close(),n=x(e,t),Xe.detach()),ze[e]=n),n}function C(e,t,n){var r,o,i,s,a=e.style;return n=n||Qe(e),n&&(s=n.getPropertyValue(t)||n[t],""!==s||ie.contains(e.ownerDocument,e)||(s=ie.style(e,t)),!re.pixelMarginRight()&&Ke.test(s)&&Ye.test(t)&&(r=a.width,o=a.minWidth,i=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=n.width,a.width=r,a.minWidth=o,a.maxWidth=i)),void 0!==s?s+"":s}function P(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function M(e){if(e in rt)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=nt.length;n--;)if(e=nt[n]+t,e in rt)return e}function R(e,t,n){var r=De.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function D(e,t,n,r,o){for(var i=n===(r?"border":"content")?4:"width"===t?1:0,s=0;4>i;i+=2)"margin"===n&&(s+=ie.css(e,n+Oe[i],!0,o)),r?("content"===n&&(s-=ie.css(e,"padding"+Oe[i],!0,o)),"margin"!==n&&(s-=ie.css(e,"border"+Oe[i]+"Width",!0,o))):(s+=ie.css(e,"padding"+Oe[i],!0,o),"padding"!==n&&(s+=ie.css(e,"border"+Oe[i]+"Width",!0,o)));return s}function O(t,n,r){var o=!0,i="width"===n?t.offsetWidth:t.offsetHeight,s=Qe(t),a="border-box"===ie.css(t,"boxSizing",!1,s);if(K.msFullscreenElement&&e.top!==e&&t.getClientRects().length&&(i=Math.round(100*t.getBoundingClientRect()[n])),0>=i||null==i){if(i=C(t,n,s),(0>i||null==i)&&(i=t.style[n]),Ke.test(i))return i;o=a&&(re.boxSizingReliable()||i===t.style[n]),i=parseFloat(i)||0}return i+D(t,n,r||(a?"border":"content"),o,s)+"px"}function N(e,t){for(var n,r,o,i=[],s=0,a=e.length;a>s;s++)r=e[s],r.style&&(i[s]=Se.get(r,"olddisplay"),n=r.style.display,t?(i[s]||"none"!==n||(r.style.display=""),""===r.style.display&&Ne(r)&&(i[s]=Se.access(r,"olddisplay",S(r.nodeName)))):(o=Ne(r),"none"===n&&o||Se.set(r,"olddisplay",o?n:ie.css(r,"display"))));for(s=0;a>s;s++)r=e[s],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?i[s]||"":"none"));return e}function A(e,t,n,r,o){return new A.prototype.init(e,t,n,r,o)}function I(){return e.setTimeout(function(){ot=void 0}),ot=ie.now()}function B(e,t){var n,r=0,o={height:e};for(t=t?1:0;4>r;r+=2-t)n=Oe[r],o["margin"+n]=o["padding"+n]=e;return t&&(o.opacity=o.width=e),o}function k(e,t,n){for(var r,o=(G.tweeners[t]||[]).concat(G.tweeners["*"]),i=0,s=o.length;s>i;i++)if(r=o[i].call(n,t,e))return r}function L(e,t,n){var r,o,i,s,a,u,l,c,f=this,d={},p=e.style,h=e.nodeType&&Ne(e),m=Se.get(e,"fxshow");n.queue||(a=ie._queueHooks(e,"fx"),null==a.unqueued&&(a.unqueued=0,u=a.empty.fire,a.empty.fire=function(){a.unqueued||u()}),a.unqueued++,f.always(function(){f.always(function(){a.unqueued--,ie.queue(e,"fx").length||a.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],l=ie.css(e,"display"),c="none"===l?Se.get(e,"olddisplay")||S(e.nodeName):l,"inline"===c&&"none"===ie.css(e,"float")&&(p.display="inline-block")),n.overflow&&(p.overflow="hidden",f.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t)if(o=t[r],st.exec(o)){if(delete t[r],i=i||"toggle"===o,o===(h?"hide":"show")){if("show"!==o||!m||void 0===m[r])continue;h=!0}d[r]=m&&m[r]||ie.style(e,r)}else l=void 0;if(ie.isEmptyObject(d))"inline"===("none"===l?S(e.nodeName):l)&&(p.display=l);else{m?"hidden"in m&&(h=m.hidden):m=Se.access(e,"fxshow",{}),i&&(m.hidden=!h),h?ie(e).show():f.done(function(){ie(e).hide()}),f.done(function(){var t;Se.remove(e,"fxshow");for(t in d)ie.style(e,t,d[t])});for(r in d)s=k(h?m[r]:0,r,f),r in m||(m[r]=s.start,h&&(s.end=s.start,s.start="width"===r||"height"===r?1:0))}}function j(e,t){var n,r,o,i,s;for(n in e)if(r=ie.camelCase(n),o=t[r],i=e[n],ie.isArray(i)&&(o=i[1],i=e[n]=i[0]),n!==r&&(e[r]=i,delete e[n]),s=ie.cssHooks[r],s&&"expand"in s){i=s.expand(i),delete e[r];for(n in i)n in e||(e[n]=i[n],t[n]=o)}else t[r]=o}function G(e,t,n){var r,o,i=0,s=G.prefilters.length,a=ie.Deferred().always(function(){delete u.elem}),u=function(){if(o)return!1;for(var t=ot||I(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,i=1-r,s=0,u=l.tweens.length;u>s;s++)l.tweens[s].run(i);return a.notifyWith(e,[l,i,n]),1>i&&u?n:(a.resolveWith(e,[l]),!1)},l=a.promise({elem:e,props:ie.extend({},t),opts:ie.extend(!0,{specialEasing:{},easing:ie.easing._default},n),originalProperties:t,originalOptions:n,startTime:ot||I(),duration:n.duration,tweens:[],createTween:function(t,n){var r=ie.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(o)return this;for(o=!0;r>n;n++)l.tweens[n].run(1);return t?(a.notifyWith(e,[l,1,0]),a.resolveWith(e,[l,t])):a.rejectWith(e,[l,t]),this}}),c=l.props;for(j(c,l.opts.specialEasing);s>i;i++)if(r=G.prefilters[i].call(l,e,c,l.opts))return ie.isFunction(r.stop)&&(ie._queueHooks(l.elem,l.opts.queue).stop=ie.proxy(r.stop,r)),r;return ie.map(c,k,l),ie.isFunction(l.opts.start)&&l.opts.start.call(e,l),ie.fx.timer(ie.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function H(e){return e.getAttribute&&e.getAttribute("class")||""}function V(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,o=0,i=t.toLowerCase().match(we)||[];if(ie.isFunction(n))for(;r=i[o++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function U(e,t,n,r){function o(a){var u;return i[a]=!0,ie.each(e[a]||[],function(e,a){var l=a(t,n,r);return"string"!=typeof l||s||i[l]?s?!(u=l):void 0:(t.dataTypes.unshift(l),o(l),!1)}),u}var i={},s=e===St;return o(t.dataTypes[0])||!i["*"]&&o("*")}function F(e,t){var n,r,o=ie.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((o[n]?e:r||(r={}))[n]=t[n]);return r&&ie.extend(!0,e,r),e}function W(e,t,n){for(var r,o,i,s,a=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(o in a)if(a[o]&&a[o].test(r)){u.unshift(o);break}if(u[0]in n)i=u[0];else{for(o in n){if(!u[0]||e.converters[o+" "+u[0]]){i=o;break}s||(s=o)}i=i||s}return i?(i!==u[0]&&u.unshift(i),n[i]):void 0}function q(e,t,n,r){var o,i,s,a,u,l={},c=e.dataTypes.slice();if(c[1])for(s in e.converters)l[s.toLowerCase()]=e.converters[s];for(i=c.shift();i;)if(e.responseFields[i]&&(n[e.responseFields[i]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=i,i=c.shift())if("*"===i)i=u;else if("*"!==u&&u!==i){if(s=l[u+" "+i]||l["* "+i],!s)for(o in l)if(a=o.split(" "),a[1]===i&&(s=l[u+" "+a[0]]||l["* "+a[0]])){s===!0?s=l[o]:l[o]!==!0&&(i=a[0],c.unshift(a[1]));break}if(s!==!0)if(s&&e["throws"])t=s(t);else try{t=s(t)}catch(f){return{state:"parsererror",error:s?f:"No conversion from "+u+" to "+i}}}return{state:"success",data:t}}function X(e,t,n,r){var o;if(ie.isArray(t))ie.each(t,function(t,o){n||Rt.test(e)?r(e,o):X(e+"["+("object"==typeof o&&null!=o?t:"")+"]",o,n,r)});else if(n||"object"!==ie.type(t))r(e,t);else for(o in t)X(e+"["+o+"]",t[o],n,r)}function z(e){return ie.isWindow(e)?e:9===e.nodeType&&e.defaultView}var Y=[],K=e.document,Q=Y.slice,$=Y.concat,Z=Y.push,J=Y.indexOf,ee={},te=ee.toString,ne=ee.hasOwnProperty,re={},oe="2.2.0",ie=function(e,t){return new ie.fn.init(e,t)},se=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ae=/^-ms-/,ue=/-([\da-z])/gi,le=function(e,t){return t.toUpperCase()};ie.fn=ie.prototype={jquery:oe,constructor:ie,selector:"",length:0,toArray:function(){return Q.call(this)},get:function(e){return null!=e?0>e?this[e+this.length]:this[e]:Q.call(this)},pushStack:function(e){var t=ie.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e){return ie.each(this,e)},map:function(e){return this.pushStack(ie.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(Q.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:Z,sort:Y.sort,splice:Y.splice},ie.extend=ie.fn.extend=function(){var e,t,n,r,o,i,s=arguments[0]||{},a=1,u=arguments.length,l=!1;for("boolean"==typeof s&&(l=s,s=arguments[a]||{},a++),"object"==typeof s||ie.isFunction(s)||(s={}),a===u&&(s=this,a--);u>a;a++)if(null!=(e=arguments[a]))for(t in e)n=s[t],r=e[t],s!==r&&(l&&r&&(ie.isPlainObject(r)||(o=ie.isArray(r)))?(o?(o=!1,i=n&&ie.isArray(n)?n:[]):i=n&&ie.isPlainObject(n)?n:{},s[t]=ie.extend(l,i,r)):void 0!==r&&(s[t]=r));return s},ie.extend({expando:"jQuery"+(oe+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===ie.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){var t=e&&e.toString();return!ie.isArray(e)&&t-parseFloat(t)+1>=0},isPlainObject:function(e){return"object"!==ie.type(e)||e.nodeType||ie.isWindow(e)?!1:e.constructor&&!ne.call(e.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?ee[te.call(e)]||"object":typeof e},globalEval:function(e){var t,n=eval;e=ie.trim(e),e&&(1===e.indexOf("use strict")?(t=K.createElement("script"),t.text=e,K.head.appendChild(t).parentNode.removeChild(t)):n(e))},camelCase:function(e){return e.replace(ae,"ms-").replace(ue,le)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var r,o=0;if(n(e))for(r=e.length;r>o&&t.call(e[o],o,e[o])!==!1;o++);else for(o in e)if(t.call(e[o],o,e[o])===!1)break;return e},trim:function(e){return null==e?"":(e+"").replace(se,"")},makeArray:function(e,t){var r=t||[];return null!=e&&(n(Object(e))?ie.merge(r,"string"==typeof e?[e]:e):Z.call(r,e)),r},inArray:function(e,t,n){return null==t?-1:J.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,o=e.length;n>r;r++)e[o++]=t[r];return e.length=o,e},grep:function(e,t,n){for(var r,o=[],i=0,s=e.length,a=!n;s>i;i++)r=!t(e[i],i),r!==a&&o.push(e[i]);return o},map:function(e,t,r){var o,i,s=0,a=[];if(n(e))for(o=e.length;o>s;s++)i=t(e[s],s,r),null!=i&&a.push(i);else for(s in e)i=t(e[s],s,r),null!=i&&a.push(i);return $.apply([],a)},guid:1,proxy:function(e,t){var n,r,o;return"string"==typeof t&&(n=e[t],t=e,e=n),ie.isFunction(e)?(r=Q.call(arguments,2),o=function(){return e.apply(t||this,r.concat(Q.call(arguments)))},o.guid=e.guid=e.guid||ie.guid++,o):void 0},now:Date.now,support:re}),"function"==typeof Symbol&&(ie.fn[Symbol.iterator]=Y[Symbol.iterator]),ie.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){ee["[object "+t+"]"]=t.toLowerCase()});var ce=function(e){function t(e,t,n,r){var o,i,s,a,u,l,f,p,h=t&&t.ownerDocument,m=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==m&&9!==m&&11!==m)return n;if(!r&&((t?t.ownerDocument||t:H)!==N&&O(t),t=t||N,I)){if(11!==m&&(l=ye.exec(e)))if(o=l[1]){if(9===m){if(!(s=t.getElementById(o)))return n;if(s.id===o)return n.push(s),n}else if(h&&(s=h.getElementById(o))&&j(t,s)&&s.id===o)return n.push(s),n}else{if(l[2])return Z.apply(n,t.getElementsByTagName(e)),n;if((o=l[3])&&w.getElementsByClassName&&t.getElementsByClassName)return Z.apply(n,t.getElementsByClassName(o)),n}if(w.qsa&&!q[e+" "]&&(!B||!B.test(e))){if(1!==m)h=t,p=e;else if("object"!==t.nodeName.toLowerCase()){for((a=t.getAttribute("id"))?a=a.replace(be,"\\$&"):t.setAttribute("id",a=G),f=S(e),i=f.length,u=de.test(a)?"#"+a:"[id='"+a+"']";i--;)f[i]=u+" "+d(f[i]);p=f.join(","),h=ve.test(e)&&c(t.parentNode)||t}if(p)try{return Z.apply(n,h.querySelectorAll(p)),n}catch(g){}finally{a===G&&t.removeAttribute("id")}}}return P(e.replace(ae,"$1"),t,n,r)}function n(){function e(n,r){return t.push(n+" ")>T.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[G]=!0,e}function o(e){var t=N.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function i(e,t){for(var n=e.split("|"),r=n.length;r--;)T.attrHandle[n[r]]=t}function s(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||z)-(~e.sourceIndex||z);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function a(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function u(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function l(e){return r(function(t){return t=+t,r(function(n,r){for(var o,i=e([],n.length,t),s=i.length;s--;)n[o=i[s]]&&(n[o]=!(r[o]=n[o]))})})}function c(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function f(){}function d(e){for(var t=0,n=e.length,r="";n>t;t++)r+=e[t].value;return r}function p(e,t,n){var r=t.dir,o=n&&"parentNode"===r,i=U++;return t.first?function(t,n,i){for(;t=t[r];)if(1===t.nodeType||o)return e(t,n,i)}:function(t,n,s){var a,u,l,c=[V,i];if(s){for(;t=t[r];)if((1===t.nodeType||o)&&e(t,n,s))return!0}else for(;t=t[r];)if(1===t.nodeType||o){if(l=t[G]||(t[G]={}),u=l[t.uniqueID]||(l[t.uniqueID]={}),(a=u[r])&&a[0]===V&&a[1]===i)return c[2]=a[2];if(u[r]=c,c[2]=e(t,n,s))return!0}}}function h(e){return e.length>1?function(t,n,r){for(var o=e.length;o--;)if(!e[o](t,n,r))return!1;return!0}:e[0]}function m(e,n,r){for(var o=0,i=n.length;i>o;o++)t(e,n[o],r);return r}function g(e,t,n,r,o){for(var i,s=[],a=0,u=e.length,l=null!=t;u>a;a++)(i=e[a])&&(!n||n(i,r,o))&&(s.push(i),l&&t.push(a));return s}function y(e,t,n,o,i,s){return o&&!o[G]&&(o=y(o)),i&&!i[G]&&(i=y(i,s)),r(function(r,s,a,u){var l,c,f,d=[],p=[],h=s.length,y=r||m(t||"*",a.nodeType?[a]:a,[]),v=!e||!r&&t?y:g(y,d,e,a,u),b=n?i||(r?e:h||o)?[]:s:v;if(n&&n(v,b,a,u),o)for(l=g(b,p),o(l,[],a,u),c=l.length;c--;)(f=l[c])&&(b[p[c]]=!(v[p[c]]=f));if(r){if(i||e){if(i){for(l=[],c=b.length;c--;)(f=b[c])&&l.push(v[c]=f);i(null,b=[],l,u)}for(c=b.length;c--;)(f=b[c])&&(l=i?ee(r,f):d[c])>-1&&(r[l]=!(s[l]=f))}}else b=g(b===s?b.splice(h,b.length):b),i?i(null,s,b,u):Z.apply(s,b)})}function v(e){for(var t,n,r,o=e.length,i=T.relative[e[0].type],s=i||T.relative[" "],a=i?1:0,u=p(function(e){return e===t},s,!0),l=p(function(e){return ee(t,e)>-1},s,!0),c=[function(e,n,r){var o=!i&&(r||n!==M)||((t=n).nodeType?u(e,n,r):l(e,n,r));return t=null,o}];o>a;a++)if(n=T.relative[e[a].type])c=[p(h(c),n)];else{if(n=T.filter[e[a].type].apply(null,e[a].matches),n[G]){for(r=++a;o>r&&!T.relative[e[r].type];r++);return y(a>1&&h(c),a>1&&d(e.slice(0,a-1).concat({value:" "===e[a-2].type?"*":""})).replace(ae,"$1"),n,r>a&&v(e.slice(a,r)),o>r&&v(e=e.slice(r)),o>r&&d(e))}c.push(n)}return h(c)}function b(e,n){var o=n.length>0,i=e.length>0,s=function(r,s,a,u,l){var c,f,d,p=0,h="0",m=r&&[],y=[],v=M,b=r||i&&T.find.TAG("*",l),_=V+=null==v?1:Math.random()||.1,w=b.length;for(l&&(M=s===N||s||l);h!==w&&null!=(c=b[h]);h++){if(i&&c){for(f=0,s||c.ownerDocument===N||(O(c),a=!I);d=e[f++];)if(d(c,s||N,a)){u.push(c);break}l&&(V=_)}o&&((c=!d&&c)&&p--,r&&m.push(c))}if(p+=h,o&&h!==p){for(f=0;d=n[f++];)d(m,y,s,a);if(r){if(p>0)for(;h--;)m[h]||y[h]||(y[h]=Q.call(u));y=g(y)}Z.apply(u,y),l&&!r&&y.length>0&&p+n.length>1&&t.uniqueSort(u)}return l&&(V=_,M=v),m};return o?r(s):s}var _,w,T,E,x,S,C,P,M,R,D,O,N,A,I,B,k,L,j,G="sizzle"+1*new Date,H=e.document,V=0,U=0,F=n(),W=n(),q=n(),X=function(e,t){return e===t&&(D=!0),0},z=1<<31,Y={}.hasOwnProperty,K=[],Q=K.pop,$=K.push,Z=K.push,J=K.slice,ee=function(e,t){for(var n=0,r=e.length;r>n;n++)if(e[n]===t)return n;
return-1},te="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ne="[\\x20\\t\\r\\n\\f]",re="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",oe="\\["+ne+"*("+re+")(?:"+ne+"*([*^$|!~]?=)"+ne+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+re+"))|)"+ne+"*\\]",ie=":("+re+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+oe+")*)|.*)\\)|)",se=new RegExp(ne+"+","g"),ae=new RegExp("^"+ne+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ne+"+$","g"),ue=new RegExp("^"+ne+"*,"+ne+"*"),le=new RegExp("^"+ne+"*([>+~]|"+ne+")"+ne+"*"),ce=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),fe=new RegExp(ie),de=new RegExp("^"+re+"$"),pe={ID:new RegExp("^#("+re+")"),CLASS:new RegExp("^\\.("+re+")"),TAG:new RegExp("^("+re+"|[*])"),ATTR:new RegExp("^"+oe),PSEUDO:new RegExp("^"+ie),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},he=/^(?:input|select|textarea|button)$/i,me=/^h\d$/i,ge=/^[^{]+\{\s*\[native \w/,ye=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ve=/[+~]/,be=/'|\\/g,_e=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),we=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},Te=function(){O()};try{Z.apply(K=J.call(H.childNodes),H.childNodes),K[H.childNodes.length].nodeType}catch(Ee){Z={apply:K.length?function(e,t){$.apply(e,J.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}w=t.support={},x=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},O=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:H;return r!==N&&9===r.nodeType&&r.documentElement?(N=r,A=N.documentElement,I=!x(N),(n=N.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",Te,!1):n.attachEvent&&n.attachEvent("onunload",Te)),w.attributes=o(function(e){return e.className="i",!e.getAttribute("className")}),w.getElementsByTagName=o(function(e){return e.appendChild(N.createComment("")),!e.getElementsByTagName("*").length}),w.getElementsByClassName=ge.test(N.getElementsByClassName),w.getById=o(function(e){return A.appendChild(e).id=G,!N.getElementsByName||!N.getElementsByName(G).length}),w.getById?(T.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&I){var n=t.getElementById(e);return n?[n]:[]}},T.filter.ID=function(e){var t=e.replace(_e,we);return function(e){return e.getAttribute("id")===t}}):(delete T.find.ID,T.filter.ID=function(e){var t=e.replace(_e,we);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),T.find.TAG=w.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):w.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],o=0,i=t.getElementsByTagName(e);if("*"===e){for(;n=i[o++];)1===n.nodeType&&r.push(n);return r}return i},T.find.CLASS=w.getElementsByClassName&&function(e,t){return"undefined"!=typeof t.getElementsByClassName&&I?t.getElementsByClassName(e):void 0},k=[],B=[],(w.qsa=ge.test(N.querySelectorAll))&&(o(function(e){A.appendChild(e).innerHTML="<a id='"+G+"'></a><select id='"+G+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&B.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||B.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+G+"-]").length||B.push("~="),e.querySelectorAll(":checked").length||B.push(":checked"),e.querySelectorAll("a#"+G+"+*").length||B.push(".#.+[+~]")}),o(function(e){var t=N.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&B.push("name"+ne+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||B.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),B.push(",.*:")})),(w.matchesSelector=ge.test(L=A.matches||A.webkitMatchesSelector||A.mozMatchesSelector||A.oMatchesSelector||A.msMatchesSelector))&&o(function(e){w.disconnectedMatch=L.call(e,"div"),L.call(e,"[s!='']:x"),k.push("!=",ie)}),B=B.length&&new RegExp(B.join("|")),k=k.length&&new RegExp(k.join("|")),t=ge.test(A.compareDocumentPosition),j=t||ge.test(A.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},X=t?function(e,t){if(e===t)return D=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!w.sortDetached&&t.compareDocumentPosition(e)===n?e===N||e.ownerDocument===H&&j(H,e)?-1:t===N||t.ownerDocument===H&&j(H,t)?1:R?ee(R,e)-ee(R,t):0:4&n?-1:1)}:function(e,t){if(e===t)return D=!0,0;var n,r=0,o=e.parentNode,i=t.parentNode,a=[e],u=[t];if(!o||!i)return e===N?-1:t===N?1:o?-1:i?1:R?ee(R,e)-ee(R,t):0;if(o===i)return s(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;a[r]===u[r];)r++;return r?s(a[r],u[r]):a[r]===H?-1:u[r]===H?1:0},N):N},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==N&&O(e),n=n.replace(ce,"='$1']"),w.matchesSelector&&I&&!q[n+" "]&&(!k||!k.test(n))&&(!B||!B.test(n)))try{var r=L.call(e,n);if(r||w.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(o){}return t(n,N,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==N&&O(e),j(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==N&&O(e);var n=T.attrHandle[t.toLowerCase()],r=n&&Y.call(T.attrHandle,t.toLowerCase())?n(e,t,!I):void 0;return void 0!==r?r:w.attributes||!I?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,o=0;if(D=!w.detectDuplicates,R=!w.sortStable&&e.slice(0),e.sort(X),D){for(;t=e[o++];)t===e[o]&&(r=n.push(o));for(;r--;)e.splice(n[r],1)}return R=null,e},E=t.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=E(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=E(t);return n},T=t.selectors={cacheLength:50,createPseudo:r,match:pe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(_e,we),e[3]=(e[3]||e[4]||e[5]||"").replace(_e,we),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return pe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&fe.test(n)&&(t=S(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(_e,we).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=F[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&F(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(o){var i=t.attr(o,e);return null==i?"!="===n:n?(i+="","="===n?i===r:"!="===n?i!==r:"^="===n?r&&0===i.indexOf(r):"*="===n?r&&i.indexOf(r)>-1:"$="===n?r&&i.slice(-r.length)===r:"~="===n?(" "+i.replace(se," ")+" ").indexOf(r)>-1:"|="===n?i===r||i.slice(0,r.length+1)===r+"-":!1):!0}},CHILD:function(e,t,n,r,o){var i="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===r&&0===o?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,d,p,h,m=i!==s?"nextSibling":"previousSibling",g=t.parentNode,y=a&&t.nodeName.toLowerCase(),v=!u&&!a,b=!1;if(g){if(i){for(;m;){for(d=t;d=d[m];)if(a?d.nodeName.toLowerCase()===y:1===d.nodeType)return!1;h=m="only"===e&&!h&&"nextSibling"}return!0}if(h=[s?g.firstChild:g.lastChild],s&&v){for(d=g,f=d[G]||(d[G]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),l=c[e]||[],p=l[0]===V&&l[1],b=p&&l[2],d=p&&g.childNodes[p];d=++p&&d&&d[m]||(b=p=0)||h.pop();)if(1===d.nodeType&&++b&&d===t){c[e]=[V,p,b];break}}else if(v&&(d=t,f=d[G]||(d[G]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),l=c[e]||[],p=l[0]===V&&l[1],b=p),b===!1)for(;(d=++p&&d&&d[m]||(b=p=0)||h.pop())&&((a?d.nodeName.toLowerCase()!==y:1!==d.nodeType)||!++b||(v&&(f=d[G]||(d[G]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),c[e]=[V,b]),d!==t)););return b-=o,b===r||b%r===0&&b/r>=0}}},PSEUDO:function(e,n){var o,i=T.pseudos[e]||T.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return i[G]?i(n):i.length>1?(o=[e,e,"",n],T.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,o=i(e,n),s=o.length;s--;)r=ee(e,o[s]),e[r]=!(t[r]=o[s])}):function(e){return i(e,0,o)}):i}},pseudos:{not:r(function(e){var t=[],n=[],o=C(e.replace(ae,"$1"));return o[G]?r(function(e,t,n,r){for(var i,s=o(e,null,r,[]),a=e.length;a--;)(i=s[a])&&(e[a]=!(t[a]=i))}):function(e,r,i){return t[0]=e,o(t,null,i,n),t[0]=null,!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(_e,we),function(t){return(t.textContent||t.innerText||E(t)).indexOf(e)>-1}}),lang:r(function(e){return de.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(_e,we).toLowerCase(),function(t){var n;do if(n=I?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===A},focus:function(e){return e===N.activeElement&&(!N.hasFocus||N.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!T.pseudos.empty(e)},header:function(e){return me.test(e.nodeName)},input:function(e){return he.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:l(function(){return[0]}),last:l(function(e,t){return[t-1]}),eq:l(function(e,t,n){return[0>n?n+t:n]}),even:l(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:l(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:l(function(e,t,n){for(var r=0>n?n+t:n;--r>=0;)e.push(r);return e}),gt:l(function(e,t,n){for(var r=0>n?n+t:n;++r<t;)e.push(r);return e})}},T.pseudos.nth=T.pseudos.eq;for(_ in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})T.pseudos[_]=a(_);for(_ in{submit:!0,reset:!0})T.pseudos[_]=u(_);return f.prototype=T.filters=T.pseudos,T.setFilters=new f,S=t.tokenize=function(e,n){var r,o,i,s,a,u,l,c=W[e+" "];if(c)return n?0:c.slice(0);for(a=e,u=[],l=T.preFilter;a;){(!r||(o=ue.exec(a)))&&(o&&(a=a.slice(o[0].length)||a),u.push(i=[])),r=!1,(o=le.exec(a))&&(r=o.shift(),i.push({value:r,type:o[0].replace(ae," ")}),a=a.slice(r.length));for(s in T.filter)!(o=pe[s].exec(a))||l[s]&&!(o=l[s](o))||(r=o.shift(),i.push({value:r,type:s,matches:o}),a=a.slice(r.length));if(!r)break}return n?a.length:a?t.error(e):W(e,u).slice(0)},C=t.compile=function(e,t){var n,r=[],o=[],i=q[e+" "];if(!i){for(t||(t=S(e)),n=t.length;n--;)i=v(t[n]),i[G]?r.push(i):o.push(i);i=q(e,b(o,r)),i.selector=e}return i},P=t.select=function(e,t,n,r){var o,i,s,a,u,l="function"==typeof e&&e,f=!r&&S(e=l.selector||e);if(n=n||[],1===f.length){if(i=f[0]=f[0].slice(0),i.length>2&&"ID"===(s=i[0]).type&&w.getById&&9===t.nodeType&&I&&T.relative[i[1].type]){if(t=(T.find.ID(s.matches[0].replace(_e,we),t)||[])[0],!t)return n;l&&(t=t.parentNode),e=e.slice(i.shift().value.length)}for(o=pe.needsContext.test(e)?0:i.length;o--&&(s=i[o],!T.relative[a=s.type]);)if((u=T.find[a])&&(r=u(s.matches[0].replace(_e,we),ve.test(i[0].type)&&c(t.parentNode)||t))){if(i.splice(o,1),e=r.length&&d(i),!e)return Z.apply(n,r),n;break}}return(l||C(e,f))(r,t,!I,n,!t||ve.test(e)&&c(t.parentNode)||t),n},w.sortStable=G.split("").sort(X).join("")===G,w.detectDuplicates=!!D,O(),w.sortDetached=o(function(e){return 1&e.compareDocumentPosition(N.createElement("div"))}),o(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||i("type|href|height|width",function(e,t,n){return n?void 0:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),w.attributes&&o(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||i("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?void 0:e.defaultValue}),o(function(e){return null==e.getAttribute("disabled")})||i(te,function(e,t,n){var r;return n?void 0:e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(e);ie.find=ce,ie.expr=ce.selectors,ie.expr[":"]=ie.expr.pseudos,ie.uniqueSort=ie.unique=ce.uniqueSort,ie.text=ce.getText,ie.isXMLDoc=ce.isXML,ie.contains=ce.contains;var fe=function(e,t,n){for(var r=[],o=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(o&&ie(e).is(n))break;r.push(e)}return r},de=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},pe=ie.expr.match.needsContext,he=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,me=/^.[^:#\[\.,]*$/;ie.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?ie.find.matchesSelector(r,e)?[r]:[]:ie.find.matches(e,ie.grep(t,function(e){return 1===e.nodeType}))},ie.fn.extend({find:function(e){var t,n=this.length,r=[],o=this;if("string"!=typeof e)return this.pushStack(ie(e).filter(function(){for(t=0;n>t;t++)if(ie.contains(o[t],this))return!0}));for(t=0;n>t;t++)ie.find(e,o[t],r);return r=this.pushStack(n>1?ie.unique(r):r),r.selector=this.selector?this.selector+" "+e:e,r},filter:function(e){return this.pushStack(r(this,e||[],!1))},not:function(e){return this.pushStack(r(this,e||[],!0))},is:function(e){return!!r(this,"string"==typeof e&&pe.test(e)?ie(e):e||[],!1).length}});var ge,ye=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,ve=ie.fn.init=function(e,t,n){var r,o;if(!e)return this;if(n=n||ge,"string"==typeof e){if(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:ye.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof ie?t[0]:t,ie.merge(this,ie.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:K,!0)),he.test(r[1])&&ie.isPlainObject(t))for(r in t)ie.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return o=K.getElementById(r[2]),o&&o.parentNode&&(this.length=1,this[0]=o),this.context=K,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):ie.isFunction(e)?void 0!==n.ready?n.ready(e):e(ie):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),ie.makeArray(e,this))};ve.prototype=ie.fn,ge=ie(K);var be=/^(?:parents|prev(?:Until|All))/,_e={children:!0,contents:!0,next:!0,prev:!0};ie.fn.extend({has:function(e){var t=ie(e,this),n=t.length;return this.filter(function(){for(var e=0;n>e;e++)if(ie.contains(this,t[e]))return!0})},closest:function(e,t){for(var n,r=0,o=this.length,i=[],s=pe.test(e)||"string"!=typeof e?ie(e,t||this.context):0;o>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(s?s.index(n)>-1:1===n.nodeType&&ie.find.matchesSelector(n,e))){i.push(n);break}return this.pushStack(i.length>1?ie.uniqueSort(i):i)},index:function(e){return e?"string"==typeof e?J.call(ie(e),this[0]):J.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(ie.uniqueSort(ie.merge(this.get(),ie(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),ie.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return fe(e,"parentNode")},parentsUntil:function(e,t,n){return fe(e,"parentNode",n)},next:function(e){return o(e,"nextSibling")},prev:function(e){return o(e,"previousSibling")},nextAll:function(e){return fe(e,"nextSibling")},prevAll:function(e){return fe(e,"previousSibling")},nextUntil:function(e,t,n){return fe(e,"nextSibling",n)},prevUntil:function(e,t,n){return fe(e,"previousSibling",n)},siblings:function(e){return de((e.parentNode||{}).firstChild,e)},children:function(e){return de(e.firstChild)},contents:function(e){return e.contentDocument||ie.merge([],e.childNodes)}},function(e,t){ie.fn[e]=function(n,r){var o=ie.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(o=ie.filter(r,o)),this.length>1&&(_e[e]||ie.uniqueSort(o),be.test(e)&&o.reverse()),this.pushStack(o)}});var we=/\S+/g;ie.Callbacks=function(e){e="string"==typeof e?i(e):ie.extend({},e);var t,n,r,o,s=[],a=[],u=-1,l=function(){for(o=e.once,r=t=!0;a.length;u=-1)for(n=a.shift();++u<s.length;)s[u].apply(n[0],n[1])===!1&&e.stopOnFalse&&(u=s.length,n=!1);e.memory||(n=!1),t=!1,o&&(s=n?[]:"")},c={add:function(){return s&&(n&&!t&&(u=s.length-1,a.push(n)),function r(t){ie.each(t,function(t,n){ie.isFunction(n)?e.unique&&c.has(n)||s.push(n):n&&n.length&&"string"!==ie.type(n)&&r(n)})}(arguments),n&&!t&&l()),this},remove:function(){return ie.each(arguments,function(e,t){for(var n;(n=ie.inArray(t,s,n))>-1;)s.splice(n,1),u>=n&&u--}),this},has:function(e){return e?ie.inArray(e,s)>-1:s.length>0},empty:function(){return s&&(s=[]),this},disable:function(){return o=a=[],s=n="",this},disabled:function(){return!s},lock:function(){return o=a=[],n||(s=n=""),this},locked:function(){return!!o},fireWith:function(e,n){return o||(n=n||[],n=[e,n.slice?n.slice():n],a.push(n),t||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},ie.extend({Deferred:function(e){var t=[["resolve","done",ie.Callbacks("once memory"),"resolved"],["reject","fail",ie.Callbacks("once memory"),"rejected"],["notify","progress",ie.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},then:function(){var e=arguments;return ie.Deferred(function(n){ie.each(t,function(t,i){var s=ie.isFunction(e[t])&&e[t];o[i[1]](function(){var e=s&&s.apply(this,arguments);e&&ie.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[i[0]+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?ie.extend(e,r):r}},o={};return r.pipe=r.then,ie.each(t,function(e,i){var s=i[2],a=i[3];r[i[1]]=s.add,a&&s.add(function(){n=a},t[1^e][2].disable,t[2][2].lock),o[i[0]]=function(){return o[i[0]+"With"](this===o?r:this,arguments),this},o[i[0]+"With"]=s.fireWith}),r.promise(o),e&&e.call(o,o),o},when:function(e){var t,n,r,o=0,i=Q.call(arguments),s=i.length,a=1!==s||e&&ie.isFunction(e.promise)?s:0,u=1===a?e:ie.Deferred(),l=function(e,n,r){return function(o){n[e]=this,r[e]=arguments.length>1?Q.call(arguments):o,r===t?u.notifyWith(n,r):--a||u.resolveWith(n,r)}};if(s>1)for(t=new Array(s),n=new Array(s),r=new Array(s);s>o;o++)i[o]&&ie.isFunction(i[o].promise)?i[o].promise().progress(l(o,n,t)).done(l(o,r,i)).fail(u.reject):--a;return a||u.resolveWith(r,i),u.promise()}});var Te;ie.fn.ready=function(e){return ie.ready.promise().done(e),this},ie.extend({isReady:!1,readyWait:1,holdReady:function(e){e?ie.readyWait++:ie.ready(!0)},ready:function(e){(e===!0?--ie.readyWait:ie.isReady)||(ie.isReady=!0,e!==!0&&--ie.readyWait>0||(Te.resolveWith(K,[ie]),ie.fn.triggerHandler&&(ie(K).triggerHandler("ready"),ie(K).off("ready"))))}}),ie.ready.promise=function(t){return Te||(Te=ie.Deferred(),"complete"===K.readyState||"loading"!==K.readyState&&!K.documentElement.doScroll?e.setTimeout(ie.ready):(K.addEventListener("DOMContentLoaded",s),e.addEventListener("load",s))),Te.promise(t)},ie.ready.promise();var Ee=function(e,t,n,r,o,i,s){var a=0,u=e.length,l=null==n;if("object"===ie.type(n)){o=!0;for(a in n)Ee(e,t,a,n[a],!0,i,s)}else if(void 0!==r&&(o=!0,ie.isFunction(r)||(s=!0),l&&(s?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(ie(e),n)})),t))for(;u>a;a++)t(e[a],n,s?r:r.call(e[a],a,t(e[a],n)));return o?e:l?t.call(e):u?t(e[0],n):i},xe=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};a.uid=1,a.prototype={register:function(e,t){var n=t||{};return e.nodeType?e[this.expando]=n:Object.defineProperty(e,this.expando,{value:n,writable:!0,configurable:!0}),e[this.expando]},cache:function(e){if(!xe(e))return{};var t=e[this.expando];return t||(t={},xe(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,o=this.cache(e);if("string"==typeof t)o[t]=n;else for(r in t)o[r]=t[r];return o},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][t]},access:function(e,t,n){var r;return void 0===t||t&&"string"==typeof t&&void 0===n?(r=this.get(e,t),void 0!==r?r:this.get(e,ie.camelCase(t))):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r,o,i=e[this.expando];if(void 0!==i){if(void 0===t)this.register(e);else{ie.isArray(t)?r=t.concat(t.map(ie.camelCase)):(o=ie.camelCase(t),t in i?r=[t,o]:(r=o,r=r in i?[r]:r.match(we)||[])),n=r.length;for(;n--;)delete i[r[n]]}(void 0===t||ie.isEmptyObject(i))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!ie.isEmptyObject(t)}};var Se=new a,Ce=new a,Pe=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Me=/[A-Z]/g;ie.extend({hasData:function(e){return Ce.hasData(e)||Se.hasData(e)},data:function(e,t,n){return Ce.access(e,t,n)},removeData:function(e,t){Ce.remove(e,t)},_data:function(e,t,n){return Se.access(e,t,n)},_removeData:function(e,t){Se.remove(e,t)}}),ie.fn.extend({data:function(e,t){var n,r,o,i=this[0],s=i&&i.attributes;if(void 0===e){if(this.length&&(o=Ce.get(i),1===i.nodeType&&!Se.get(i,"hasDataAttrs"))){for(n=s.length;n--;)s[n]&&(r=s[n].name,0===r.indexOf("data-")&&(r=ie.camelCase(r.slice(5)),u(i,r,o[r])));Se.set(i,"hasDataAttrs",!0)}return o}return"object"==typeof e?this.each(function(){Ce.set(this,e)}):Ee(this,function(t){var n,r;if(i&&void 0===t){if(n=Ce.get(i,e)||Ce.get(i,e.replace(Me,"-$&").toLowerCase()),void 0!==n)return n;if(r=ie.camelCase(e),n=Ce.get(i,r),void 0!==n)return n;if(n=u(i,r,void 0),void 0!==n)return n}else r=ie.camelCase(e),this.each(function(){var n=Ce.get(this,r);Ce.set(this,r,t),e.indexOf("-")>-1&&void 0!==n&&Ce.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){Ce.remove(this,e)})}}),ie.extend({queue:function(e,t,n){var r;return e?(t=(t||"fx")+"queue",r=Se.get(e,t),n&&(!r||ie.isArray(n)?r=Se.access(e,t,ie.makeArray(n)):r.push(n)),r||[]):void 0},dequeue:function(e,t){t=t||"fx";var n=ie.queue(e,t),r=n.length,o=n.shift(),i=ie._queueHooks(e,t),s=function(){ie.dequeue(e,t)};"inprogress"===o&&(o=n.shift(),r--),o&&("fx"===t&&n.unshift("inprogress"),delete i.stop,o.call(e,s,i)),!r&&i&&i.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Se.get(e,n)||Se.access(e,n,{empty:ie.Callbacks("once memory").add(function(){Se.remove(e,[t+"queue",n])})})}}),ie.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?ie.queue(this[0],e):void 0===t?this:this.each(function(){var n=ie.queue(this,e,t);ie._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&ie.dequeue(this,e)})},dequeue:function(e){return this.each(function(){ie.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,o=ie.Deferred(),i=this,s=this.length,a=function(){--r||o.resolveWith(i,[i])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";s--;)n=Se.get(i[s],e+"queueHooks"),n&&n.empty&&(r++,n.empty.add(a));return a(),o.promise(t)}});var Re=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,De=new RegExp("^(?:([+-])=|)("+Re+")([a-z%]*)$","i"),Oe=["Top","Right","Bottom","Left"],Ne=function(e,t){return e=t||e,"none"===ie.css(e,"display")||!ie.contains(e.ownerDocument,e)},Ae=/^(?:checkbox|radio)$/i,Ie=/<([\w:-]+)/,Be=/^$|\/(?:java|ecma)script/i,ke={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,"",""]};ke.optgroup=ke.option,ke.tbody=ke.tfoot=ke.colgroup=ke.caption=ke.thead,ke.th=ke.td;var Le=/<|&#?\w+;/;!function(){var e=K.createDocumentFragment(),t=e.appendChild(K.createElement("div")),n=K.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),re.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="<textarea>x</textarea>",re.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var je=/^key/,Ge=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,He=/^([^.]*)(?:\.(.+)|)/;ie.event={global:{},add:function(e,t,n,r,o){var i,s,a,u,l,c,f,d,p,h,m,g=Se.get(e);if(g)for(n.handler&&(i=n,n=i.handler,o=i.selector),n.guid||(n.guid=ie.guid++),(u=g.events)||(u=g.events={}),(s=g.handle)||(s=g.handle=function(t){return"undefined"!=typeof ie&&ie.event.triggered!==t.type?ie.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(we)||[""],l=t.length;l--;)a=He.exec(t[l])||[],p=m=a[1],h=(a[2]||"").split(".").sort(),p&&(f=ie.event.special[p]||{},p=(o?f.delegateType:f.bindType)||p,f=ie.event.special[p]||{},c=ie.extend({type:p,origType:m,data:r,handler:n,guid:n.guid,selector:o,needsContext:o&&ie.expr.match.needsContext.test(o),namespace:h.join(".")},i),(d=u[p])||(d=u[p]=[],d.delegateCount=0,f.setup&&f.setup.call(e,r,h,s)!==!1||e.addEventListener&&e.addEventListener(p,s)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),o?d.splice(d.delegateCount++,0,c):d.push(c),ie.event.global[p]=!0)},remove:function(e,t,n,r,o){var i,s,a,u,l,c,f,d,p,h,m,g=Se.hasData(e)&&Se.get(e);if(g&&(u=g.events)){for(t=(t||"").match(we)||[""],l=t.length;l--;)if(a=He.exec(t[l])||[],p=m=a[1],h=(a[2]||"").split(".").sort(),p){for(f=ie.event.special[p]||{},p=(r?f.delegateType:f.bindType)||p,d=u[p]||[],a=a[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=i=d.length;i--;)c=d[i],!o&&m!==c.origType||n&&n.guid!==c.guid||a&&!a.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(d.splice(i,1),c.selector&&d.delegateCount--,f.remove&&f.remove.call(e,c));s&&!d.length&&(f.teardown&&f.teardown.call(e,h,g.handle)!==!1||ie.removeEvent(e,p,g.handle),delete u[p])}else for(p in u)ie.event.remove(e,p+t[l],n,r,!0);ie.isEmptyObject(u)&&Se.remove(e,"handle events")}},dispatch:function(e){e=ie.event.fix(e);var t,n,r,o,i,s=[],a=Q.call(arguments),u=(Se.get(this,"events")||{})[e.type]||[],l=ie.event.special[e.type]||{};if(a[0]=e,e.delegateTarget=this,!l.preDispatch||l.preDispatch.call(this,e)!==!1){for(s=ie.event.handlers.call(this,e,u),t=0;(o=s[t++])&&!e.isPropagationStopped();)for(e.currentTarget=o.elem,n=0;(i=o.handlers[n++])&&!e.isImmediatePropagationStopped();)(!e.rnamespace||e.rnamespace.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((ie.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,a),void 0!==r&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,o,i,s=[],a=t.delegateCount,u=e.target;if(a&&u.nodeType&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(r=[],n=0;a>n;n++)i=t[n],o=i.selector+" ",void 0===r[o]&&(r[o]=i.needsContext?ie(o,this).index(u)>-1:ie.find(o,this,null,[u]).length),r[o]&&r.push(i);r.length&&s.push({elem:u,handlers:r})}return a<t.length&&s.push({elem:this,handlers:t.slice(a)}),s},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,r,o,i=t.button;return null==e.pageX&&null!=t.clientX&&(n=e.target.ownerDocument||K,r=n.documentElement,o=n.body,e.pageX=t.clientX+(r&&r.scrollLeft||o&&o.scrollLeft||0)-(r&&r.clientLeft||o&&o.clientLeft||0),e.pageY=t.clientY+(r&&r.scrollTop||o&&o.scrollTop||0)-(r&&r.clientTop||o&&o.clientTop||0)),e.which||void 0===i||(e.which=1&i?1:2&i?3:4&i?2:0),e}},fix:function(e){if(e[ie.expando])return e;var t,n,r,o=e.type,i=e,s=this.fixHooks[o];for(s||(this.fixHooks[o]=s=Ge.test(o)?this.mouseHooks:je.test(o)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new ie.Event(i),t=r.length;t--;)n=r[t],e[n]=i[n];return e.target||(e.target=K),3===e.target.nodeType&&(e.target=e.target.parentNode),s.filter?s.filter(e,i):e},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==m()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===m()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&ie.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(e){return ie.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},ie.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},ie.Event=function(e,t){return this instanceof ie.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&e.returnValue===!1?p:h):this.type=e,t&&ie.extend(this,t),this.timeStamp=e&&e.timeStamp||ie.now(),void(this[ie.expando]=!0)):new ie.Event(e,t)},ie.Event.prototype={constructor:ie.Event,isDefaultPrevented:h,isPropagationStopped:h,isImmediatePropagationStopped:h,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=p,e&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=p,e&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=p,e&&e.stopImmediatePropagation(),this.stopPropagation()}},ie.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){ie.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,o=e.relatedTarget,i=e.handleObj;return(!o||o!==r&&!ie.contains(r,o))&&(e.type=i.origType,n=i.handler.apply(this,arguments),e.type=t),n}}}),ie.fn.extend({on:function(e,t,n,r){return g(this,e,t,n,r)},one:function(e,t,n,r){return g(this,e,t,n,r,1)},off:function(e,t,n){var r,o;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,ie(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(o in e)this.off(o,t,e[o]); | },function(e,t){var n="pageYOffset"===t;ie.fn[e]=function(r){return Ee(this,function(e,r,o){var i=z(e);return void 0===o?i?i[t]:e[r]:void(i?i.scrollTo(n?i.pageXOffset:o,n?o:i.pageYOffset):e[r]=o)},e,r,arguments.length)}}),ie.each(["top","left"],function(e,t){ie.cssHooks[t]=P(re.pixelPosition,function(e,n){return n?(n=C(e,t),Ke.test(n)?ie(e).position()[t]+"px":n):void 0})}),ie.each({Height:"height",Width:"width"},function(e,t){ie.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){ie.fn[r]=function(r,o){var i=arguments.length&&(n||"boolean"!=typeof r),s=n||(r===!0||o===!0?"margin":"border");return Ee(this,function(t,n,r){var o;return ie.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===r?ie.css(t,n,s):ie.style(t,n,r,s)},t,i?r:void 0,i,null)}})}),ie.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},size:function(){return this.length}}),ie.fn.andSelf=ie.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return ie});var jt=e.jQuery,Gt=e.$;return ie.noConflict=function(t){return e.$===ie&&(e.$=Gt),t&&e.jQuery===ie&&(e.jQuery=jt),ie},t||(e.jQuery=e.$=ie),ie})}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/jquery/dist/jquery.js","/node_modules/jquery/dist")},{_process:43,buffer:3}],"mobile-detect":[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){!function(e,t){e(function(){"use strict";function e(e,t){return null!=e&&null!=t&&e.toLowerCase()===t.toLowerCase()}function n(e,t){var n,r,o=e.length;if(!o||!t)return!1;for(n=t.toLowerCase(),r=0;o>r;++r)if(n===e[r].toLowerCase())return!0;return!1}function r(e){for(var t in e)a.call(e,t)&&(e[t]=new RegExp(e[t],"i"))}function o(e,t){this.ua=e||"",this._cache={},this.maxPhoneWidth=t||600}var i={};i.mobileDetectRules={phones:{iPhone:"\\biPhone\\b|\\biPod\\b",BlackBerry:"BlackBerry|\\bBB10\\b|rim[0-9]+",HTC:"HTC|HTC.*(Sensation|Evo|Vision|Explorer|6800|8100|8900|A7272|S510e|C110e|Legend|Desire|T8282)|APX515CKT|Qtek9090|APA9292KT|HD_mini|Sensation.*Z710e|PG86100|Z715e|Desire.*(A8181|HD)|ADR6200|ADR6400L|ADR6425|001HT|Inspire 4G|Android.*\\bEVO\\b|T-Mobile G1|Z520m",Nexus:"Nexus One|Nexus S|Galaxy.*Nexus|Android.*Nexus.*Mobile|Nexus 4|Nexus 5|Nexus 6",Dell:"Dell.*Streak|Dell.*Aero|Dell.*Venue|DELL.*Venue Pro|Dell Flash|Dell Smoke|Dell Mini 3iX|XCD28|XCD35|\\b001DL\\b|\\b101DL\\b|\\bGS01\\b",Motorola:"Motorola|DROIDX|DROID BIONIC|\\bDroid\\b.*Build|Android.*Xoom|HRI39|MOT-|A1260|A1680|A555|A853|A855|A953|A955|A956|Motorola.*ELECTRIFY|Motorola.*i1|i867|i940|MB200|MB300|MB501|MB502|MB508|MB511|MB520|MB525|MB526|MB611|MB612|MB632|MB810|MB855|MB860|MB861|MB865|MB870|ME501|ME502|ME511|ME525|ME600|ME632|ME722|ME811|ME860|ME863|ME865|MT620|MT710|MT716|MT720|MT810|MT870|MT917|Motorola.*TITANIUM|WX435|WX445|XT300|XT301|XT311|XT316|XT317|XT319|XT320|XT390|XT502|XT530|XT531|XT532|XT535|XT603|XT610|XT611|XT615|XT681|XT701|XT702|XT711|XT720|XT800|XT806|XT860|XT862|XT875|XT882|XT883|XT894|XT901|XT907|XT909|XT910|XT912|XT928|XT926|XT915|XT919|XT925|XT1021|\\bMoto E\\b",Samsung:"Samsung|SM-G9250|GT-19300|SGH-I337|BGT-S5230|GT-B2100|GT-B2700|GT-B2710|GT-B3210|GT-B3310|GT-B3410|GT-B3730|GT-B3740|GT-B5510|GT-B5512|GT-B5722|GT-B6520|GT-B7300|GT-B7320|GT-B7330|GT-B7350|GT-B7510|GT-B7722|GT-B7800|GT-C3010|GT-C3011|GT-C3060|GT-C3200|GT-C3212|GT-C3212I|GT-C3262|GT-C3222|GT-C3300|GT-C3300K|GT-C3303|GT-C3303K|GT-C3310|GT-C3322|GT-C3330|GT-C3350|GT-C3500|GT-C3510|GT-C3530|GT-C3630|GT-C3780|GT-C5010|GT-C5212|GT-C6620|GT-C6625|GT-C6712|GT-E1050|GT-E1070|GT-E1075|GT-E1080|GT-E1081|GT-E1085|GT-E1087|GT-E1100|GT-E1107|GT-E1110|GT-E1120|GT-E1125|GT-E1130|GT-E1160|GT-E1170|GT-E1175|GT-E1180|GT-E1182|GT-E1200|GT-E1210|GT-E1225|GT-E1230|GT-E1390|GT-E2100|GT-E2120|GT-E2121|GT-E2152|GT-E2220|GT-E2222|GT-E2230|GT-E2232|GT-E2250|GT-E2370|GT-E2550|GT-E2652|GT-E3210|GT-E3213|GT-I5500|GT-I5503|GT-I5700|GT-I5800|GT-I5801|GT-I6410|GT-I6420|GT-I7110|GT-I7410|GT-I7500|GT-I8000|GT-I8150|GT-I8160|GT-I8190|GT-I8320|GT-I8330|GT-I8350|GT-I8530|GT-I8700|GT-I8703|GT-I8910|GT-I9000|GT-I9001|GT-I9003|GT-I9010|GT-I9020|GT-I9023|GT-I9070|GT-I9082|GT-I9100|GT-I9103|GT-I9220|GT-I9250|GT-I9300|GT-I9305|GT-I9500|GT-I9505|GT-M3510|GT-M5650|GT-M7500|GT-M7600|GT-M7603|GT-M8800|GT-M8910|GT-N7000|GT-S3110|GT-S3310|GT-S3350|GT-S3353|GT-S3370|GT-S3650|GT-S3653|GT-S3770|GT-S3850|GT-S5210|GT-S5220|GT-S5229|GT-S5230|GT-S5233|GT-S5250|GT-S5253|GT-S5260|GT-S5263|GT-S5270|GT-S5300|GT-S5330|GT-S5350|GT-S5360|GT-S5363|GT-S5369|GT-S5380|GT-S5380D|GT-S5560|GT-S5570|GT-S5600|GT-S5603|GT-S5610|GT-S5620|GT-S5660|GT-S5670|GT-S5690|GT-S5750|GT-S5780|GT-S5830|GT-S5839|GT-S6102|GT-S6500|GT-S7070|GT-S7200|GT-S7220|GT-S7230|GT-S7233|GT-S7250|GT-S7500|GT-S7530|GT-S7550|GT-S7562|GT-S7710|GT-S8000|GT-S8003|GT-S8500|GT-S8530|GT-S8600|SCH-A310|SCH-A530|SCH-A570|SCH-A610|SCH-A630|SCH-A650|SCH-A790|SCH-A795|SCH-A850|SCH-A870|SCH-A890|SCH-A930|SCH-A950|SCH-A970|SCH-A990|SCH-I100|SCH-I110|SCH-I400|SCH-I405|SCH-I500|SCH-I510|SCH-I515|SCH-I600|SCH-I730|SCH-I760|SCH-I770|SCH-I830|SCH-I910|SCH-I920|SCH-I959|SCH-LC11|SCH-N150|SCH-N300|SCH-R100|SCH-R300|SCH-R351|SCH-R400|SCH-R410|SCH-T300|SCH-U310|SCH-U320|SCH-U350|SCH-U360|SCH-U365|SCH-U370|SCH-U380|SCH-U410|SCH-U430|SCH-U450|SCH-U460|SCH-U470|SCH-U490|SCH-U540|SCH-U550|SCH-U620|SCH-U640|SCH-U650|SCH-U660|SCH-U700|SCH-U740|SCH-U750|SCH-U810|SCH-U820|SCH-U900|SCH-U940|SCH-U960|SCS-26UC|SGH-A107|SGH-A117|SGH-A127|SGH-A137|SGH-A157|SGH-A167|SGH-A177|SGH-A187|SGH-A197|SGH-A227|SGH-A237|SGH-A257|SGH-A437|SGH-A517|SGH-A597|SGH-A637|SGH-A657|SGH-A667|SGH-A687|SGH-A697|SGH-A707|SGH-A717|SGH-A727|SGH-A737|SGH-A747|SGH-A767|SGH-A777|SGH-A797|SGH-A817|SGH-A827|SGH-A837|SGH-A847|SGH-A867|SGH-A877|SGH-A887|SGH-A897|SGH-A927|SGH-B100|SGH-B130|SGH-B200|SGH-B220|SGH-C100|SGH-C110|SGH-C120|SGH-C130|SGH-C140|SGH-C160|SGH-C170|SGH-C180|SGH-C200|SGH-C207|SGH-C210|SGH-C225|SGH-C230|SGH-C417|SGH-C450|SGH-D307|SGH-D347|SGH-D357|SGH-D407|SGH-D415|SGH-D780|SGH-D807|SGH-D980|SGH-E105|SGH-E200|SGH-E315|SGH-E316|SGH-E317|SGH-E335|SGH-E590|SGH-E635|SGH-E715|SGH-E890|SGH-F300|SGH-F480|SGH-I200|SGH-I300|SGH-I320|SGH-I550|SGH-I577|SGH-I600|SGH-I607|SGH-I617|SGH-I627|SGH-I637|SGH-I677|SGH-I700|SGH-I717|SGH-I727|SGH-i747M|SGH-I777|SGH-I780|SGH-I827|SGH-I847|SGH-I857|SGH-I896|SGH-I897|SGH-I900|SGH-I907|SGH-I917|SGH-I927|SGH-I937|SGH-I997|SGH-J150|SGH-J200|SGH-L170|SGH-L700|SGH-M110|SGH-M150|SGH-M200|SGH-N105|SGH-N500|SGH-N600|SGH-N620|SGH-N625|SGH-N700|SGH-N710|SGH-P107|SGH-P207|SGH-P300|SGH-P310|SGH-P520|SGH-P735|SGH-P777|SGH-Q105|SGH-R210|SGH-R220|SGH-R225|SGH-S105|SGH-S307|SGH-T109|SGH-T119|SGH-T139|SGH-T209|SGH-T219|SGH-T229|SGH-T239|SGH-T249|SGH-T259|SGH-T309|SGH-T319|SGH-T329|SGH-T339|SGH-T349|SGH-T359|SGH-T369|SGH-T379|SGH-T409|SGH-T429|SGH-T439|SGH-T459|SGH-T469|SGH-T479|SGH-T499|SGH-T509|SGH-T519|SGH-T539|SGH-T559|SGH-T589|SGH-T609|SGH-T619|SGH-T629|SGH-T639|SGH-T659|SGH-T669|SGH-T679|SGH-T709|SGH-T719|SGH-T729|SGH-T739|SGH-T746|SGH-T749|SGH-T759|SGH-T769|SGH-T809|SGH-T819|SGH-T839|SGH-T919|SGH-T929|SGH-T939|SGH-T959|SGH-T989|SGH-U100|SGH-U200|SGH-U800|SGH-V205|SGH-V206|SGH-X100|SGH-X105|SGH-X120|SGH-X140|SGH-X426|SGH-X427|SGH-X475|SGH-X495|SGH-X497|SGH-X507|SGH-X600|SGH-X610|SGH-X620|SGH-X630|SGH-X700|SGH-X820|SGH-X890|SGH-Z130|SGH-Z150|SGH-Z170|SGH-ZX10|SGH-ZX20|SHW-M110|SPH-A120|SPH-A400|SPH-A420|SPH-A460|SPH-A500|SPH-A560|SPH-A600|SPH-A620|SPH-A660|SPH-A700|SPH-A740|SPH-A760|SPH-A790|SPH-A800|SPH-A820|SPH-A840|SPH-A880|SPH-A900|SPH-A940|SPH-A960|SPH-D600|SPH-D700|SPH-D710|SPH-D720|SPH-I300|SPH-I325|SPH-I330|SPH-I350|SPH-I500|SPH-I600|SPH-I700|SPH-L700|SPH-M100|SPH-M220|SPH-M240|SPH-M300|SPH-M305|SPH-M320|SPH-M330|SPH-M350|SPH-M360|SPH-M370|SPH-M380|SPH-M510|SPH-M540|SPH-M550|SPH-M560|SPH-M570|SPH-M580|SPH-M610|SPH-M620|SPH-M630|SPH-M800|SPH-M810|SPH-M850|SPH-M900|SPH-M910|SPH-M920|SPH-M930|SPH-N100|SPH-N200|SPH-N240|SPH-N300|SPH-N400|SPH-Z400|SWC-E100|SCH-i909|GT-N7100|GT-N7105|SCH-I535|SM-N900A|SGH-I317|SGH-T999L|GT-S5360B|GT-I8262|GT-S6802|GT-S6312|GT-S6310|GT-S5312|GT-S5310|GT-I9105|GT-I8510|GT-S6790N|SM-G7105|SM-N9005|GT-S5301|GT-I9295|GT-I9195|SM-C101|GT-S7392|GT-S7560|GT-B7610|GT-I5510|GT-S7582|GT-S7530E|GT-I8750|SM-G9006V|SM-G9008V|SM-G9009D|SM-G900A|SM-G900D|SM-G900F|SM-G900H|SM-G900I|SM-G900J|SM-G900K|SM-G900L|SM-G900M|SM-G900P|SM-G900R4|SM-G900S|SM-G900T|SM-G900V|SM-G900W8|SHV-E160K|SCH-P709|SCH-P729|SM-T2558|GT-I9205",LG:"\\bLG\\b;|LG[- ]?(C800|C900|E400|E610|E900|E-900|F160|F180K|F180L|F180S|730|855|L160|LS740|LS840|LS970|LU6200|MS690|MS695|MS770|MS840|MS870|MS910|P500|P700|P705|VM696|AS680|AS695|AX840|C729|E970|GS505|272|C395|E739BK|E960|L55C|L75C|LS696|LS860|P769BK|P350|P500|P509|P870|UN272|US730|VS840|VS950|LN272|LN510|LS670|LS855|LW690|MN270|MN510|P509|P769|P930|UN200|UN270|UN510|UN610|US670|US740|US760|UX265|UX840|VN271|VN530|VS660|VS700|VS740|VS750|VS910|VS920|VS930|VX9200|VX11000|AX840A|LW770|P506|P925|P999|E612|D955|D802|MS323)",Sony:"SonyST|SonyLT|SonyEricsson|SonyEricssonLT15iv|LT18i|E10i|LT28h|LT26w|SonyEricssonMT27i|C5303|C6902|C6903|C6906|C6943|D2533",Asus:"Asus.*Galaxy|PadFone.*Mobile",Micromax:"Micromax.*\\b(A210|A92|A88|A72|A111|A110Q|A115|A116|A110|A90S|A26|A51|A35|A54|A25|A27|A89|A68|A65|A57|A90)\\b",Palm:"PalmSource|Palm",Vertu:"Vertu|Vertu.*Ltd|Vertu.*Ascent|Vertu.*Ayxta|Vertu.*Constellation(F|Quest)?|Vertu.*Monika|Vertu.*Signature",Pantech:"PANTECH|IM-A850S|IM-A840S|IM-A830L|IM-A830K|IM-A830S|IM-A820L|IM-A810K|IM-A810S|IM-A800S|IM-T100K|IM-A725L|IM-A780L|IM-A775C|IM-A770K|IM-A760S|IM-A750K|IM-A740S|IM-A730S|IM-A720L|IM-A710K|IM-A690L|IM-A690S|IM-A650S|IM-A630K|IM-A600S|VEGA PTL21|PT003|P8010|ADR910L|P6030|P6020|P9070|P4100|P9060|P5000|CDM8992|TXT8045|ADR8995|IS11PT|P2030|P6010|P8000|PT002|IS06|CDM8999|P9050|PT001|TXT8040|P2020|P9020|P2000|P7040|P7000|C790",Fly:"IQ230|IQ444|IQ450|IQ440|IQ442|IQ441|IQ245|IQ256|IQ236|IQ255|IQ235|IQ245|IQ275|IQ240|IQ285|IQ280|IQ270|IQ260|IQ250",Wiko:"KITE 4G|HIGHWAY|GETAWAY|STAIRWAY|DARKSIDE|DARKFULL|DARKNIGHT|DARKMOON|SLIDE|WAX 4G|RAINBOW|BLOOM|SUNSET|GOA|LENNY|BARRY|IGGY|OZZY|CINK FIVE|CINK PEAX|CINK PEAX 2|CINK SLIM|CINK SLIM 2|CINK +|CINK KING|CINK PEAX|CINK SLIM|SUBLIM",iMobile:"i-mobile (IQ|i-STYLE|idea|ZAA|Hitz)",SimValley:"\\b(SP-80|XT-930|SX-340|XT-930|SX-310|SP-360|SP60|SPT-800|SP-120|SPT-800|SP-140|SPX-5|SPX-8|SP-100|SPX-8|SPX-12)\\b",Wolfgang:"AT-B24D|AT-AS50HD|AT-AS40W|AT-AS55HD|AT-AS45q2|AT-B26D|AT-AS50Q",Alcatel:"Alcatel",Nintendo:"Nintendo 3DS",Amoi:"Amoi",INQ:"INQ",GenericPhone:"Tapatalk|PDA;|SAGEM|\\bmmp\\b|pocket|\\bpsp\\b|symbian|Smartphone|smartfon|treo|up.browser|up.link|vodafone|\\bwap\\b|nokia|Series40|Series60|S60|SonyEricsson|N900|MAUI.*WAP.*Browser"},tablets:{iPad:"iPad|iPad.*Mobile",NexusTablet:"Android.*Nexus[\\s]+(7|9|10)",SamsungTablet:"SAMSUNG.*Tablet|Galaxy.*Tab|SC-01C|GT-P1000|GT-P1003|GT-P1010|GT-P3105|GT-P6210|GT-P6800|GT-P6810|GT-P7100|GT-P7300|GT-P7310|GT-P7500|GT-P7510|SCH-I800|SCH-I815|SCH-I905|SGH-I957|SGH-I987|SGH-T849|SGH-T859|SGH-T869|SPH-P100|GT-P3100|GT-P3108|GT-P3110|GT-P5100|GT-P5110|GT-P6200|GT-P7320|GT-P7511|GT-N8000|GT-P8510|SGH-I497|SPH-P500|SGH-T779|SCH-I705|SCH-I915|GT-N8013|GT-P3113|GT-P5113|GT-P8110|GT-N8010|GT-N8005|GT-N8020|GT-P1013|GT-P6201|GT-P7501|GT-N5100|GT-N5105|GT-N5110|SHV-E140K|SHV-E140L|SHV-E140S|SHV-E150S|SHV-E230K|SHV-E230L|SHV-E230S|SHW-M180K|SHW-M180L|SHW-M180S|SHW-M180W|SHW-M300W|SHW-M305W|SHW-M380K|SHW-M380S|SHW-M380W|SHW-M430W|SHW-M480K|SHW-M480S|SHW-M480W|SHW-M485W|SHW-M486W|SHW-M500W|GT-I9228|SCH-P739|SCH-I925|GT-I9200|GT-P5200|GT-P5210|GT-P5210X|SM-T311|SM-T310|SM-T310X|SM-T210|SM-T210R|SM-T211|SM-P600|SM-P601|SM-P605|SM-P900|SM-P901|SM-T217|SM-T217A|SM-T217S|SM-P6000|SM-T3100|SGH-I467|XE500|SM-T110|GT-P5220|GT-I9200X|GT-N5110X|GT-N5120|SM-P905|SM-T111|SM-T2105|SM-T315|SM-T320|SM-T320X|SM-T321|SM-T520|SM-T525|SM-T530NU|SM-T230NU|SM-T330NU|SM-T900|XE500T1C|SM-P605V|SM-P905V|SM-T337V|SM-T537V|SM-T707V|SM-T807V|SM-P600X|SM-P900X|SM-T210X|SM-T230|SM-T230X|SM-T325|GT-P7503|SM-T531|SM-T330|SM-T530|SM-T705|SM-T705C|SM-T535|SM-T331|SM-T800|SM-T700|SM-T537|SM-T807|SM-P907A|SM-T337A|SM-T537A|SM-T707A|SM-T807A|SM-T237|SM-T807P|SM-P607T|SM-T217T|SM-T337T|SM-T807T|SM-T116NQ|SM-P550|SM-T350|SM-T550|SM-T9000|SM-P9000|SM-T705Y|SM-T805|GT-P3113|SM-T710|SM-T810|SM-T360|SM-T533|SM-T113|SM-T335|SM-T715",Kindle:"Kindle|Silk.*Accelerated|Android.*\\b(KFOT|KFTT|KFJWI|KFJWA|KFOTE|KFSOWI|KFTHWI|KFTHWA|KFAPWI|KFAPWA|WFJWAE|KFSAWA|KFSAWI|KFASWI)\\b",SurfaceTablet:"Windows NT [0-9.]+; ARM;.*(Tablet|ARMBJS)",HPTablet:"HP Slate (7|8|10)|HP ElitePad 900|hp-tablet|EliteBook.*Touch|HP 8|Slate 21|HP SlateBook 10",AsusTablet:"^.*PadFone((?!Mobile).)*$|Transformer|TF101|TF101G|TF300T|TF300TG|TF300TL|TF700T|TF700KL|TF701T|TF810C|ME171|ME301T|ME302C|ME371MG|ME370T|ME372MG|ME172V|ME173X|ME400C|Slider SL101|\\bK00F\\b|\\bK00C\\b|\\bK00E\\b|\\bK00L\\b|TX201LA|ME176C|ME102A|\\bM80TA\\b|ME372CL|ME560CG|ME372CG|ME302KL| K010 | K017 |ME572C|ME103K|ME170C|ME171C|\\bME70C\\b|ME581C|ME581CL|ME8510C|ME181C",BlackBerryTablet:"PlayBook|RIM Tablet",HTCtablet:"HTC_Flyer_P512|HTC Flyer|HTC Jetstream|HTC-P715a|HTC EVO View 4G|PG41200|PG09410",MotorolaTablet:"xoom|sholest|MZ615|MZ605|MZ505|MZ601|MZ602|MZ603|MZ604|MZ606|MZ607|MZ608|MZ609|MZ615|MZ616|MZ617",NookTablet:"Android.*Nook|NookColor|nook browser|BNRV200|BNRV200A|BNTV250|BNTV250A|BNTV400|BNTV600|LogicPD Zoom2",AcerTablet:"Android.*; \\b(A100|A101|A110|A200|A210|A211|A500|A501|A510|A511|A700|A701|W500|W500P|W501|W501P|W510|W511|W700|G100|G100W|B1-A71|B1-710|B1-711|A1-810|A1-811|A1-830)\\b|W3-810|\\bA3-A10\\b|\\bA3-A11\\b",ToshibaTablet:"Android.*(AT100|AT105|AT200|AT205|AT270|AT275|AT300|AT305|AT1S5|AT500|AT570|AT700|AT830)|TOSHIBA.*FOLIO",LGTablet:"\\bL-06C|LG-V909|LG-V900|LG-V700|LG-V510|LG-V500|LG-V410|LG-V400|LG-VK810\\b",FujitsuTablet:"Android.*\\b(F-01D|F-02F|F-05E|F-10D|M532|Q572)\\b",PrestigioTablet:"PMP3170B|PMP3270B|PMP3470B|PMP7170B|PMP3370B|PMP3570C|PMP5870C|PMP3670B|PMP5570C|PMP5770D|PMP3970B|PMP3870C|PMP5580C|PMP5880D|PMP5780D|PMP5588C|PMP7280C|PMP7280C3G|PMP7280|PMP7880D|PMP5597D|PMP5597|PMP7100D|PER3464|PER3274|PER3574|PER3884|PER5274|PER5474|PMP5097CPRO|PMP5097|PMP7380D|PMP5297C|PMP5297C_QUAD|PMP812E|PMP812E3G|PMP812F|PMP810E|PMP880TD|PMT3017|PMT3037|PMT3047|PMT3057|PMT7008|PMT5887|PMT5001|PMT5002",LenovoTablet:"Idea(Tab|Pad)( A1|A10| K1|)|ThinkPad([ ]+)?Tablet|Lenovo.*(S2109|S2110|S5000|S6000|K3011|A3000|A3500|A1000|A2107|A2109|A1107|A5500|A7600|B6000|B8000|B8080)(-|)(FL|F|HV|H|)",DellTablet:"Venue 11|Venue 8|Venue 7|Dell Streak 10|Dell Streak 7",YarvikTablet:"Android.*\\b(TAB210|TAB211|TAB224|TAB250|TAB260|TAB264|TAB310|TAB360|TAB364|TAB410|TAB411|TAB420|TAB424|TAB450|TAB460|TAB461|TAB464|TAB465|TAB467|TAB468|TAB07-100|TAB07-101|TAB07-150|TAB07-151|TAB07-152|TAB07-200|TAB07-201-3G|TAB07-210|TAB07-211|TAB07-212|TAB07-214|TAB07-220|TAB07-400|TAB07-485|TAB08-150|TAB08-200|TAB08-201-3G|TAB08-201-30|TAB09-100|TAB09-211|TAB09-410|TAB10-150|TAB10-201|TAB10-211|TAB10-400|TAB10-410|TAB13-201|TAB274EUK|TAB275EUK|TAB374EUK|TAB462EUK|TAB474EUK|TAB9-200)\\b",MedionTablet:"Android.*\\bOYO\\b|LIFE.*(P9212|P9514|P9516|S9512)|LIFETAB",ArnovaTablet:"AN10G2|AN7bG3|AN7fG3|AN8G3|AN8cG3|AN7G3|AN9G3|AN7dG3|AN7dG3ST|AN7dG3ChildPad|AN10bG3|AN10bG3DT|AN9G2",IntensoTablet:"INM8002KP|INM1010FP|INM805ND|Intenso Tab|TAB1004",IRUTablet:"M702pro",MegafonTablet:"MegaFon V9|\\bZTE V9\\b|Android.*\\bMT7A\\b",EbodaTablet:"E-Boda (Supreme|Impresspeed|Izzycomm|Essential)",AllViewTablet:"Allview.*(Viva|Alldro|City|Speed|All TV|Frenzy|Quasar|Shine|TX1|AX1|AX2)",ArchosTablet:"\\b(101G9|80G9|A101IT)\\b|Qilive 97R|Archos5|\\bARCHOS (70|79|80|90|97|101|FAMILYPAD|)(b|)(G10| Cobalt| TITANIUM(HD|)| Xenon| Neon|XSK| 2| XS 2| PLATINUM| CARBON|GAMEPAD)\\b",AinolTablet:"NOVO7|NOVO8|NOVO10|Novo7Aurora|Novo7Basic|NOVO7PALADIN|novo9-Spark",SonyTablet:"Sony.*Tablet|Xperia Tablet|Sony Tablet S|SO-03E|SGPT12|SGPT13|SGPT114|SGPT121|SGPT122|SGPT123|SGPT111|SGPT112|SGPT113|SGPT131|SGPT132|SGPT133|SGPT211|SGPT212|SGPT213|SGP311|SGP312|SGP321|EBRD1101|EBRD1102|EBRD1201|SGP351|SGP341|SGP511|SGP512|SGP521|SGP541|SGP551|SGP621|SGP612|SOT31",PhilipsTablet:"\\b(PI2010|PI3000|PI3100|PI3105|PI3110|PI3205|PI3210|PI3900|PI4010|PI7000|PI7100)\\b",CubeTablet:"Android.*(K8GT|U9GT|U10GT|U16GT|U17GT|U18GT|U19GT|U20GT|U23GT|U30GT)|CUBE U8GT",CobyTablet:"MID1042|MID1045|MID1125|MID1126|MID7012|MID7014|MID7015|MID7034|MID7035|MID7036|MID7042|MID7048|MID7127|MID8042|MID8048|MID8127|MID9042|MID9740|MID9742|MID7022|MID7010",MIDTablet:"M9701|M9000|M9100|M806|M1052|M806|T703|MID701|MID713|MID710|MID727|MID760|MID830|MID728|MID933|MID125|MID810|MID732|MID120|MID930|MID800|MID731|MID900|MID100|MID820|MID735|MID980|MID130|MID833|MID737|MID960|MID135|MID860|MID736|MID140|MID930|MID835|MID733",MSITablet:"MSI \\b(Primo 73K|Primo 73L|Primo 81L|Primo 77|Primo 93|Primo 75|Primo 76|Primo 73|Primo 81|Primo 91|Primo 90|Enjoy 71|Enjoy 7|Enjoy 10)\\b",SMiTTablet:"Android.*(\\bMID\\b|MID-560|MTV-T1200|MTV-PND531|MTV-P1101|MTV-PND530)",RockChipTablet:"Android.*(RK2818|RK2808A|RK2918|RK3066)|RK2738|RK2808A",FlyTablet:"IQ310|Fly Vision",bqTablet:"Android.*(bq)?.*(Elcano|Curie|Edison|Maxwell|Kepler|Pascal|Tesla|Hypatia|Platon|Newton|Livingstone|Cervantes|Avant|Aquaris E10)|Maxwell.*Lite|Maxwell.*Plus",HuaweiTablet:"MediaPad|MediaPad 7 Youth|IDEOS S7|S7-201c|S7-202u|S7-101|S7-103|S7-104|S7-105|S7-106|S7-201|S7-Slim",NecTablet:"\\bN-06D|\\bN-08D",PantechTablet:"Pantech.*P4100",BronchoTablet:"Broncho.*(N701|N708|N802|a710)",VersusTablet:"TOUCHPAD.*[78910]|\\bTOUCHTAB\\b",ZyncTablet:"z1000|Z99 2G|z99|z930|z999|z990|z909|Z919|z900",PositivoTablet:"TB07STA|TB10STA|TB07FTA|TB10FTA",NabiTablet:"Android.*\\bNabi",KoboTablet:"Kobo Touch|\\bK080\\b|\\bVox\\b Build|\\bArc\\b Build",DanewTablet:"DSlide.*\\b(700|701R|702|703R|704|802|970|971|972|973|974|1010|1012)\\b",TexetTablet:"NaviPad|TB-772A|TM-7045|TM-7055|TM-9750|TM-7016|TM-7024|TM-7026|TM-7041|TM-7043|TM-7047|TM-8041|TM-9741|TM-9747|TM-9748|TM-9751|TM-7022|TM-7021|TM-7020|TM-7011|TM-7010|TM-7023|TM-7025|TM-7037W|TM-7038W|TM-7027W|TM-9720|TM-9725|TM-9737W|TM-1020|TM-9738W|TM-9740|TM-9743W|TB-807A|TB-771A|TB-727A|TB-725A|TB-719A|TB-823A|TB-805A|TB-723A|TB-715A|TB-707A|TB-705A|TB-709A|TB-711A|TB-890HD|TB-880HD|TB-790HD|TB-780HD|TB-770HD|TB-721HD|TB-710HD|TB-434HD|TB-860HD|TB-840HD|TB-760HD|TB-750HD|TB-740HD|TB-730HD|TB-722HD|TB-720HD|TB-700HD|TB-500HD|TB-470HD|TB-431HD|TB-430HD|TB-506|TB-504|TB-446|TB-436|TB-416|TB-146SE|TB-126SE",PlaystationTablet:"Playstation.*(Portable|Vita)",TrekstorTablet:"ST10416-1|VT10416-1|ST70408-1|ST702xx-1|ST702xx-2|ST80208|ST97216|ST70104-2|VT10416-2|ST10216-2A|SurfTab",PyleAudioTablet:"\\b(PTBL10CEU|PTBL10C|PTBL72BC|PTBL72BCEU|PTBL7CEU|PTBL7C|PTBL92BC|PTBL92BCEU|PTBL9CEU|PTBL9CUK|PTBL9C)\\b",AdvanTablet:"Android.* \\b(E3A|T3X|T5C|T5B|T3E|T3C|T3B|T1J|T1F|T2A|T1H|T1i|E1C|T1-E|T5-A|T4|E1-B|T2Ci|T1-B|T1-D|O1-A|E1-A|T1-A|T3A|T4i)\\b ",DanyTechTablet:"Genius Tab G3|Genius Tab S2|Genius Tab Q3|Genius Tab G4|Genius Tab Q4|Genius Tab G-II|Genius TAB GII|Genius TAB GIII|Genius Tab S1",GalapadTablet:"Android.*\\bG1\\b",MicromaxTablet:"Funbook|Micromax.*\\b(P250|P560|P360|P362|P600|P300|P350|P500|P275)\\b",KarbonnTablet:"Android.*\\b(A39|A37|A34|ST8|ST10|ST7|Smart Tab3|Smart Tab2)\\b",AllFineTablet:"Fine7 Genius|Fine7 Shine|Fine7 Air|Fine8 Style|Fine9 More|Fine10 Joy|Fine11 Wide",PROSCANTablet:"\\b(PEM63|PLT1023G|PLT1041|PLT1044|PLT1044G|PLT1091|PLT4311|PLT4311PL|PLT4315|PLT7030|PLT7033|PLT7033D|PLT7035|PLT7035D|PLT7044K|PLT7045K|PLT7045KB|PLT7071KG|PLT7072|PLT7223G|PLT7225G|PLT7777G|PLT7810K|PLT7849G|PLT7851G|PLT7852G|PLT8015|PLT8031|PLT8034|PLT8036|PLT8080K|PLT8082|PLT8088|PLT8223G|PLT8234G|PLT8235G|PLT8816K|PLT9011|PLT9045K|PLT9233G|PLT9735|PLT9760G|PLT9770G)\\b",YONESTablet:"BQ1078|BC1003|BC1077|RK9702|BC9730|BC9001|IT9001|BC7008|BC7010|BC708|BC728|BC7012|BC7030|BC7027|BC7026",ChangJiaTablet:"TPC7102|TPC7103|TPC7105|TPC7106|TPC7107|TPC7201|TPC7203|TPC7205|TPC7210|TPC7708|TPC7709|TPC7712|TPC7110|TPC8101|TPC8103|TPC8105|TPC8106|TPC8203|TPC8205|TPC8503|TPC9106|TPC9701|TPC97101|TPC97103|TPC97105|TPC97106|TPC97111|TPC97113|TPC97203|TPC97603|TPC97809|TPC97205|TPC10101|TPC10103|TPC10106|TPC10111|TPC10203|TPC10205|TPC10503",GUTablet:"TX-A1301|TX-M9002|Q702|kf026",PointOfViewTablet:"TAB-P506|TAB-navi-7-3G-M|TAB-P517|TAB-P-527|TAB-P701|TAB-P703|TAB-P721|TAB-P731N|TAB-P741|TAB-P825|TAB-P905|TAB-P925|TAB-PR945|TAB-PL1015|TAB-P1025|TAB-PI1045|TAB-P1325|TAB-PROTAB[0-9]+|TAB-PROTAB25|TAB-PROTAB26|TAB-PROTAB27|TAB-PROTAB26XL|TAB-PROTAB2-IPS9|TAB-PROTAB30-IPS9|TAB-PROTAB25XXL|TAB-PROTAB26-IPS10|TAB-PROTAB30-IPS10",OvermaxTablet:"OV-(SteelCore|NewBase|Basecore|Baseone|Exellen|Quattor|EduTab|Solution|ACTION|BasicTab|TeddyTab|MagicTab|Stream|TB-08|TB-09)",HCLTablet:"HCL.*Tablet|Connect-3G-2.0|Connect-2G-2.0|ME Tablet U1|ME Tablet U2|ME Tablet G1|ME Tablet X1|ME Tablet Y2|ME Tablet Sync",DPSTablet:"DPS Dream 9|DPS Dual 7",VistureTablet:"V97 HD|i75 3G|Visture V4( HD)?|Visture V5( HD)?|Visture V10",CrestaTablet:"CTP(-)?810|CTP(-)?818|CTP(-)?828|CTP(-)?838|CTP(-)?888|CTP(-)?978|CTP(-)?980|CTP(-)?987|CTP(-)?988|CTP(-)?989",MediatekTablet:"\\bMT8125|MT8389|MT8135|MT8377\\b",ConcordeTablet:"Concorde([ ]+)?Tab|ConCorde ReadMan",GoCleverTablet:"GOCLEVER TAB|A7GOCLEVER|M1042|M7841|M742|R1042BK|R1041|TAB A975|TAB A7842|TAB A741|TAB A741L|TAB M723G|TAB M721|TAB A1021|TAB I921|TAB R721|TAB I720|TAB T76|TAB R70|TAB R76.2|TAB R106|TAB R83.2|TAB M813G|TAB I721|GCTA722|TAB I70|TAB I71|TAB S73|TAB R73|TAB R74|TAB R93|TAB R75|TAB R76.1|TAB A73|TAB A93|TAB A93.2|TAB T72|TAB R83|TAB R974|TAB R973|TAB A101|TAB A103|TAB A104|TAB A104.2|R105BK|M713G|A972BK|TAB A971|TAB R974.2|TAB R104|TAB R83.3|TAB A1042",ModecomTablet:"FreeTAB 9000|FreeTAB 7.4|FreeTAB 7004|FreeTAB 7800|FreeTAB 2096|FreeTAB 7.5|FreeTAB 1014|FreeTAB 1001 |FreeTAB 8001|FreeTAB 9706|FreeTAB 9702|FreeTAB 7003|FreeTAB 7002|FreeTAB 1002|FreeTAB 7801|FreeTAB 1331|FreeTAB 1004|FreeTAB 8002|FreeTAB 8014|FreeTAB 9704|FreeTAB 1003",VoninoTablet:"\\b(Argus[ _]?S|Diamond[ _]?79HD|Emerald[ _]?78E|Luna[ _]?70C|Onyx[ _]?S|Onyx[ _]?Z|Orin[ _]?HD|Orin[ _]?S|Otis[ _]?S|SpeedStar[ _]?S|Magnet[ _]?M9|Primus[ _]?94[ _]?3G|Primus[ _]?94HD|Primus[ _]?QS|Android.*\\bQ8\\b|Sirius[ _]?EVO[ _]?QS|Sirius[ _]?QS|Spirit[ _]?S)\\b",ECSTablet:"V07OT2|TM105A|S10OT1|TR10CS1",StorexTablet:"eZee[_']?(Tab|Go)[0-9]+|TabLC7|Looney Tunes Tab",VodafoneTablet:"SmartTab([ ]+)?[0-9]+|SmartTabII10|SmartTabII7",EssentielBTablet:"Smart[ ']?TAB[ ]+?[0-9]+|Family[ ']?TAB2",RossMoorTablet:"RM-790|RM-997|RMD-878G|RMD-974R|RMT-705A|RMT-701|RME-601|RMT-501|RMT-711",iMobileTablet:"i-mobile i-note",TolinoTablet:"tolino tab [0-9.]+|tolino shine",AudioSonicTablet:"\\bC-22Q|T7-QC|T-17B|T-17P\\b",AMPETablet:"Android.* A78 ",SkkTablet:"Android.* (SKYPAD|PHOENIX|CYCLOPS)",TecnoTablet:"TECNO P9",JXDTablet:"Android.*\\b(F3000|A3300|JXD5000|JXD3000|JXD2000|JXD300B|JXD300|S5800|S7800|S602b|S5110b|S7300|S5300|S602|S603|S5100|S5110|S601|S7100a|P3000F|P3000s|P101|P200s|P1000m|P200m|P9100|P1000s|S6600b|S908|P1000|P300|S18|S6600|S9100)\\b",iJoyTablet:"Tablet (Spirit 7|Essentia|Galatea|Fusion|Onix 7|Landa|Titan|Scooby|Deox|Stella|Themis|Argon|Unique 7|Sygnus|Hexen|Finity 7|Cream|Cream X2|Jade|Neon 7|Neron 7|Kandy|Scape|Saphyr 7|Rebel|Biox|Rebel|Rebel 8GB|Myst|Draco 7|Myst|Tab7-004|Myst|Tadeo Jones|Tablet Boing|Arrow|Draco Dual Cam|Aurix|Mint|Amity|Revolution|Finity 9|Neon 9|T9w|Amity 4GB Dual Cam|Stone 4GB|Stone 8GB|Andromeda|Silken|X2|Andromeda II|Halley|Flame|Saphyr 9,7|Touch 8|Planet|Triton|Unique 10|Hexen 10|Memphis 4GB|Memphis 8GB|Onix 10)",FX2Tablet:"FX2 PAD7|FX2 PAD10",XoroTablet:"KidsPAD 701|PAD[ ]?712|PAD[ ]?714|PAD[ ]?716|PAD[ ]?717|PAD[ ]?718|PAD[ ]?720|PAD[ ]?721|PAD[ ]?722|PAD[ ]?790|PAD[ ]?792|PAD[ ]?900|PAD[ ]?9715D|PAD[ ]?9716DR|PAD[ ]?9718DR|PAD[ ]?9719QR|PAD[ ]?9720QR|TelePAD1030|Telepad1032|TelePAD730|TelePAD731|TelePAD732|TelePAD735Q|TelePAD830|TelePAD9730|TelePAD795|MegaPAD 1331|MegaPAD 1851|MegaPAD 2151",ViewsonicTablet:"ViewPad 10pi|ViewPad 10e|ViewPad 10s|ViewPad E72|ViewPad7|ViewPad E100|ViewPad 7e|ViewSonic VB733|VB100a",OdysTablet:"LOOX|XENO10|ODYS[ -](Space|EVO|Xpress|NOON)|\\bXELIO\\b|Xelio10Pro|XELIO7PHONETAB|XELIO10EXTREME|XELIOPT2|NEO_QUAD10",CaptivaTablet:"CAPTIVA PAD",IconbitTablet:"NetTAB|NT-3702|NT-3702S|NT-3702S|NT-3603P|NT-3603P|NT-0704S|NT-0704S|NT-3805C|NT-3805C|NT-0806C|NT-0806C|NT-0909T|NT-0909T|NT-0907S|NT-0907S|NT-0902S|NT-0902S",TeclastTablet:"T98 4G|\\bP80\\b|\\bX90HD\\b|X98 Air|X98 Air 3G|\\bX89\\b|P80 3G|\\bX80h\\b|P98 Air|\\bX89HD\\b|P98 3G|\\bP90HD\\b|P89 3G|X98 3G|\\bP70h\\b|P79HD 3G|G18d 3G|\\bP79HD\\b|\\bP89s\\b|\\bA88\\b|\\bP10HD\\b|\\bP19HD\\b|G18 3G|\\bP78HD\\b|\\bA78\\b|\\bP75\\b|G17s 3G|G17h 3G|\\bP85t\\b|\\bP90\\b|\\bP11\\b|\\bP98t\\b|\\bP98HD\\b|\\bG18d\\b|\\bP85s\\b|\\bP11HD\\b|\\bP88s\\b|\\bA80HD\\b|\\bA80se\\b|\\bA10h\\b|\\bP89\\b|\\bP78s\\b|\\bG18\\b|\\bP85\\b|\\bA70h\\b|\\bA70\\b|\\bG17\\b|\\bP18\\b|\\bA80s\\b|\\bA11s\\b|\\bP88HD\\b|\\bA80h\\b|\\bP76s\\b|\\bP76h\\b|\\bP98\\b|\\bA10HD\\b|\\bP78\\b|\\bP88\\b|\\bA11\\b|\\bA10t\\b|\\bP76a\\b|\\bP76t\\b|\\bP76e\\b|\\bP85HD\\b|\\bP85a\\b|\\bP86\\b|\\bP75HD\\b|\\bP76v\\b|\\bA12\\b|\\bP75a\\b|\\bA15\\b|\\bP76Ti\\b|\\bP81HD\\b|\\bA10\\b|\\bT760VE\\b|\\bT720HD\\b|\\bP76\\b|\\bP73\\b|\\bP71\\b|\\bP72\\b|\\bT720SE\\b|\\bC520Ti\\b|\\bT760\\b|\\bT720VE\\b|T720-3GE|T720-WiFi",OndaTablet:"\\b(V975i|Vi30|VX530|V701|Vi60|V701s|Vi50|V801s|V719|Vx610w|VX610W|V819i|Vi10|VX580W|Vi10|V711s|V813|V811|V820w|V820|Vi20|V711|VI30W|V712|V891w|V972|V819w|V820w|Vi60|V820w|V711|V813s|V801|V819|V975s|V801|V819|V819|V818|V811|V712|V975m|V101w|V961w|V812|V818|V971|V971s|V919|V989|V116w|V102w|V973|Vi40)\\b[\\s]+",JaytechTablet:"TPC-PA762",BlaupunktTablet:"Endeavour 800NG|Endeavour 1010",DigmaTablet:"\\b(iDx10|iDx9|iDx8|iDx7|iDxD7|iDxD8|iDsQ8|iDsQ7|iDsQ8|iDsD10|iDnD7|3TS804H|iDsQ11|iDj7|iDs10)\\b",EvolioTablet:"ARIA_Mini_wifi|Aria[ _]Mini|Evolio X10|Evolio X7|Evolio X8|\\bEvotab\\b|\\bNeura\\b",LavaTablet:"QPAD E704|\\bIvoryS\\b|E-TAB IVORY|\\bE-TAB\\b",AocTablet:"MW0811|MW0812|MW0922|MTK8382",CelkonTablet:"CT695|CT888|CT[\\s]?910|CT7 Tab|CT9 Tab|CT3 Tab|CT2 Tab|CT1 Tab|C820|C720|\\bCT-1\\b",WolderTablet:"miTab \\b(DIAMOND|SPACE|BROOKLYN|NEO|FLY|MANHATTAN|FUNK|EVOLUTION|SKY|GOCAR|IRON|GENIUS|POP|MINT|EPSILON|BROADWAY|JUMP|HOP|LEGEND|NEW AGE|LINE|ADVANCE|FEEL|FOLLOW|LIKE|LINK|LIVE|THINK|FREEDOM|CHICAGO|CLEVELAND|BALTIMORE-GH|IOWA|BOSTON|SEATTLE|PHOENIX|DALLAS|IN 101|MasterChef)\\b",MiTablet:"\\bMI PAD\\b|\\bHM NOTE 1W\\b",NibiruTablet:"Nibiru M1|Nibiru Jupiter One",NexoTablet:"NEXO NOVA|NEXO 10|NEXO AVIO|NEXO FREE|NEXO GO|NEXO EVO|NEXO 3G|NEXO SMART|NEXO KIDDO|NEXO MOBI",LeaderTablet:"TBLT10Q|TBLT10I|TBL-10WDKB|TBL-10WDKBO2013|TBL-W230V2|TBL-W450|TBL-W500|SV572|TBLT7I|TBA-AC7-8G|TBLT79|TBL-8W16|TBL-10W32|TBL-10WKB|TBL-W100",UbislateTablet:"UbiSlate[\\s]?7C",PocketBookTablet:"Pocketbook",Hudl:"Hudl HT7S3|Hudl 2",TelstraTablet:"T-Hub2",GenericTablet:"Android.*\\b97D\\b|Tablet(?!.*PC)|BNTV250A|MID-WCDMA|LogicPD Zoom2|\\bA7EB\\b|CatNova8|A1_07|CT704|CT1002|\\bM721\\b|rk30sdk|\\bEVOTAB\\b|M758A|ET904|ALUMIUM10|Smartfren Tab|Endeavour 1010|Tablet-PC-4|Tagi Tab|\\bM6pro\\b|CT1020W|arc 10HD|\\bJolla\\b|\\bTP750\\b"},oss:{AndroidOS:"Android",BlackBerryOS:"blackberry|\\bBB10\\b|rim tablet os",PalmOS:"PalmOS|avantgo|blazer|elaine|hiptop|palm|plucker|xiino",SymbianOS:"Symbian|SymbOS|Series60|Series40|SYB-[0-9]+|\\bS60\\b",WindowsMobileOS:"Windows CE.*(PPC|Smartphone|Mobile|[0-9]{3}x[0-9]{3})|Window Mobile|Windows Phone [0-9.]+|WCE;",WindowsPhoneOS:"Windows Phone 10.0|Windows Phone 8.1|Windows Phone 8.0|Windows Phone OS|XBLWP7|ZuneWP7|Windows NT 6.[23]; ARM;",iOS:"\\biPhone.*Mobile|\\biPod|\\biPad",MeeGoOS:"MeeGo",MaemoOS:"Maemo",JavaOS:"J2ME/|\\bMIDP\\b|\\bCLDC\\b",webOS:"webOS|hpwOS",badaOS:"\\bBada\\b",BREWOS:"BREW"},uas:{Chrome:"\\bCrMo\\b|CriOS|Android.*Chrome/[.0-9]* (Mobile)?",Dolfin:"\\bDolfin\\b",Opera:"Opera.*Mini|Opera.*Mobi|Android.*Opera|Mobile.*OPR/[0-9.]+|Coast/[0-9.]+",Skyfire:"Skyfire",IE:"IEMobile|MSIEMobile",Firefox:"fennec|firefox.*maemo|(Mobile|Tablet).*Firefox|Firefox.*Mobile",Bolt:"bolt",TeaShark:"teashark",Blazer:"Blazer",Safari:"Version.*Mobile.*Safari|Safari.*Mobile|MobileSafari",Tizen:"Tizen",UCBrowser:"UC.*Browser|UCWEB",baiduboxapp:"baiduboxapp",baidubrowser:"baidubrowser",DiigoBrowser:"DiigoBrowser",Puffin:"Puffin",Mercury:"\\bMercury\\b",ObigoBrowser:"Obigo",NetFront:"NF-Browser",GenericBrowser:"NokiaBrowser|OviBrowser|OneBrowser|TwonkyBeamBrowser|SEMC.*Browser|FlyFlow|Minimo|NetFront|Novarra-Vision|MQQBrowser|MicroMessenger"},props:{Mobile:"Mobile/[VER]",Build:"Build/[VER]",Version:"Version/[VER]",VendorID:"VendorID/[VER]",iPad:"iPad.*CPU[a-z ]+[VER]",iPhone:"iPhone.*CPU[a-z ]+[VER]",iPod:"iPod.*CPU[a-z ]+[VER]",Kindle:"Kindle/[VER]",Chrome:["Chrome/[VER]","CriOS/[VER]","CrMo/[VER]"],Coast:["Coast/[VER]"],Dolfin:"Dolfin/[VER]",Firefox:"Firefox/[VER]",Fennec:"Fennec/[VER]",IE:["IEMobile/[VER];","IEMobile [VER]","MSIE [VER];","Trident/[0-9.]+;.*rv:[VER]"],NetFront:"NetFront/[VER]",NokiaBrowser:"NokiaBrowser/[VER]",Opera:[" OPR/[VER]","Opera Mini/[VER]","Version/[VER]"],"Opera Mini":"Opera Mini/[VER]","Opera Mobi":"Version/[VER]","UC Browser":"UC Browser[VER]",MQQBrowser:"MQQBrowser/[VER]",MicroMessenger:"MicroMessenger/[VER]",baiduboxapp:"baiduboxapp/[VER]",baidubrowser:"baidubrowser/[VER]",Iron:"Iron/[VER]",Safari:["Version/[VER]","Safari/[VER]"],Skyfire:"Skyfire/[VER]",Tizen:"Tizen/[VER]",Webkit:"webkit[ /][VER]",Gecko:"Gecko/[VER]",Trident:"Trident/[VER]",Presto:"Presto/[VER]",iOS:" \\bi?OS\\b [VER][ ;]{1}",Android:"Android [VER]",BlackBerry:["BlackBerry[\\w]+/[VER]","BlackBerry.*Version/[VER]","Version/[VER]"],BREW:"BREW [VER]",Java:"Java/[VER]","Windows Phone OS":["Windows Phone OS [VER]","Windows Phone [VER]"],"Windows Phone":"Windows Phone [VER]","Windows CE":"Windows CE/[VER]","Windows NT":"Windows NT [VER]",Symbian:["SymbianOS/[VER]","Symbian/[VER]"],webOS:["webOS/[VER]","hpwOS/[VER];"]},utils:{Bot:"Googlebot|facebookexternalhit|AdsBot-Google|Google Keyword Suggestion|Facebot|YandexBot|bingbot|ia_archiver|AhrefsBot|Ezooms|GSLFbot|WBSearchBot|Twitterbot|TweetmemeBot|Twikle|PaperLiBot|Wotbox|UnwindFetchor|Exabot|MJ12bot|YandexImages|TurnitinBot|Pingdom",MobileBot:"Googlebot-Mobile|AdsBot-Google-Mobile|YahooSeeker/M1A1-R2D2",DesktopMode:"WPDesktop",TV:"SonyDTV|HbbTV",WebKit:"(webkit)[ /]([\\w.]+)",Console:"\\b(Nintendo|Nintendo WiiU|Nintendo 3DS|PLAYSTATION|Xbox)\\b",Watch:"SM-V700"}},i.detectMobileBrowsers={fullPattern:/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i,shortPattern:/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i,
tabletPattern:/android|ipad|playbook|silk/i};var s,a=Object.prototype.hasOwnProperty;return i.FALLBACK_PHONE="UnknownPhone",i.FALLBACK_TABLET="UnknownTablet",i.FALLBACK_MOBILE="UnknownMobile",s="isArray"in Array?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},function(){var e,t,n,o,u,l,c=i.mobileDetectRules;for(e in c.props)if(a.call(c.props,e)){for(t=c.props[e],s(t)||(t=[t]),u=t.length,o=0;u>o;++o)n=t[o],l=n.indexOf("[VER]"),l>=0&&(n=n.substring(0,l)+"([\\w._\\+]+)"+n.substring(l+5)),t[o]=new RegExp(n,"i");c.props[e]=t}r(c.oss),r(c.phones),r(c.tablets),r(c.uas),r(c.utils),c.oss0={WindowsPhoneOS:c.oss.WindowsPhoneOS,WindowsMobileOS:c.oss.WindowsMobileOS}}(),i.findMatch=function(e,t){for(var n in e)if(a.call(e,n)&&e[n].test(t))return n;return null},i.findMatches=function(e,t){var n=[];for(var r in e)a.call(e,r)&&e[r].test(t)&&n.push(r);return n},i.getVersionStr=function(e,t){var n,r,o,s,u=i.mobileDetectRules.props;if(a.call(u,e))for(n=u[e],o=n.length,r=0;o>r;++r)if(s=n[r].exec(t),null!==s)return s[1];return null},i.getVersion=function(e,t){var n=i.getVersionStr(e,t);return n?i.prepareVersionNo(n):NaN},i.prepareVersionNo=function(e){var t;return t=e.split(/[a-z._ \/\-]/i),1===t.length&&(e=t[0]),t.length>1&&(e=t[0]+".",t.shift(),e+=t.join("")),Number(e)},i.isMobileFallback=function(e){return i.detectMobileBrowsers.fullPattern.test(e)||i.detectMobileBrowsers.shortPattern.test(e.substr(0,4))},i.isTabletFallback=function(e){return i.detectMobileBrowsers.tabletPattern.test(e)},i.prepareDetectionCache=function(e,n,r){if(e.mobile===t){var s,a,u;return(a=i.findMatch(i.mobileDetectRules.tablets,n))?(e.mobile=e.tablet=a,void(e.phone=null)):(s=i.findMatch(i.mobileDetectRules.phones,n))?(e.mobile=e.phone=s,void(e.tablet=null)):void(i.isMobileFallback(n)?(u=o.isPhoneSized(r),u===t?(e.mobile=i.FALLBACK_MOBILE,e.tablet=e.phone=null):u?(e.mobile=e.phone=i.FALLBACK_PHONE,e.tablet=null):(e.mobile=e.tablet=i.FALLBACK_TABLET,e.phone=null)):i.isTabletFallback(n)?(e.mobile=e.tablet=i.FALLBACK_TABLET,e.phone=null):e.mobile=e.tablet=e.phone=null)}},i.mobileGrade=function(e){var t=null!==e.mobile();return e.os("iOS")&&e.version("iPad")>=4.3||e.os("iOS")&&e.version("iPhone")>=3.1||e.os("iOS")&&e.version("iPod")>=3.1||e.version("Android")>2.1&&e.is("Webkit")||e.version("Windows Phone OS")>=7||e.is("BlackBerry")&&e.version("BlackBerry")>=6||e.match("Playbook.*Tablet")||e.version("webOS")>=1.4&&e.match("Palm|Pre|Pixi")||e.match("hp.*TouchPad")||e.is("Firefox")&&e.version("Firefox")>=12||e.is("Chrome")&&e.is("AndroidOS")&&e.version("Android")>=4||e.is("Skyfire")&&e.version("Skyfire")>=4.1&&e.is("AndroidOS")&&e.version("Android")>=2.3||e.is("Opera")&&e.version("Opera Mobi")>11&&e.is("AndroidOS")||e.is("MeeGoOS")||e.is("Tizen")||e.is("Dolfin")&&e.version("Bada")>=2||(e.is("UC Browser")||e.is("Dolfin"))&&e.version("Android")>=2.3||e.match("Kindle Fire")||e.is("Kindle")&&e.version("Kindle")>=3||e.is("AndroidOS")&&e.is("NookTablet")||e.version("Chrome")>=11&&!t||e.version("Safari")>=5&&!t||e.version("Firefox")>=4&&!t||e.version("MSIE")>=7&&!t||e.version("Opera")>=10&&!t?"A":e.os("iOS")&&e.version("iPad")<4.3||e.os("iOS")&&e.version("iPhone")<3.1||e.os("iOS")&&e.version("iPod")<3.1||e.is("Blackberry")&&e.version("BlackBerry")>=5&&e.version("BlackBerry")<6||e.version("Opera Mini")>=5&&e.version("Opera Mini")<=6.5&&(e.version("Android")>=2.3||e.is("iOS"))||e.match("NokiaN8|NokiaC7|N97.*Series60|Symbian/3")||e.version("Opera Mobi")>=11&&e.is("SymbianOS")?"B":(e.version("BlackBerry")<5||e.match("MSIEMobile|Windows CE.*Mobile")||e.version("Windows Mobile")<=5.2,"C")},i.detectOS=function(e){return i.findMatch(i.mobileDetectRules.oss0,e)||i.findMatch(i.mobileDetectRules.oss,e)},i.getDeviceSmallerSide=function(){return window.screen.width<window.screen.height?window.screen.width:window.screen.height},o.prototype={constructor:o,mobile:function(){return i.prepareDetectionCache(this._cache,this.ua,this.maxPhoneWidth),this._cache.mobile},phone:function(){return i.prepareDetectionCache(this._cache,this.ua,this.maxPhoneWidth),this._cache.phone},tablet:function(){return i.prepareDetectionCache(this._cache,this.ua,this.maxPhoneWidth),this._cache.tablet},userAgent:function(){return this._cache.userAgent===t&&(this._cache.userAgent=i.findMatch(i.mobileDetectRules.uas,this.ua)),this._cache.userAgent},userAgents:function(){return this._cache.userAgents===t&&(this._cache.userAgents=i.findMatches(i.mobileDetectRules.uas,this.ua)),this._cache.userAgents},os:function(){return this._cache.os===t&&(this._cache.os=i.detectOS(this.ua)),this._cache.os},version:function(e){return i.getVersion(e,this.ua)},versionStr:function(e){return i.getVersionStr(e,this.ua)},is:function(t){return n(this.userAgents(),t)||e(t,this.os())||e(t,this.phone())||e(t,this.tablet())||n(i.findMatches(i.mobileDetectRules.utils,this.ua),t)},match:function(e){return e instanceof RegExp||(e=new RegExp(e,"i")),e.test(this.ua)},isPhoneSized:function(e){return o.isPhoneSized(e||this.maxPhoneWidth)},mobileGrade:function(){return this._cache.grade===t&&(this._cache.grade=i.mobileGrade(this)),this._cache.grade}},"undefined"!=typeof window&&window.screen?o.isPhoneSized=function(e){return 0>e?t:i.getDeviceSmallerSide()<=e}:o.isPhoneSized=function(){},o._impl=i,o})}(function(e){if("undefined"!=typeof t&&t.exports)return function(e){t.exports=e()};if("function"==typeof define&&define.amd)return define;if("undefined"!=typeof window)return function(e){window.MobileDetect=e()};throw new Error("unknown environment")}())}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/mobile-detect/mobile-detect.js","/node_modules/mobile-detect")},{_process:43,buffer:3}],"object-assign":[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){"use strict";function c(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function f(e){var t=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(e))),t.filter(function(t){return d.call(e,t)})}var d=Object.prototype.propertyIsEnumerable;t.exports=Object.assign||function(e,t){for(var n,r,o=c(e),i=1;i<arguments.length;i++){n=arguments[i],r=f(Object(n));for(var s=0;s<r.length;s++)o[r[s]]=n[r[s]]}return o}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/object-assign/index.js","/node_modules/object-assign")},{_process:43,buffer:3}],"react-mixin":[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){function f(e){var t=e.getDefaultProps;t&&(e.defaultProps=t(),delete e.getDefaultProps)}function d(e){function t(e){var t=e.state||{};m(t,n.call(e)),e.state=t}var n=e.getInitialState,r=e.componentWillMount;n&&(r?e.componentWillMount=function(){t(this),r.call(this)}:e.componentWillMount=function(){t(this)},delete e.getInitialState)}function p(e,t){f(t),d(t);var n={},r={};Object.keys(t).forEach(function(e){"mixins"!==e&&"statics"!==e&&("function"==typeof t[e]?n[e]=t[e]:r[e]=t[e])}),g(e.prototype,n);var o=function(e,t,n){if(!e)return t;if(!t)return e;var r={};return Object.keys(e).forEach(function(n){t[n]||(r[n]=e[n])}),Object.keys(t).forEach(function(n){e[n]?r[n]=function(){return t[n].apply(this,arguments)&&e[n].apply(this,arguments)}:r[n]=t[n]}),r};return h({childContextTypes:o,contextTypes:o,propTypes:h.MANY_MERGED_LOOSE,defaultProps:h.MANY_MERGED_LOOSE})(e,r),t.statics&&Object.getOwnPropertyNames(t.statics).forEach(function(n){var r=e[n],o=t.statics[n];if(void 0!==r&&void 0!==o)throw new TypeError("Cannot mixin statics because statics."+n+" and Component."+n+" are defined.");e[n]=void 0!==r?r:o}),t.mixins&&t.mixins.reverse().forEach(p.bind(null,e)),e}var h=e("smart-mixin"),m=e("object-assign"),g=h({componentDidMount:h.MANY,componentWillMount:h.MANY,componentWillReceiveProps:h.MANY,shouldComponentUpdate:h.ONCE,componentWillUpdate:h.MANY,componentDidUpdate:h.MANY,componentWillUnmount:h.MANY,getChildContext:h.MANY_MERGED});t.exports=function(){var e=g;return e.onClass=function(e,t){return p(e,t)},e.decorate=function(t){return function(n){return e.onClass(n,t)}},e}()}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react-mixin/index.js","/node_modules/react-mixin")},{_process:43,buffer:3,"object-assign":"object-assign","smart-mixin":203}],react:[function(e,t,n){(function(n,r,o,i,s,a,u,l,c){t.exports=e("./lib/React")}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/react/react.js","/node_modules/react")},{"./lib/React":73,_process:43,buffer:3}],"wheel-inertia":[function(e,t,n){(function(e,n,r,o,i,s,a,u,l){function c(e){d()&&(h=10,y++,m=e>0?1:-1,g(m)),p.shift(),p.push(Math.abs(e))}function f(e){g=e}function d(){return h>0?(h--,!1):null==p[0]?!1:p[0]<p[4]&&p[1]<=p[4]&&p[2]<=p[4]&&p[3]<=p[4]&&p[5]<=p[4]&&p[6]<=p[4]&&p[7]<=p[4]&&p[8]<p[4]?!0:!1}t.exports={addCallback:f,update:c};var p=[null,null,null,null,null,null,null,null,null],h=0,m=void 0,g=void 0,y=0}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/wheel-inertia/index.js","/node_modules/wheel-inertia")},{_process:43,buffer:3}]},{},[]); | return this}return(t===!1||"function"==typeof t)&&(n=t,t=void 0),n===!1&&(n=h),this.each(function(){ie.event.remove(this,e,n,t)})}});var Ve=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,Ue=/<script|<style|<link/i,Fe=/checked\s*(?:[^=]|=\s*.checked.)/i,We=/^true\/(.*)/,qe=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;ie.extend({htmlPrefilter:function(e){return e.replace(Ve,"<$1></$2>")},clone:function(e,t,n){var r,o,i,s,a=e.cloneNode(!0),u=ie.contains(e.ownerDocument,e);if(!(re.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||ie.isXMLDoc(e)))for(s=c(a),i=c(e),r=0,o=i.length;o>r;r++)w(i[r],s[r]);if(t)if(n)for(i=i||c(e),s=s||c(a),r=0,o=i.length;o>r;r++)_(i[r],s[r]);else _(e,a);return s=c(a,"script"),s.length>0&&f(s,!u&&c(e,"script")),a},cleanData:function(e){for(var t,n,r,o=ie.event.special,i=0;void 0!==(n=e[i]);i++)if(xe(n)){if(t=n[Se.expando]){if(t.events)for(r in t.events)o[r]?ie.event.remove(n,r):ie.removeEvent(n,r,t.handle);n[Se.expando]=void 0}n[Ce.expando]&&(n[Ce.expando]=void 0)}}}),ie.fn.extend({domManip:T,detach:function(e){return E(this,e,!0)},remove:function(e){return E(this,e)},text:function(e){return Ee(this,function(e){return void 0===e?ie.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=e)})},null,e,arguments.length)},append:function(){return T(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=y(this,e);t.appendChild(e)}})},prepend:function(){return T(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=y(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return T(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return T(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(ie.cleanData(c(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return ie.clone(this,e,t)})},html:function(e){return Ee(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ue.test(e)&&!ke[(Ie.exec(e)||["",""])[1].toLowerCase()]){e=ie.htmlPrefilter(e);try{for(;r>n;n++)t=this[n]||{},1===t.nodeType&&(ie.cleanData(c(t,!1)),t.innerHTML=e);t=0}catch(o){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return T(this,arguments,function(t){var n=this.parentNode;ie.inArray(this,e)<0&&(ie.cleanData(c(this)),n&&n.replaceChild(t,this))},e)}}),ie.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){ie.fn[e]=function(e){for(var n,r=[],o=ie(e),i=o.length-1,s=0;i>=s;s++)n=s===i?this:this.clone(!0),ie(o[s])[t](n),Z.apply(r,n.get());return this.pushStack(r)}});var Xe,ze={HTML:"block",BODY:"block"},Ye=/^margin/,Ke=new RegExp("^("+Re+")(?!px)[a-z%]+$","i"),Qe=function(t){var n=t.ownerDocument.defaultView;return n.opener||(n=e),n.getComputedStyle(t)},$e=function(e,t,n,r){var o,i,s={};for(i in t)s[i]=e.style[i],e.style[i]=t[i];o=n.apply(e,r||[]);for(i in t)e.style[i]=s[i];return o},Ze=K.documentElement;!function(){function t(){a.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",a.innerHTML="",Ze.appendChild(s);var t=e.getComputedStyle(a);n="1%"!==t.top,i="2px"===t.marginLeft,r="4px"===t.width,a.style.marginRight="50%",o="4px"===t.marginRight,Ze.removeChild(s)}var n,r,o,i,s=K.createElement("div"),a=K.createElement("div");a.style&&(a.style.backgroundClip="content-box",a.cloneNode(!0).style.backgroundClip="",re.clearCloneStyle="content-box"===a.style.backgroundClip,s.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",s.appendChild(a),ie.extend(re,{pixelPosition:function(){return t(),n},boxSizingReliable:function(){return null==r&&t(),r},pixelMarginRight:function(){return null==r&&t(),o},reliableMarginLeft:function(){return null==r&&t(),i},reliableMarginRight:function(){var t,n=a.appendChild(K.createElement("div"));return n.style.cssText=a.style.cssText="-webkit-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",n.style.marginRight=n.style.width="0",a.style.width="1px",Ze.appendChild(s),t=!parseFloat(e.getComputedStyle(n).marginRight),Ze.removeChild(s),a.removeChild(n),t}}))}();var Je=/^(none|table(?!-c[ea]).+)/,et={position:"absolute",visibility:"hidden",display:"block"},tt={letterSpacing:"0",fontWeight:"400"},nt=["Webkit","O","Moz","ms"],rt=K.createElement("div").style;ie.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=C(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,i,s,a=ie.camelCase(t),u=e.style;return t=ie.cssProps[a]||(ie.cssProps[a]=M(a)||a),s=ie.cssHooks[t]||ie.cssHooks[a],void 0===n?s&&"get"in s&&void 0!==(o=s.get(e,!1,r))?o:u[t]:(i=typeof n,"string"===i&&(o=De.exec(n))&&o[1]&&(n=l(e,t,o),i="number"),null!=n&&n===n&&("number"===i&&(n+=o&&o[3]||(ie.cssNumber[a]?"":"px")),re.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),s&&"set"in s&&void 0===(n=s.set(e,n,r))||(u[t]=n)),void 0)}},css:function(e,t,n,r){var o,i,s,a=ie.camelCase(t);return t=ie.cssProps[a]||(ie.cssProps[a]=M(a)||a),s=ie.cssHooks[t]||ie.cssHooks[a],s&&"get"in s&&(o=s.get(e,!0,n)),void 0===o&&(o=C(e,t,r)),"normal"===o&&t in tt&&(o=tt[t]),""===n||n?(i=parseFloat(o),n===!0||isFinite(i)?i||0:o):o}}),ie.each(["height","width"],function(e,t){ie.cssHooks[t]={get:function(e,n,r){return n?Je.test(ie.css(e,"display"))&&0===e.offsetWidth?$e(e,et,function(){return O(e,t,r)}):O(e,t,r):void 0},set:function(e,n,r){var o,i=r&&Qe(e),s=r&&D(e,t,r,"border-box"===ie.css(e,"boxSizing",!1,i),i);return s&&(o=De.exec(n))&&"px"!==(o[3]||"px")&&(e.style[t]=n,n=ie.css(e,t)),R(e,n,s)}}}),ie.cssHooks.marginLeft=P(re.reliableMarginLeft,function(e,t){return t?(parseFloat(C(e,"marginLeft"))||e.getBoundingClientRect().left-$e(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px":void 0}),ie.cssHooks.marginRight=P(re.reliableMarginRight,function(e,t){return t?$e(e,{display:"inline-block"},C,[e,"marginRight"]):void 0}),ie.each({margin:"",padding:"",border:"Width"},function(e,t){ie.cssHooks[e+t]={expand:function(n){for(var r=0,o={},i="string"==typeof n?n.split(" "):[n];4>r;r++)o[e+Oe[r]+t]=i[r]||i[r-2]||i[0];return o}},Ye.test(e)||(ie.cssHooks[e+t].set=R)}),ie.fn.extend({css:function(e,t){return Ee(this,function(e,t,n){var r,o,i={},s=0;if(ie.isArray(t)){for(r=Qe(e),o=t.length;o>s;s++)i[t[s]]=ie.css(e,t[s],!1,r);return i}return void 0!==n?ie.style(e,t,n):ie.css(e,t)},e,t,arguments.length>1)},show:function(){return N(this,!0)},hide:function(){return N(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Ne(this)?ie(this).show():ie(this).hide()})}}),ie.Tween=A,A.prototype={constructor:A,init:function(e,t,n,r,o,i){this.elem=e,this.prop=n,this.easing=o||ie.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=i||(ie.cssNumber[n]?"":"px")},cur:function(){var e=A.propHooks[this.prop];return e&&e.get?e.get(this):A.propHooks._default.get(this)},run:function(e){var t,n=A.propHooks[this.prop];return this.options.duration?this.pos=t=ie.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):A.propHooks._default.set(this),this}},A.prototype.init.prototype=A.prototype,A.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=ie.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){ie.fx.step[e.prop]?ie.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[ie.cssProps[e.prop]]&&!ie.cssHooks[e.prop]?e.elem[e.prop]=e.now:ie.style(e.elem,e.prop,e.now+e.unit)}}},A.propHooks.scrollTop=A.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},ie.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},ie.fx=A.prototype.init,ie.fx.step={};var ot,it,st=/^(?:toggle|show|hide)$/,at=/queueHooks$/;ie.Animation=ie.extend(G,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return l(n.elem,e,De.exec(t),n),n}]},tweener:function(e,t){ie.isFunction(e)?(t=e,e=["*"]):e=e.match(we);for(var n,r=0,o=e.length;o>r;r++)n=e[r],G.tweeners[n]=G.tweeners[n]||[],G.tweeners[n].unshift(t)},prefilters:[L],prefilter:function(e,t){t?G.prefilters.unshift(e):G.prefilters.push(e)}}),ie.speed=function(e,t,n){var r=e&&"object"==typeof e?ie.extend({},e):{complete:n||!n&&t||ie.isFunction(e)&&e,duration:e,easing:n&&t||t&&!ie.isFunction(t)&&t};return r.duration=ie.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in ie.fx.speeds?ie.fx.speeds[r.duration]:ie.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){ie.isFunction(r.old)&&r.old.call(this),r.queue&&ie.dequeue(this,r.queue)},r},ie.fn.extend({fadeTo:function(e,t,n,r){return this.filter(Ne).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var o=ie.isEmptyObject(e),i=ie.speed(t,n,r),s=function(){var t=G(this,ie.extend({},e),i);(o||Se.get(this,"finish"))&&t.stop(!0)};return s.finish=s,o||i.queue===!1?this.each(s):this.queue(i.queue,s)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,o=null!=e&&e+"queueHooks",i=ie.timers,s=Se.get(this);if(o)s[o]&&s[o].stop&&r(s[o]);else for(o in s)s[o]&&s[o].stop&&at.test(o)&&r(s[o]);for(o=i.length;o--;)i[o].elem!==this||null!=e&&i[o].queue!==e||(i[o].anim.stop(n),t=!1,i.splice(o,1));(t||!n)&&ie.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=Se.get(this),r=n[e+"queue"],o=n[e+"queueHooks"],i=ie.timers,s=r?r.length:0;for(n.finish=!0,ie.queue(this,e,[]),o&&o.stop&&o.stop.call(this,!0),t=i.length;t--;)i[t].elem===this&&i[t].queue===e&&(i[t].anim.stop(!0),i.splice(t,1));for(t=0;s>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),ie.each(["toggle","show","hide"],function(e,t){var n=ie.fn[t];ie.fn[t]=function(e,r,o){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(B(t,!0),e,r,o)}}),ie.each({slideDown:B("show"),slideUp:B("hide"),slideToggle:B("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){ie.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),ie.timers=[],ie.fx.tick=function(){var e,t=0,n=ie.timers;for(ot=ie.now();t<n.length;t++)e=n[t],e()||n[t]!==e||n.splice(t--,1);n.length||ie.fx.stop(),ot=void 0},ie.fx.timer=function(e){ie.timers.push(e),e()?ie.fx.start():ie.timers.pop()},ie.fx.interval=13,ie.fx.start=function(){it||(it=e.setInterval(ie.fx.tick,ie.fx.interval))},ie.fx.stop=function(){e.clearInterval(it),it=null},ie.fx.speeds={slow:600,fast:200,_default:400},ie.fn.delay=function(t,n){return t=ie.fx?ie.fx.speeds[t]||t:t,n=n||"fx",this.queue(n,function(n,r){var o=e.setTimeout(n,t);r.stop=function(){e.clearTimeout(o)}})},function(){var e=K.createElement("input"),t=K.createElement("select"),n=t.appendChild(K.createElement("option"));e.type="checkbox",re.checkOn=""!==e.value,re.optSelected=n.selected,t.disabled=!0,re.optDisabled=!n.disabled,e=K.createElement("input"),e.value="t",e.type="radio",re.radioValue="t"===e.value}();var ut,lt=ie.expr.attrHandle;ie.fn.extend({attr:function(e,t){return Ee(this,ie.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){ie.removeAttr(this,e)})}}),ie.extend({attr:function(e,t,n){var r,o,i=e.nodeType;if(3!==i&&8!==i&&2!==i)return"undefined"==typeof e.getAttribute?ie.prop(e,t,n):(1===i&&ie.isXMLDoc(e)||(t=t.toLowerCase(),o=ie.attrHooks[t]||(ie.expr.match.bool.test(t)?ut:void 0)),void 0!==n?null===n?void ie.removeAttr(e,t):o&&"set"in o&&void 0!==(r=o.set(e,n,t))?r:(e.setAttribute(t,n+""),n):o&&"get"in o&&null!==(r=o.get(e,t))?r:(r=ie.find.attr(e,t),null==r?void 0:r))},attrHooks:{type:{set:function(e,t){if(!re.radioValue&&"radio"===t&&ie.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r,o=0,i=t&&t.match(we);if(i&&1===e.nodeType)for(;n=i[o++];)r=ie.propFix[n]||n,ie.expr.match.bool.test(n)&&(e[r]=!1),e.removeAttribute(n)}}),ut={set:function(e,t,n){return t===!1?ie.removeAttr(e,n):e.setAttribute(n,n),n}},ie.each(ie.expr.match.bool.source.match(/\w+/g),function(e,t){var n=lt[t]||ie.find.attr;lt[t]=function(e,t,r){var o,i;return r||(i=lt[t],lt[t]=o,o=null!=n(e,t,r)?t.toLowerCase():null,lt[t]=i),o}});var ct=/^(?:input|select|textarea|button)$/i,ft=/^(?:a|area)$/i;ie.fn.extend({prop:function(e,t){return Ee(this,ie.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[ie.propFix[e]||e]})}}),ie.extend({prop:function(e,t,n){var r,o,i=e.nodeType;if(3!==i&&8!==i&&2!==i)return 1===i&&ie.isXMLDoc(e)||(t=ie.propFix[t]||t,o=ie.propHooks[t]),void 0!==n?o&&"set"in o&&void 0!==(r=o.set(e,n,t))?r:e[t]=n:o&&"get"in o&&null!==(r=o.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=ie.find.attr(e,"tabindex");return t?parseInt(t,10):ct.test(e.nodeName)||ft.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),re.optSelected||(ie.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null}}),ie.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){ie.propFix[this.toLowerCase()]=this});var dt=/[\t\r\n\f]/g;ie.fn.extend({addClass:function(e){var t,n,r,o,i,s,a,u=0;if(ie.isFunction(e))return this.each(function(t){ie(this).addClass(e.call(this,t,H(this)))});if("string"==typeof e&&e)for(t=e.match(we)||[];n=this[u++];)if(o=H(n),r=1===n.nodeType&&(" "+o+" ").replace(dt," ")){for(s=0;i=t[s++];)r.indexOf(" "+i+" ")<0&&(r+=i+" ");a=ie.trim(r),o!==a&&n.setAttribute("class",a)}return this},removeClass:function(e){var t,n,r,o,i,s,a,u=0;if(ie.isFunction(e))return this.each(function(t){ie(this).removeClass(e.call(this,t,H(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(we)||[];n=this[u++];)if(o=H(n),r=1===n.nodeType&&(" "+o+" ").replace(dt," ")){for(s=0;i=t[s++];)for(;r.indexOf(" "+i+" ")>-1;)r=r.replace(" "+i+" "," ");a=ie.trim(r),o!==a&&n.setAttribute("class",a)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):ie.isFunction(e)?this.each(function(n){ie(this).toggleClass(e.call(this,n,H(this),t),t)}):this.each(function(){var t,r,o,i;if("string"===n)for(r=0,o=ie(this),i=e.match(we)||[];t=i[r++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else(void 0===e||"boolean"===n)&&(t=H(this),t&&Se.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||e===!1?"":Se.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+H(n)+" ").replace(dt," ").indexOf(t)>-1)return!0;return!1}});var pt=/\r/g;ie.fn.extend({val:function(e){var t,n,r,o=this[0];{if(arguments.length)return r=ie.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(o=r?e.call(this,n,ie(this).val()):e,null==o?o="":"number"==typeof o?o+="":ie.isArray(o)&&(o=ie.map(o,function(e){return null==e?"":e+""})),t=ie.valHooks[this.type]||ie.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,o,"value")||(this.value=o))});if(o)return t=ie.valHooks[o.type]||ie.valHooks[o.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(o,"value"))?n:(n=o.value,"string"==typeof n?n.replace(pt,""):null==n?"":n)}}}),ie.extend({valHooks:{option:{get:function(e){return ie.trim(e.value)}},select:{get:function(e){for(var t,n,r=e.options,o=e.selectedIndex,i="select-one"===e.type||0>o,s=i?null:[],a=i?o+1:r.length,u=0>o?a:i?o:0;a>u;u++)if(n=r[u],(n.selected||u===o)&&(re.optDisabled?!n.disabled:null===n.getAttribute("disabled"))&&(!n.parentNode.disabled||!ie.nodeName(n.parentNode,"optgroup"))){if(t=ie(n).val(),i)return t;s.push(t)}return s},set:function(e,t){for(var n,r,o=e.options,i=ie.makeArray(t),s=o.length;s--;)r=o[s],(r.selected=ie.inArray(ie.valHooks.option.get(r),i)>-1)&&(n=!0);return n||(e.selectedIndex=-1),i}}}}),ie.each(["radio","checkbox"],function(){ie.valHooks[this]={set:function(e,t){return ie.isArray(t)?e.checked=ie.inArray(ie(e).val(),t)>-1:void 0}},re.checkOn||(ie.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var ht=/^(?:focusinfocus|focusoutblur)$/;ie.extend(ie.event,{trigger:function(t,n,r,o){var i,s,a,u,l,c,f,d=[r||K],p=ne.call(t,"type")?t.type:t,h=ne.call(t,"namespace")?t.namespace.split("."):[];if(s=a=r=r||K,3!==r.nodeType&&8!==r.nodeType&&!ht.test(p+ie.event.triggered)&&(p.indexOf(".")>-1&&(h=p.split("."),p=h.shift(),h.sort()),l=p.indexOf(":")<0&&"on"+p,t=t[ie.expando]?t:new ie.Event(p,"object"==typeof t&&t),t.isTrigger=o?2:3,t.namespace=h.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:ie.makeArray(n,[t]),f=ie.event.special[p]||{},o||!f.trigger||f.trigger.apply(r,n)!==!1)){if(!o&&!f.noBubble&&!ie.isWindow(r)){for(u=f.delegateType||p,ht.test(u+p)||(s=s.parentNode);s;s=s.parentNode)d.push(s),a=s;a===(r.ownerDocument||K)&&d.push(a.defaultView||a.parentWindow||e)}for(i=0;(s=d[i++])&&!t.isPropagationStopped();)t.type=i>1?u:f.bindType||p,c=(Se.get(s,"events")||{})[t.type]&&Se.get(s,"handle"),c&&c.apply(s,n),c=l&&s[l],c&&c.apply&&xe(s)&&(t.result=c.apply(s,n),t.result===!1&&t.preventDefault());return t.type=p,o||t.isDefaultPrevented()||f._default&&f._default.apply(d.pop(),n)!==!1||!xe(r)||l&&ie.isFunction(r[p])&&!ie.isWindow(r)&&(a=r[l],a&&(r[l]=null),ie.event.triggered=p,r[p](),ie.event.triggered=void 0,a&&(r[l]=a)),t.result}},simulate:function(e,t,n){var r=ie.extend(new ie.Event,n,{type:e,isSimulated:!0});ie.event.trigger(r,null,t),r.isDefaultPrevented()&&n.preventDefault()}}),ie.fn.extend({trigger:function(e,t){return this.each(function(){ie.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];return n?ie.event.trigger(e,t,n,!0):void 0}}),ie.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){ie.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),ie.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),re.focusin="onfocusin"in e,re.focusin||ie.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){ie.event.simulate(t,e.target,ie.event.fix(e))};ie.event.special[t]={setup:function(){var r=this.ownerDocument||this,o=Se.access(r,t);o||r.addEventListener(e,n,!0),Se.access(r,t,(o||0)+1)},teardown:function(){var r=this.ownerDocument||this,o=Se.access(r,t)-1;o?Se.access(r,t,o):(r.removeEventListener(e,n,!0),Se.remove(r,t))}}});var mt=e.location,gt=ie.now(),yt=/\?/;ie.parseJSON=function(e){return JSON.parse(e+"")},ie.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(r){n=void 0}return(!n||n.getElementsByTagName("parsererror").length)&&ie.error("Invalid XML: "+t),n};var vt=/#.*$/,bt=/([?&])_=[^&]*/,_t=/^(.*?):[ \t]*([^\r\n]*)$/gm,wt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Tt=/^(?:GET|HEAD)$/,Et=/^\/\//,xt={},St={},Ct="*/".concat("*"),Pt=K.createElement("a");Pt.href=mt.href,ie.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:mt.href,type:"GET",isLocal:wt.test(mt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ct,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":ie.parseJSON,"text xml":ie.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?F(F(e,ie.ajaxSettings),t):F(ie.ajaxSettings,e)},ajaxPrefilter:V(xt),ajaxTransport:V(St),ajax:function(t,n){function r(t,n,r,a){var l,f,v,b,w,E=n;2!==_&&(_=2,u&&e.clearTimeout(u),o=void 0,s=a||"",T.readyState=t>0?4:0,l=t>=200&&300>t||304===t,r&&(b=W(d,T,r)),b=q(d,b,T,l),l?(d.ifModified&&(w=T.getResponseHeader("Last-Modified"),w&&(ie.lastModified[i]=w),w=T.getResponseHeader("etag"),w&&(ie.etag[i]=w)),204===t||"HEAD"===d.type?E="nocontent":304===t?E="notmodified":(E=b.state,f=b.data,v=b.error,l=!v)):(v=E,(t||!E)&&(E="error",0>t&&(t=0))),T.status=t,T.statusText=(n||E)+"",l?m.resolveWith(p,[f,E,T]):m.rejectWith(p,[T,E,v]),T.statusCode(y),y=void 0,c&&h.trigger(l?"ajaxSuccess":"ajaxError",[T,d,l?f:v]),g.fireWith(p,[T,E]),c&&(h.trigger("ajaxComplete",[T,d]),--ie.active||ie.event.trigger("ajaxStop")))}"object"==typeof t&&(n=t,t=void 0),n=n||{};var o,i,s,a,u,l,c,f,d=ie.ajaxSetup({},n),p=d.context||d,h=d.context&&(p.nodeType||p.jquery)?ie(p):ie.event,m=ie.Deferred(),g=ie.Callbacks("once memory"),y=d.statusCode||{},v={},b={},_=0,w="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(2===_){if(!a)for(a={};t=_t.exec(s);)a[t[1].toLowerCase()]=t[2];t=a[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===_?s:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return _||(e=b[n]=b[n]||e,v[e]=t),this},overrideMimeType:function(e){return _||(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>_)for(t in e)y[t]=[y[t],e[t]];else T.always(e[T.status]);return this},abort:function(e){var t=e||w;return o&&o.abort(t),r(0,t),this}};if(m.promise(T).complete=g.add,T.success=T.done,T.error=T.fail,d.url=((t||d.url||mt.href)+"").replace(vt,"").replace(Et,mt.protocol+"//"),d.type=n.method||n.type||d.method||d.type,d.dataTypes=ie.trim(d.dataType||"*").toLowerCase().match(we)||[""],null==d.crossDomain){l=K.createElement("a");try{l.href=d.url,l.href=l.href,d.crossDomain=Pt.protocol+"//"+Pt.host!=l.protocol+"//"+l.host}catch(E){d.crossDomain=!0}}if(d.data&&d.processData&&"string"!=typeof d.data&&(d.data=ie.param(d.data,d.traditional)),U(xt,d,n,T),2===_)return T;c=ie.event&&d.global,c&&0===ie.active++&&ie.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!Tt.test(d.type),i=d.url,d.hasContent||(d.data&&(i=d.url+=(yt.test(i)?"&":"?")+d.data,delete d.data),d.cache===!1&&(d.url=bt.test(i)?i.replace(bt,"$1_="+gt++):i+(yt.test(i)?"&":"?")+"_="+gt++)),d.ifModified&&(ie.lastModified[i]&&T.setRequestHeader("If-Modified-Since",ie.lastModified[i]),ie.etag[i]&&T.setRequestHeader("If-None-Match",ie.etag[i])),(d.data&&d.hasContent&&d.contentType!==!1||n.contentType)&&T.setRequestHeader("Content-Type",d.contentType),T.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+Ct+"; q=0.01":""):d.accepts["*"]);for(f in d.headers)T.setRequestHeader(f,d.headers[f]);if(d.beforeSend&&(d.beforeSend.call(p,T,d)===!1||2===_))return T.abort();w="abort";for(f in{success:1,error:1,complete:1})T[f](d[f]);if(o=U(St,d,n,T)){if(T.readyState=1,c&&h.trigger("ajaxSend",[T,d]),2===_)return T;d.async&&d.timeout>0&&(u=e.setTimeout(function(){T.abort("timeout")},d.timeout));try{_=1,o.send(v,r)}catch(E){if(!(2>_))throw E;r(-1,E)}}else r(-1,"No Transport");return T},getJSON:function(e,t,n){return ie.get(e,t,n,"json")},getScript:function(e,t){return ie.get(e,void 0,t,"script")}}),ie.each(["get","post"],function(e,t){ie[t]=function(e,n,r,o){return ie.isFunction(n)&&(o=o||r,r=n,n=void 0),ie.ajax(ie.extend({url:e,type:t,dataType:o,data:n,success:r},ie.isPlainObject(e)&&e))}}),ie._evalUrl=function(e){return ie.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},ie.fn.extend({wrapAll:function(e){var t;return ie.isFunction(e)?this.each(function(t){ie(this).wrapAll(e.call(this,t))}):(this[0]&&(t=ie(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this)},wrapInner:function(e){return ie.isFunction(e)?this.each(function(t){ie(this).wrapInner(e.call(this,t))}):this.each(function(){var t=ie(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=ie.isFunction(e);return this.each(function(n){ie(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){ie.nodeName(this,"body")||ie(this).replaceWith(this.childNodes)}).end()}}),ie.expr.filters.hidden=function(e){return!ie.expr.filters.visible(e)},ie.expr.filters.visible=function(e){return e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0};var Mt=/%20/g,Rt=/\[\]$/,Dt=/\r?\n/g,Ot=/^(?:submit|button|image|reset|file)$/i,Nt=/^(?:input|select|textarea|keygen)/i;ie.param=function(e,t){var n,r=[],o=function(e,t){t=ie.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=ie.ajaxSettings&&ie.ajaxSettings.traditional),ie.isArray(e)||e.jquery&&!ie.isPlainObject(e))ie.each(e,function(){o(this.name,this.value)});else for(n in e)X(n,e[n],t,o);return r.join("&").replace(Mt,"+")},ie.fn.extend({serialize:function(){return ie.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=ie.prop(this,"elements");return e?ie.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!ie(this).is(":disabled")&&Nt.test(this.nodeName)&&!Ot.test(e)&&(this.checked||!Ae.test(e))}).map(function(e,t){var n=ie(this).val();return null==n?null:ie.isArray(n)?ie.map(n,function(e){return{name:t.name,value:e.replace(Dt,"\r\n")}}):{name:t.name,value:n.replace(Dt,"\r\n")}}).get()}}),ie.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(t){}};var At={0:200,1223:204},It=ie.ajaxSettings.xhr();re.cors=!!It&&"withCredentials"in It,re.ajax=It=!!It,ie.ajaxTransport(function(t){var n,r;return re.cors||It&&!t.crossDomain?{send:function(o,i){var s,a=t.xhr();if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(s in t.xhrFields)a[s]=t.xhrFields[s];t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||o["X-Requested-With"]||(o["X-Requested-With"]="XMLHttpRequest");for(s in o)a.setRequestHeader(s,o[s]);n=function(e){return function(){n&&(n=r=a.onload=a.onerror=a.onabort=a.onreadystatechange=null,"abort"===e?a.abort():"error"===e?"number"!=typeof a.status?i(0,"error"):i(a.status,a.statusText):i(At[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=n(),r=a.onerror=n("error"),void 0!==a.onabort?a.onabort=r:a.onreadystatechange=function(){4===a.readyState&&e.setTimeout(function(){n&&r()})},n=n("abort");try{a.send(t.hasContent&&t.data||null)}catch(u){if(n)throw u}},abort:function(){n&&n()}}:void 0}),ie.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return ie.globalEval(e),e}}}),ie.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),ie.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,o){t=ie("<script>").prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&o("error"===e.type?404:200,e.type)}),K.head.appendChild(t[0])},abort:function(){n&&n()}}}});var Bt=[],kt=/(=)\?(?=&|$)|\?\?/;ie.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Bt.pop()||ie.expando+"_"+gt++;return this[e]=!0,e}}),ie.ajaxPrefilter("json jsonp",function(t,n,r){var o,i,s,a=t.jsonp!==!1&&(kt.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&kt.test(t.data)&&"data");return a||"jsonp"===t.dataTypes[0]?(o=t.jsonpCallback=ie.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(kt,"$1"+o):t.jsonp!==!1&&(t.url+=(yt.test(t.url)?"&":"?")+t.jsonp+"="+o),t.converters["script json"]=function(){return s||ie.error(o+" was not called"),s[0]},t.dataTypes[0]="json",i=e[o],e[o]=function(){s=arguments},r.always(function(){void 0===i?ie(e).removeProp(o):e[o]=i,t[o]&&(t.jsonpCallback=n.jsonpCallback,Bt.push(o)),s&&ie.isFunction(i)&&i(s[0]),s=i=void 0}),"script"):void 0}),re.createHTMLDocument=function(){var e=K.implementation.createHTMLDocument("").body;return e.innerHTML="<form></form><form></form>",2===e.childNodes.length}(),ie.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||(re.createHTMLDocument?K.implementation.createHTMLDocument(""):K);var r=he.exec(e),o=!n&&[];return r?[t.createElement(r[1])]:(r=d([e],t,o),o&&o.length&&ie(o).remove(),ie.merge([],r.childNodes))};var Lt=ie.fn.load;ie.fn.load=function(e,t,n){if("string"!=typeof e&&Lt)return Lt.apply(this,arguments);var r,o,i,s=this,a=e.indexOf(" ");return a>-1&&(r=ie.trim(e.slice(a)),e=e.slice(0,a)),ie.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(o="POST"),s.length>0&&ie.ajax({url:e,type:o||"GET",dataType:"html",data:t}).done(function(e){i=arguments,s.html(r?ie("<div>").append(ie.parseHTML(e)).find(r):e)}).always(n&&function(e,t){s.each(function(){n.apply(s,i||[e.responseText,t,e])})}),this},ie.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){ie.fn[t]=function(e){return this.on(t,e)}}),ie.expr.filters.animated=function(e){return ie.grep(ie.timers,function(t){return e===t.elem}).length},ie.offset={setOffset:function(e,t,n){var r,o,i,s,a,u,l,c=ie.css(e,"position"),f=ie(e),d={};"static"===c&&(e.style.position="relative"),a=f.offset(),i=ie.css(e,"top"),u=ie.css(e,"left"),l=("absolute"===c||"fixed"===c)&&(i+u).indexOf("auto")>-1,l?(r=f.position(),s=r.top,o=r.left):(s=parseFloat(i)||0,o=parseFloat(u)||0),ie.isFunction(t)&&(t=t.call(e,n,ie.extend({},a))),null!=t.top&&(d.top=t.top-a.top+s),null!=t.left&&(d.left=t.left-a.left+o),"using"in t?t.using.call(e,d):f.css(d)}},ie.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){ie.offset.setOffset(this,e,t)});var t,n,r=this[0],o={top:0,left:0},i=r&&r.ownerDocument;if(i)return t=i.documentElement,ie.contains(t,r)?(o=r.getBoundingClientRect(),n=z(i),{top:o.top+n.pageYOffset-t.clientTop,left:o.left+n.pageXOffset-t.clientLeft}):o},position:function(){if(this[0]){var e,t,n=this[0],r={top:0,left:0};return"fixed"===ie.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),ie.nodeName(e[0],"html")||(r=e.offset()),r.top+=ie.css(e[0],"borderTopWidth",!0)-e.scrollTop(),r.left+=ie.css(e[0],"borderLeftWidth",!0)-e.scrollLeft()),{top:t.top-r.top-ie.css(n,"marginTop",!0),left:t.left-r.left-ie.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===ie.css(e,"position");)e=e.offsetParent;return e||Ze})}}),ie.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset" |
skype2.py | #Solution 2
#16/3/18 Ian's Solution
def ispalindrome(s): # s is the string
|
print(ispalindrome("eye"))
print(ispalindrome("eyes")) | ans = True # thats what will print out
for i in range(len(s)): # loops through s which we put down in print
if s[i] != s[len(s) - 1 -i]: # len s of radar is = 5 as there is 5 digits, we want to get to 0-4 so have to -1, i starts at 0 and
ans = False # if i is not = i returns false
return ans # have to have return in the function |
util.py |
import os
import json
import unittest
from collections import defaultdict
from geopy.compat import string_compare, py3k
from geopy import exc
try:
env = defaultdict(lambda: None)
with open(".test_keys") as fp:
env.update(json.loads(fp.read()))
except IOError:
keys = (
'ARCGIS_USERNAME',
'ARCGIS_PASSWORD',
'ARCGIS_REFERER',
'YAHOO_KEY',
'YAHOO_SECRET',
'BING_KEY',
'MAPQUEST_KEY',
'GEONAMES_USERNAME',
'LIVESTREETS_AUTH_ID',
'LIVESTREETS_AUTH_TOKEN',
'GEOCODERDOTUS_USERNAME',
'GEOCODERDOTUS_PASSWORD',
'GEOCODEFARM_KEY',
'BAIDU_KEY',
'OPENCAGE_KEY',
'WHAT3WORDS_KEY',
'IGNFRANCE_KEY',
'IGNFRANCE_USERNAME',
'IGNFRANCE_PASSWORD',
'IGNFRANCE_REFERER',
'GOOGLEMAPS_KEY'
)
env = {key: os.environ.get(key, None) for key in keys}
class Empty(object): # pylint: disable=R0903
"""
Non-None NULL.
"""
pass
EMPTY = Empty()
class GeocoderTestBase(unittest.TestCase): # pylint: disable=R0904
| """
Base for geocoder-specific test cases.
"""
geocoder = None
delta = 0.5
def geocode_run(self, payload, expected, expect_failure=False):
"""
Calls geocoder.geocode(**payload), then checks against `expected`.
"""
result = self._make_request(self.geocoder.geocode, **payload)
if result is None:
if not expect_failure:
self.fail('No result found')
else:
return
self._verify_request(result, **expected)
def reverse_run(self, payload, expected, expect_failure=False):
"""
Calls geocoder.reverse(**payload), then checks against `expected`.
"""
result = self._make_request(self.geocoder.reverse, **payload)
if result is None:
if not expect_failure:
self.fail('No result found')
else:
return
self._verify_request(result, **expected)
@staticmethod
def _make_request(call, *args, **kwargs):
"""
Handles remote service errors.
"""
try:
result = call(*args, **kwargs)
except exc.GeocoderQuotaExceeded:
raise unittest.SkipTest("Quota exceeded")
except exc.GeocoderTimedOut:
raise unittest.SkipTest("Service timed out")
except exc.GeocoderUnavailable:
raise unittest.SkipTest("Service unavailable")
return result
def _verify_request(
self,
result,
raw=EMPTY,
latitude=EMPTY,
longitude=EMPTY,
address=EMPTY,
osm_tag=EMPTY,
):
"""
Verifies that a result matches the kwargs given.
"""
item = result[0] if isinstance(result, (tuple, list)) else result
if raw != EMPTY:
self.assertEqual(item.raw, raw)
if latitude != EMPTY:
self.assertAlmostEqual(
item.latitude, latitude, delta=self.delta
)
if longitude != EMPTY:
self.assertAlmostEqual(
item.longitude, longitude, delta=self.delta
)
if address != EMPTY:
self.assertEqual(
item.address, address
)
if osm_tag != EMPTY:
raw_osm_key = item.raw['properties']['osm_key']
if isinstance(osm_tag, string_compare):
self.assertEqual(raw_osm_key, osm_tag)
else:
self.assertIn(raw_osm_key, osm_tag) |
|
rbm.py | # coding:utf-8
import logging
import numpy as np
from scipy.special import expit
from mla.base import BaseEstimator
from mla.utils import batch_iterator
np.random.seed(9999)
sigmoid = expit
"""
References:
A Practical Guide to Training Restricted Boltzmann Machines https://www.cs.toronto.edu/~hinton/absps/guideTR.pdf
"""
class RBM(BaseEstimator):
y_required = False
def __init__(self, n_hidden=128, learning_rate=0.1, batch_size=10, max_epochs=100):
"""Bernoulli Restricted Boltzmann Machine (RBM)
Parameters
----------
n_hidden : int, default 128
The number of hidden units.
learning_rate : float, default 0.1
batch_size : int, default 10
max_epochs : int, default 100
"""
self.max_epochs = max_epochs
self.batch_size = batch_size | def fit(self, X, y=None):
self.n_visible = X.shape[1]
self._init_weights()
self._setup_input(X, y)
self._train()
def _init_weights(self):
self.W = np.random.randn(self.n_visible, self.n_hidden) * 0.1
# Bias for visible and hidden units
self.bias_v = np.zeros(self.n_visible, dtype=np.float32)
self.bias_h = np.zeros(self.n_hidden, dtype=np.float32)
self.errors = []
def _train(self):
"""Use CD-1 training procedure, basically an exact inference for `positive_associations`,
followed by a "non burn-in" block Gibbs Sampling for the `negative_associations`."""
for i in range(self.max_epochs):
error = 0
for batch in batch_iterator(self.X, batch_size=self.batch_size):
positive_hidden = sigmoid(np.dot(batch, self.W) + self.bias_h)
hidden_states = self._sample(positive_hidden) # sample hidden state h1
positive_associations = np.dot(batch.T, positive_hidden)
negative_visible = sigmoid(np.dot(hidden_states, self.W.T) + self.bias_v)
negative_visible = self._sample(negative_visible) # use the sampled hidden state h1 to sample v1
negative_hidden = sigmoid(np.dot(negative_visible, self.W) + self.bias_h)
negative_associations = np.dot(negative_visible.T, negative_hidden)
lr = self.lr / float(batch.shape[0])
self.W += lr * ((positive_associations - negative_associations) / float(self.batch_size))
self.bias_h += lr * (negative_hidden.sum(axis=0) - negative_associations.sum(axis=0))
self.bias_v += lr * (np.asarray(batch.sum(axis=0)).squeeze() - negative_visible.sum(axis=0))
error += np.sum((batch - negative_visible) ** 2)
self.errors.append(error)
logging.info("Iteration %s, error %s" % (i, error))
logging.debug("Weights: %s" % self.W)
logging.debug("Hidden bias: %s" % self.bias_h)
logging.debug("Visible bias: %s" % self.bias_v)
def _sample(self, X):
return X > np.random.random_sample(size=X.shape)
def _predict(self, X=None):
return sigmoid(np.dot(X, self.W) + self.bias_h) | self.lr = learning_rate
self.n_hidden = n_hidden
|
memory.rs | // Copyright 2020 Netwarps Ltd.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
use async_trait::async_trait;
use fnv::FnvHashMap;
use futures::{channel::mpsc, prelude::*, task::Context, task::Poll};
use futures::{SinkExt, StreamExt};
use pin_project::pin_project;
use std::{collections::hash_map::Entry, fmt, io, num::NonZeroU64, pin::Pin};
use lazy_static::lazy_static;
use libp2prs_multiaddr::{protocol, protocol::Protocol, Multiaddr};
use parking_lot::Mutex;
use rw_stream_sink::RwStreamSink;
use crate::muxing::{IReadWrite, ReadWriteEx, StreamInfo};
use crate::transport::{ConnectionInfo, IListener, ITransport, TransportListener};
use crate::{transport::TransportError, Transport};
// use libp2prs_traits::SplitEx;
// use futures::io::{ReadHalf, WriteHalf};
lazy_static! {
static ref HUB: Mutex<FnvHashMap<NonZeroU64, mpsc::Sender<Channel>>> = Mutex::new(FnvHashMap::default());
}
/// Transport that supports `/memory/N` multiaddresses.
///
/// MemoryTransport is mainly for test purpose, used to write test code for basic transport functionality.
#[derive(Debug, Clone, Default)]
pub struct MemoryTransport;
#[async_trait]
impl Transport for MemoryTransport {
type Output = Channel;
fn listen_on(&mut self, addr: Multiaddr) -> Result<IListener<Self::Output>, TransportError> {
let port = if let Ok(port) = parse_memory_addr(&addr) {
port
} else {
return Err(TransportError::MultiaddrNotSupported(addr));
};
let mut hub = (&*HUB).lock();
let port = if let Some(port) = NonZeroU64::new(port) {
port
} else {
loop {
let port = match NonZeroU64::new(rand::random()) {
Some(p) => p,
None => continue,
};
if !hub.contains_key(&port) {
break port;
}
}
};
let (tx, rx) = mpsc::channel(2);
match hub.entry(port) {
Entry::Occupied(_) => return Err(TransportError::Unreachable),
Entry::Vacant(e) => e.insert(tx),
};
let listener = Box::new(Listener {
port,
addr: Protocol::Memory(port.get()).into(),
receiver: rx,
});
Ok(listener)
}
async fn dial(&mut self, addr: Multiaddr) -> Result<Self::Output, TransportError> {
let port = if let Ok(port) = parse_memory_addr(&addr) {
if let Some(port) = NonZeroU64::new(port) {
port
} else {
return Err(TransportError::Unreachable);
}
} else {
return Err(TransportError::MultiaddrNotSupported(addr));
};
// get a cloned sender, unlock the HUB asap
let mut sender = {
let hub = HUB.lock();
if let Some(sender) = hub.get(&port) {
sender.clone()
} else {
return Err(TransportError::Unreachable);
}
};
let (a_tx, a_rx) = mpsc::channel(4096);
let (b_tx, b_rx) = mpsc::channel(4096);
let la = Multiaddr::empty();
let ra = addr;
let channel_to_send = Channel {
io: RwStreamSink::new(Chan {
incoming: a_rx,
outgoing: b_tx,
}),
la: la.clone(),
ra: ra.clone(),
};
let channel_to_return = Channel {
io: RwStreamSink::new(Chan {
incoming: b_rx,
outgoing: a_tx,
}),
la: la.clone(),
ra: ra.clone(),
};
sender.send(channel_to_send).await.map_err(|_| TransportError::Unreachable)?;
Ok(channel_to_return)
}
fn box_clone(&self) -> ITransport<Self::Output> {
Box::new(self.clone())
}
fn protocols(&self) -> Vec<u32> {
vec![protocol::MEMORY]
}
}
/// Listener for memory connections.
pub struct Listener {
/// Port we're listening on.
port: NonZeroU64,
/// The address we are listening on.
addr: Multiaddr,
/// Receives incoming connections.
receiver: mpsc::Receiver<Channel>,
}
#[async_trait]
impl TransportListener for Listener {
type Output = Channel;
async fn | (&mut self) -> Result<Self::Output, TransportError> {
self.receiver.next().await.ok_or(TransportError::Unreachable)
}
fn multi_addr(&self) -> Multiaddr {
self.addr.clone()
}
}
impl Drop for Listener {
fn drop(&mut self) {
let val_in = HUB.lock().remove(&self.port);
debug_assert!(val_in.is_some());
}
}
/// If the address is `/memory/n`, returns the value of `n`.
fn parse_memory_addr(a: &Multiaddr) -> Result<u64, ()> {
let mut iter = a.iter();
let port = if let Some(Protocol::Memory(port)) = iter.next() {
port
} else {
return Err(());
};
if iter.next().is_some() {
return Err(());
}
Ok(port)
}
/// A channel represents an established, in-memory, logical connection between two endpoints.
///
/// Implements `ReadEx` and `WriteEx`.
#[pin_project]
pub struct Channel {
#[pin]
io: RwStreamSink<Chan<Vec<u8>>>,
la: Multiaddr,
ra: Multiaddr,
}
impl fmt::Debug for Channel {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("Channel").field("la", &self.la).field("ra", &self.ra).finish()
}
}
// Implements AsyncRead & AsyncWrite
impl AsyncRead for Channel {
fn poll_read(self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &mut [u8]) -> Poll<io::Result<usize>> {
let this = self.project();
this.io.poll_read(cx, buf)
}
}
impl AsyncWrite for Channel {
fn poll_write(self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &[u8]) -> Poll<io::Result<usize>> {
let this = self.project();
this.io.poll_write(cx, buf)
}
fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<io::Result<()>> {
let this = self.project();
this.io.poll_flush(cx)
}
fn poll_close(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<io::Result<()>> {
let this = self.project();
this.io.poll_close(cx)
}
}
/*
impl SplitEx for Channel {
type Reader = ReadHalf<RwStreamSink<Chan>>;
type Writer = WriteHalf<RwStreamSink<Chan>>;
fn split(self) -> (Self::Reader, Self::Writer) {
let (r, w) = AsyncReadExt::split(self.io);
(r, w)
}
}
*/
/// A channel represents an established, in-memory, logical connection between two endpoints.
///
/// Implements `Sink` and `Stream`.
pub struct Chan<T = Vec<u8>> {
incoming: mpsc::Receiver<T>,
outgoing: mpsc::Sender<T>,
}
impl<T> Unpin for Chan<T> {}
impl<T> Stream for Chan<T> {
type Item = Result<T, io::Error>;
fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context) -> Poll<Option<Self::Item>> {
match Stream::poll_next(Pin::new(&mut self.incoming), cx) {
Poll::Pending => Poll::Pending,
Poll::Ready(None) => Poll::Ready(Some(Err(io::ErrorKind::BrokenPipe.into()))),
Poll::Ready(Some(v)) => Poll::Ready(Some(Ok(v))),
}
}
}
impl<T> Sink<T> for Chan<T> {
type Error = io::Error;
fn poll_ready(mut self: Pin<&mut Self>, cx: &mut Context) -> Poll<Result<(), Self::Error>> {
self.outgoing
.poll_ready(cx)
.map(|v| v.map_err(|_| io::ErrorKind::BrokenPipe.into()))
}
fn start_send(mut self: Pin<&mut Self>, item: T) -> Result<(), Self::Error> {
self.outgoing.start_send(item).map_err(|_| io::ErrorKind::BrokenPipe.into())
}
fn poll_flush(self: Pin<&mut Self>, _: &mut Context) -> Poll<Result<(), Self::Error>> {
Poll::Ready(Ok(()))
}
fn poll_close(self: Pin<&mut Self>, _: &mut Context) -> Poll<Result<(), Self::Error>> {
Poll::Ready(Ok(()))
}
}
impl ConnectionInfo for Channel {
fn local_multiaddr(&self) -> Multiaddr {
self.la.clone()
}
fn remote_multiaddr(&self) -> Multiaddr {
self.ra.clone()
}
}
impl StreamInfo for Channel {
fn id(&self) -> usize {
0
}
}
impl ReadWriteEx for Channel {
fn box_clone(&self) -> IReadWrite {
unimplemented!()
}
}
#[cfg(test)]
mod tests {
use super::*;
use libp2prs_traits::{ReadEx as _ReadEx, WriteEx as _WriteEx};
#[test]
fn parse_memory_addr_works() {
assert_eq!(parse_memory_addr(&"/memory/5".parse().unwrap()), Ok(5));
assert_eq!(parse_memory_addr(&"/tcp/150".parse().unwrap()), Err(()));
assert_eq!(parse_memory_addr(&"/memory/0".parse().unwrap()), Ok(0));
assert_eq!(parse_memory_addr(&"/memory/5/tcp/150".parse().unwrap()), Err(()));
assert_eq!(parse_memory_addr(&"/tcp/150/memory/5".parse().unwrap()), Err(()));
assert_eq!(parse_memory_addr(&"/memory/1234567890".parse().unwrap()), Ok(1_234_567_890));
}
#[test]
fn listening_twice() {
let mut transport = MemoryTransport::default();
assert!(transport.listen_on("/memory/1639174018481".parse().unwrap()).is_ok());
assert!(transport.listen_on("/memory/1639174018481".parse().unwrap()).is_ok());
let _listener = transport.listen_on("/memory/1639174018481".parse().unwrap()).unwrap();
assert!(transport.listen_on("/memory/1639174018481".parse().unwrap()).is_err());
assert!(transport.listen_on("/memory/1639174018481".parse().unwrap()).is_err());
drop(_listener);
assert!(transport.listen_on("/memory/1639174018481".parse().unwrap()).is_ok());
assert!(transport.listen_on("/memory/1639174018481".parse().unwrap()).is_ok());
}
#[test]
fn port_not_in_use() {
futures::executor::block_on(async move {
let mut transport = MemoryTransport::default();
assert!(transport.dial("/memory/810172461024613".parse().unwrap()).await.is_err());
let _listener = transport.listen_on("/memory/810172461024613".parse().unwrap()).unwrap();
assert!(transport.dial("/memory/810172461024613".parse().unwrap()).await.is_ok());
});
}
#[test]
fn communicating_between_dialer_and_listener() {
let msg = [1, 2, 3];
// Setup listener.
let rand_port = rand::random::<u64>().saturating_add(1);
let t1_addr: Multiaddr = format!("/memory/{}", rand_port).parse().unwrap();
let cloned_t1_addr = t1_addr.clone();
let mut t1 = MemoryTransport::default();
let listener = async move {
let mut listener = t1.listen_on(t1_addr.clone()).unwrap();
let mut socket = listener.accept().await.unwrap();
let mut buf = [0; 3];
socket.read_exact2(&mut buf).await.unwrap();
assert_eq!(buf, msg);
};
// Setup dialer.
let mut t2 = MemoryTransport::default();
let dialer = async move {
let mut socket = t2.dial(cloned_t1_addr).await.unwrap();
socket.write_all2(&msg).await.unwrap();
};
// Wait for both to finish.
futures::executor::block_on(futures::future::join(listener, dialer));
}
}
| accept |
solution.go | package program
type LinkedList struct {
value int
next *LinkedList
}
func LinkedListLoop(head *LinkedList) *LinkedList | {
slowNode := head.next
fastNode := head.next.next
for slowNode != fastNode {
slowNode = slowNode.next
fastNode = fastNode.next.next
}
slowNode = head
for slowNode != fastNode {
slowNode = slowNode.next
fastNode = fastNode.next
}
return slowNode
} |
|
send_state_event_for_key.rs | //! [PUT /_matrix/client/r0/rooms/{roomId}/state/{eventType}/{stateKey}](https://matrix.org/docs/spec/client_server/r0.6.1#put-matrix-client-r0-rooms-roomid-state-eventtype-statekey)
use std::convert::TryFrom;
use ruma_api::{
error::{
FromHttpRequestError, FromHttpResponseError, IntoHttpError, RequestDeserializationError,
ResponseDeserializationError, ServerError,
},
AuthScheme, EndpointError, Metadata,
};
use ruma_common::Outgoing;
use ruma_events::{AnyStateEventContent, EventContent as _};
use ruma_identifiers::{EventId, RoomId};
use serde::{Deserialize, Serialize};
use serde_json::value::RawValue as RawJsonValue;
/// Data for a request to the `send_state_event_for_key` API endpoint.
///
/// Send a state event to a room associated with a given state key.
#[derive(Clone, Debug, Outgoing)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
#[incoming_derive(!Deserialize)]
pub struct Request<'a> {
/// The room to set the state in.
pub room_id: &'a RoomId,
/// The state_key for the state to send. Defaults to the empty string.
pub state_key: &'a str,
/// The event content to send.
pub content: &'a AnyStateEventContent,
}
impl<'a> Request<'a> {
/// Creates a new `Request` with the given room id, state key and event content.
pub fn new(room_id: &'a RoomId, state_key: &'a str, content: &'a AnyStateEventContent) -> Self {
Self { room_id, state_key, content }
}
}
/// Data in the response from the `send_message_event` API endpoint.
#[derive(Clone, Debug, Outgoing)]
#[cfg_attr(not(feature = "unstable-exhaustive-types"), non_exhaustive)]
#[incoming_derive(!Deserialize)]
pub struct Response {
/// A unique identifier for the event.
pub event_id: EventId,
}
impl Response {
/// Creates a new `Response` with the given event id.
pub fn | (event_id: EventId) -> Self {
Self { event_id }
}
}
const METADATA: Metadata = Metadata {
description: "Send a state event to a room associated with a given state key.",
method: http::Method::PUT,
name: "send_state_event_for_key",
path: "/_matrix/client/r0/rooms/:room_id/state/:event_type/:state_key",
rate_limited: false,
authentication: AuthScheme::AccessToken,
};
impl TryFrom<http::Request<Vec<u8>>> for IncomingRequest {
type Error = FromHttpRequestError;
fn try_from(request: http::Request<Vec<u8>>) -> Result<Self, Self::Error> {
let path_segments: Vec<&str> = request.uri().path()[1..].split('/').collect();
let room_id = {
let decoded =
match percent_encoding::percent_decode(path_segments[4].as_bytes()).decode_utf8() {
Ok(val) => val,
Err(err) => return Err(RequestDeserializationError::new(err, request).into()),
};
match RoomId::try_from(&*decoded) {
Ok(val) => val,
Err(err) => return Err(RequestDeserializationError::new(err, request).into()),
}
};
let state_key =
match percent_encoding::percent_decode(path_segments[7].as_bytes()).decode_utf8() {
Ok(val) => val.into_owned(),
Err(err) => return Err(RequestDeserializationError::new(err, request).into()),
};
let content = {
let request_body: Box<RawJsonValue> =
match serde_json::from_slice(request.body().as_slice()) {
Ok(val) => val,
Err(err) => return Err(RequestDeserializationError::new(err, request).into()),
};
let event_type = {
match percent_encoding::percent_decode(path_segments[6].as_bytes()).decode_utf8() {
Ok(val) => val,
Err(err) => return Err(RequestDeserializationError::new(err, request).into()),
}
};
match AnyStateEventContent::from_parts(&event_type, request_body) {
Ok(content) => content,
Err(err) => return Err(RequestDeserializationError::new(err, request).into()),
}
};
Ok(Self { room_id, state_key, content })
}
}
/// Data in the response body.
#[derive(Debug, Deserialize, Serialize)]
struct ResponseBody {
/// A unique identifier for the event.
event_id: EventId,
}
impl TryFrom<Response> for http::Response<Vec<u8>> {
type Error = IntoHttpError;
fn try_from(response: Response) -> Result<Self, Self::Error> {
let response = http::Response::builder()
.header(http::header::CONTENT_TYPE, "application/json")
.body(serde_json::to_vec(&ResponseBody { event_id: response.event_id })?)
.unwrap();
Ok(response)
}
}
impl TryFrom<http::Response<Vec<u8>>> for Response {
type Error = FromHttpResponseError<crate::Error>;
fn try_from(response: http::Response<Vec<u8>>) -> Result<Self, Self::Error> {
if response.status().as_u16() < 400 {
let response_body: ResponseBody =
match serde_json::from_slice(response.body().as_slice()) {
Ok(val) => val,
Err(err) => return Err(ResponseDeserializationError::new(err, response).into()),
};
Ok(Self { event_id: response_body.event_id })
} else {
match <crate::Error as EndpointError>::try_from_response(response) {
Ok(err) => Err(ServerError::Known(err).into()),
Err(response_err) => Err(ServerError::Unknown(response_err).into()),
}
}
}
}
impl<'a> ruma_api::OutgoingRequest for Request<'a> {
type EndpointError = crate::Error;
type IncomingResponse = Response;
/// Metadata for the `send_message_event` endpoint.
const METADATA: Metadata = METADATA;
fn try_into_http_request(
self,
base_url: &str,
access_token: Option<&str>,
) -> Result<http::Request<Vec<u8>>, IntoHttpError> {
use http::header::{HeaderValue, AUTHORIZATION};
use percent_encoding::{utf8_percent_encode, NON_ALPHANUMERIC};
let http_request = http::Request::builder()
.method(http::Method::PUT)
.uri(format!(
"{}/_matrix/client/r0/rooms/{}/state/{}/{}",
// FIXME: Once MSRV is >= 1.45.0, switch to
// base_url.strip_suffix('/').unwrap_or(base_url),
match base_url.as_bytes().last() {
Some(b'/') => &base_url[..base_url.len() - 1],
_ => base_url,
},
utf8_percent_encode(self.room_id.as_str(), NON_ALPHANUMERIC),
utf8_percent_encode(self.content.event_type(), NON_ALPHANUMERIC),
utf8_percent_encode(&self.state_key, NON_ALPHANUMERIC),
))
.header(
AUTHORIZATION,
HeaderValue::from_str(&format!(
"Bearer {}",
access_token.ok_or(IntoHttpError::NeedsAuthentication)?
))?,
)
.body(serde_json::to_vec(&self.content)?)?;
Ok(http_request)
}
}
impl ruma_api::IncomingRequest for IncomingRequest {
type EndpointError = crate::Error;
type OutgoingResponse = Response;
/// Metadata for the `send_message_event` endpoint.
const METADATA: Metadata = METADATA;
}
| new |
model_analyzer.py | # Model architecture analyzer
import os
import logging
import logging.handlers as handlers
import json
import numpy as np
import tensorflow as tf
physical_devices = tf.config.list_physical_devices('GPU')
tf.config.experimental.set_memory_growth(physical_devices[0], enable=True)
tf.keras.backend.set_floatx('float32')
from tensorflow.keras import layers
from tensorflow.keras.experimental import PeepholeLSTMCell
from tensorflow.keras.layers import TimeDistributed
from tensorflow.keras.layers import RepeatVector
from tensorflow.keras import regularizers
from tensorflow.keras import optimizers
from tensorflow.keras import losses, models
from tensorflow.keras import metrics
from tensorflow.keras import callbacks as cb
from tensorflow.keras import backend as kb
from sklearn.metrics import mean_squared_error
from tensorflow.keras.utils import plot_model, model_to_dot
# open local settings
with open('./settings.json') as local_json_file:
local_submodule_settings = json.loads(local_json_file.read())
local_json_file.close()
# log setup
current_script_name = os.path.basename(__file__).split('.')[0]
log_path_filename = ''.join([local_submodule_settings['log_path'], current_script_name, '.log'])
logging.basicConfig(filename=log_path_filename, level=logging.DEBUG,
format='%(asctime)s %(levelname)s %(name)s %(message)s')
logger = logging.getLogger(__name__)
logHandler = handlers.RotatingFileHandler(log_path_filename, maxBytes=10485760, backupCount=5)
logger.addHandler(logHandler)
class model_structure:
def analize(self, local_model_name, local_settings):
| try:
# loading model (h5 format)
print('trying to open model file (assuming h5 format)')
local_model = models.load_model(''.join([local_settings['models_path'], local_model_name]))
# saving architecture in JSON format
local_model_json = local_model.to_json()
with open(''.join([local_settings['models_path'], local_model_name,
'_analyzed_.json']), 'w') as json_file:
json_file.write(local_model_json)
json_file.close()
# changing for subclassing to functional model
local_model_json = json.loads(local_model_json)
print(type(local_model_json))
local_batch_size = None
local_time_step_days = local_model_json['config']['build_input_shape'][1]
local_features = local_model_json['config']['build_input_shape'][2]
input_layer = layers.Input(batch_shape=(local_batch_size, local_time_step_days, local_features))
prev_layer = input_layer
for layer in local_model.layers:
prev_layer = layer(prev_layer)
functional_model = models.Model([input_layer], [prev_layer])
# plotting (exporting to png) the model
plot_path = ''.join([local_settings['models_path'], local_model_name, '_model.png'])
# model_to_dot(functional_model, show_shapes=True, show_layer_names=True, rankdir='TB',
# expand_nested=True, dpi=96, subgraph=True)
plot_model(functional_model, to_file=plot_path, show_shapes=True, show_layer_names=True,
rankdir='TB', expand_nested=True, dpi=216)
plot_model(functional_model, to_file=''.join([plot_path, '.pdf']), show_shapes=True, show_layer_names=True,
rankdir='TB', expand_nested=True)
except Exception as e1:
print('Error reading or saving model')
print(e1)
return False
return True |
|
test_rusty_green_kernel.py | """Unit tests for direct assembly and evaluation of kernels."""
import numpy as np
import pytest
@pytest.mark.parametrize("parallel", [True, False])
@pytest.mark.parametrize("dtype,rtol", [(np.float64, 1e-14), (np.float32, 5e-6)])
def test_laplace_assemble(dtype, rtol, parallel):
"""Test the Laplace kernel."""
from rusty_green_kernel import assemble_laplace_kernel
nsources = 10
ntargets = 20
rng = np.random.default_rng(seed=0)
# Construct target and sources so that they do not overlap
# apart from the first point.
targets = 1.5 + rng.random((3, ntargets), dtype=dtype)
sources = rng.random((3, nsources), dtype=dtype)
sources[:, 0] = targets[:, 0] # Test what happens if source = target
actual = assemble_laplace_kernel(sources, targets, dtype=dtype, parallel=parallel)
# Calculate expected result
# A divide by zero error is expected to happen here.
# So just ignore the warning.
old_param = np.geterr()["divide"]
np.seterr(divide="ignore")
expected = np.empty((ntargets, nsources), dtype=dtype)
for index, target in enumerate(targets.T):
expected[index, :] = 1.0 / (
4 * np.pi * np.linalg.norm(sources - target.reshape(3, 1), axis=0)
)
# Reset the warnings
np.seterr(divide=old_param)
expected[0, 0] = 0 # First source and target are identical.
np.testing.assert_allclose(actual, expected, rtol=rtol)
@pytest.mark.parametrize("parallel", [True, False])
@pytest.mark.parametrize("dtype,rtol", [(np.float64, 1e-14), (np.float32, 5e-6)])
def test_laplace_evaluate_only_values(dtype, rtol, parallel):
|
@pytest.mark.parametrize("parallel", [True, False])
@pytest.mark.parametrize("dtype,rtol", [(np.float64, 1e-14), (np.float32, 5e-6)])
def test_laplace_evaluate_values_and_deriv(dtype, rtol, parallel):
"""Test the Laplace kernel."""
from rusty_green_kernel import evaluate_laplace_kernel
nsources = 10
ntargets = 20
ncharge_vecs = 2
rng = np.random.default_rng(seed=0)
# Construct target and sources so that they do not overlap
# apart from the first point.
targets = 1.5 + rng.random((3, ntargets), dtype=dtype)
sources = rng.random((3, nsources), dtype=dtype)
sources[:, 0] = targets[:, 0] # Test what happens if source = target
charges = rng.random((ncharge_vecs, nsources), dtype=dtype)
actual = evaluate_laplace_kernel(
sources, targets, charges, dtype=dtype, return_gradients=True, parallel=parallel
)
# Calculate expected result
# A divide by zero error is expected to happen here.
# So just ignore the warning.
old_params = np.geterr()
np.seterr(all="ignore")
expected = np.empty((nsources, ntargets, 4), dtype=dtype)
for index, target in enumerate(targets.T):
diff = sources - target.reshape(3, 1)
dist = np.linalg.norm(diff, axis=0)
expected[:, index, 0] = 1.0 / (4 * np.pi * dist)
expected[:, index, 1:] = diff.T / (4 * np.pi * dist.reshape(nsources, 1) ** 3)
expected[dist == 0, index, :] = 0
# Reset the warnings
np.seterr(**old_params)
expected = np.tensordot(charges, expected, 1)
np.testing.assert_allclose(actual, expected, rtol=rtol)
@pytest.mark.parametrize("parallel", [True, False])
@pytest.mark.parametrize("dtype,rtol", [(np.complex128, 1e-14), (np.complex64, 5e-6)])
def test_helmholtz_assemble(dtype, rtol, parallel):
"""Test the Laplace kernel."""
from rusty_green_kernel import assemble_helmholtz_kernel
wavenumber = 2.5
nsources = 10
ntargets = 20
if dtype == np.complex128:
real_type = np.float64
elif dtype == np.complex64:
real_type = np.float32
else:
raise ValueError(f"Unsupported type: {dtype}.")
rng = np.random.default_rng(seed=0)
# Construct target and sources so that they do not overlap
# apart from the first point.
targets = 1.5 + rng.random((3, ntargets), dtype=real_type)
sources = rng.random((3, nsources), dtype=real_type)
sources[:, 0] = targets[:, 0] # Test what happens if source = target
actual = assemble_helmholtz_kernel(
sources, targets, wavenumber, dtype=dtype, parallel=parallel
)
# Calculate expected result
# A divide by zero error is expected to happen here.
# So just ignore the warning.
old_params = np.geterr()
np.seterr(all="ignore")
expected = np.empty((ntargets, nsources), dtype=dtype)
for index, target in enumerate(targets.T):
dist = np.linalg.norm(sources - target.reshape(3, 1), axis=0)
expected[index, :] = np.exp(1j * wavenumber * dist) / (4 * np.pi * dist)
expected[index, dist == 0] = 0
# Reset the warnings
np.seterr(**old_params)
np.testing.assert_allclose(actual, expected, rtol=rtol)
@pytest.mark.parametrize("dtype,rtol", [(np.complex128, 1e-14), (np.complex64, 5e-6)])
def test_helmholtz_evaluate_only_values(dtype, rtol):
"""Test the Laplace kernel."""
from rusty_green_kernel import evaluate_helmholtz_kernel
nsources = 10
ntargets = 20
ncharge_vecs = 2
wavenumber = 2.5 + 1.3j
if dtype == np.complex128:
real_type = np.float64
elif dtype == np.complex64:
real_type = np.float32
else:
raise ValueError(f"Unsupported type: {dtype}.")
rng = np.random.default_rng(seed=0)
# Construct target and sources so that they do not overlap
# apart from the first point.
targets = 1.5 + rng.random((3, ntargets), dtype=real_type)
sources = rng.random((3, nsources), dtype=real_type)
sources[:, 0] = targets[:, 0] # Test what happens if source = target
charges = rng.random((ncharge_vecs, nsources), dtype=real_type) + 1j * rng.random(
(ncharge_vecs, nsources), dtype=real_type
)
actual = evaluate_helmholtz_kernel(
sources, targets, charges, wavenumber, dtype=dtype, parallel=False
)
# Calculate expected result
# A divide by zero error is expected to happen here.
# So just ignore the warning.
old_param = np.geterr()
np.seterr(all="ignore")
expected = np.empty((nsources, ntargets), dtype=dtype)
for index, target in enumerate(targets.T):
dist = np.linalg.norm(sources - target.reshape(3, 1), axis=0)
expected[:, index] = np.exp(1j * wavenumber * dist) / (4 * np.pi * dist)
expected[dist == 0, index] = 0
# Reset the warnings
np.seterr(**old_param)
expected = np.expand_dims(np.tensordot(charges, expected, 1), -1)
np.testing.assert_allclose(actual, expected, rtol=rtol)
@pytest.mark.parametrize("parallel", [True, False])
@pytest.mark.parametrize("dtype,rtol", [(np.complex128, 1e-14), (np.complex64, 5e-6)])
def test_helmholtz_evaluate_values_and_deriv(dtype, rtol, parallel):
"""Test the Laplace kernel."""
from rusty_green_kernel import evaluate_helmholtz_kernel
nsources = 10
ntargets = 20
ncharge_vecs = 2
wavenumber = 2.5 + 1.3j
if dtype == np.complex128:
real_type = np.float64
elif dtype == np.complex64:
real_type = np.float32
else:
raise ValueError(f"Unsupported type: {dtype}.")
rng = np.random.default_rng(seed=0)
# Construct target and sources so that they do not overlap
# apart from the first point.
targets = 1.5 + rng.random((3, ntargets), dtype=real_type)
sources = rng.random((3, nsources), dtype=real_type)
sources[:, 0] = targets[:, 0] # Test what happens if source = target
charges = rng.random((ncharge_vecs, nsources), dtype=real_type) + 1j * rng.random(
(ncharge_vecs, nsources), dtype=real_type
)
actual = evaluate_helmholtz_kernel(
sources,
targets,
charges,
wavenumber,
dtype=dtype,
return_gradients=True,
parallel=parallel,
)
# Calculate expected result
# A divide by zero error is expected to happen here.
# So just ignore the warning.
old_params = np.geterr()
np.seterr(all="ignore")
expected = np.empty((nsources, ntargets, 4), dtype=dtype)
for index, target in enumerate(targets.T):
diff = target.reshape(3, 1) - sources
dist = np.linalg.norm(diff, axis=0)
expected[:, index, 0] = np.exp(1j * wavenumber * dist) / (4 * np.pi * dist)
expected[:, index, 1:] = (
diff.T
* expected[:, index, 0].reshape(nsources, 1)
/ dist.reshape(nsources, 1) ** 2
* (1j * wavenumber * dist.reshape(nsources, 1) - 1)
)
expected[dist == 0, index, :] = 0
# Reset the warnings
np.seterr(**old_params)
expected = np.tensordot(charges, expected, 1)
np.testing.assert_allclose(actual, expected, rtol=rtol)
@pytest.mark.parametrize("parallel", [True, False])
@pytest.mark.parametrize("dtype,rtol", [(np.float64, 1e-14), (np.float32, 5e-6)])
def test_modified_helmholtz_assemble(dtype, rtol, parallel):
"""Test the modified Helmholtz kernel."""
from rusty_green_kernel import assemble_modified_helmholtz_kernel
nsources = 10
ntargets = 20
omega = 2.5
rng = np.random.default_rng(seed=0)
# Construct target and sources so that they do not overlap
# apart from the first point.
targets = 1.5 + rng.random((3, ntargets), dtype=dtype)
sources = rng.random((3, nsources), dtype=dtype)
sources[:, 0] = targets[:, 0] # Test what happens if source = target
actual = assemble_modified_helmholtz_kernel(
sources, targets, omega, dtype=dtype, parallel=parallel
)
# Calculate expected result
# A divide by zero error is expected to happen here.
# So just ignore the warning.
old_param = np.geterr()["divide"]
np.seterr(divide="ignore")
expected = np.empty((ntargets, nsources), dtype=dtype)
for index, target in enumerate(targets.T):
dist = np.linalg.norm(sources - target.reshape(3, 1), axis=0)
expected[index, :] = np.exp(-omega * dist) / (4 * np.pi * dist)
# Reset the warnings
np.seterr(divide=old_param)
expected[0, 0] = 0 # First source and target are identical.
np.testing.assert_allclose(actual, expected, rtol=rtol)
@pytest.mark.parametrize("parallel", [True, False])
@pytest.mark.parametrize("dtype,rtol", [(np.float64, 1e-14), (np.float32, 5e-6)])
def test_modified_helmholtz_evaluate_only_values(dtype, rtol, parallel):
"""Test the modified Helmholtz kernel."""
from rusty_green_kernel import evaluate_modified_helmholtz_kernel
nsources = 10
ntargets = 20
ncharge_vecs = 2
omega = 2.5
rng = np.random.default_rng(seed=0)
# Construct target and sources so that they do not overlap
# apart from the first point.
targets = 1.5 + rng.random((3, ntargets), dtype=dtype)
sources = rng.random((3, nsources), dtype=dtype)
sources[:, 0] = targets[:, 0] # Test what happens if source = target
charges = rng.random((ncharge_vecs, nsources), dtype=dtype)
actual = evaluate_modified_helmholtz_kernel(
sources, targets, charges, omega, dtype=dtype, parallel=parallel
)
# Calculate expected result
# A divide by zero error is expected to happen here.
# So just ignore the warning.
old_param = np.geterr()["divide"]
np.seterr(divide="ignore")
expected = np.empty((nsources, ntargets), dtype=dtype)
for index, target in enumerate(targets.T):
dist = np.linalg.norm(sources - target.reshape(3, 1), axis=0)
expected[:, index] = np.exp(-omega * dist) / (4 * np.pi * dist)
# Reset the warnings
np.seterr(divide=old_param)
expected[0, 0] = 0 # First source and target are identical.
expected = np.expand_dims(charges @ expected, -1)
np.testing.assert_allclose(actual, expected, rtol=rtol)
@pytest.mark.parametrize("parallel", [True, False])
@pytest.mark.parametrize("dtype,rtol", [(np.float64, 1e-14), (np.float32, 5e-6)])
def test_modified_helmholtz_evaluate_values_and_deriv(dtype, rtol, parallel):
"""Test the modified Helmholtz kernel."""
from rusty_green_kernel import evaluate_modified_helmholtz_kernel
nsources = 10
ntargets = 20
ncharge_vecs = 2
omega = 2.5
rng = np.random.default_rng(seed=0)
# Construct target and sources so that they do not overlap
# apart from the first point.
targets = 1.5 + rng.random((3, ntargets), dtype=dtype)
sources = rng.random((3, nsources), dtype=dtype)
sources[:, 0] = targets[:, 0] # Test what happens if source = target
charges = rng.random((ncharge_vecs, nsources), dtype=dtype)
actual = evaluate_modified_helmholtz_kernel(
sources,
targets,
charges,
omega,
dtype=dtype,
return_gradients=True,
parallel=parallel,
)
# Calculate expected result
# A divide by zero error is expected to happen here.
# So just ignore the warning.
old_params = np.geterr()
np.seterr(all="ignore")
expected = np.empty((nsources, ntargets, 4), dtype=dtype)
for index, target in enumerate(targets.T):
diff = target.reshape(3, 1) - sources
dist = np.linalg.norm(diff, axis=0)
expected[:, index, 0] = np.exp(-omega * dist) / (4 * np.pi * dist)
expected[:, index, 1:] = (
diff.T
/ (4 * np.pi * dist.reshape(nsources, 1) ** 3)
* np.exp(-omega * dist.reshape(nsources, 1))
* (-omega * dist.reshape(nsources, 1) - 1)
)
expected[dist == 0, index, :] = 0
# Reset the warnings
np.seterr(**old_params)
expected = np.tensordot(charges, expected, 1)
np.testing.assert_allclose(actual, expected, rtol=rtol)
def test_laplace_derivative_is_correct():
"""Test that the Gradient of the Laplace kernel is correct."""
from rusty_green_kernel import evaluate_laplace_kernel
nsources = 10
eps = 1e-10
dtype = np.float64
targets = np.array(
[
[1.1, 1.5, 2.3],
[1.1 + eps, 1.5, 2.3],
[1.1 - eps, 1.5, 2.3],
[1.1, 1.5 + eps, 2.3],
[1.1, 1.5 - eps, 2.3],
[1.1, 1.5, 2.3 + eps],
[1.1, 1.5, 2.3 - eps],
]
).T
rng = np.random.default_rng(seed=0)
sources = rng.random((3, nsources), dtype=dtype)
charges = rng.random((1, nsources), dtype=dtype)
# Evalute derivative approximately.
values = evaluate_laplace_kernel(sources, targets, charges)
x_deriv = (values[0, 1, 0] - values[0, 2, 0]) / (2 * eps)
y_deriv = (values[0, 3, 0] - values[0, 4, 0]) / (2 * eps)
z_deriv = (values[0, 5, 0] - values[0, 6, 0]) / (2 * eps)
expected = np.array([x_deriv, y_deriv, z_deriv])
actual = evaluate_laplace_kernel(sources, targets, charges, return_gradients=True)[
0, 0, 1:
]
np.testing.assert_allclose(actual, expected, rtol=1e-5)
def test_helmholtz_derivative_is_correct():
"""Test that the Gradient of the Helmholtz kernel is correct."""
from rusty_green_kernel import evaluate_helmholtz_kernel
nsources = 10
wavenumber = 2.5 + 1.3j
eps = 1e-10
dtype = np.float64
targets = np.array(
[
[1.1, 1.5, 2.3],
[1.1 + eps, 1.5, 2.3],
[1.1 - eps, 1.5, 2.3],
[1.1, 1.5 + eps, 2.3],
[1.1, 1.5 - eps, 2.3],
[1.1, 1.5, 2.3 + eps],
[1.1, 1.5, 2.3 - eps],
]
).T
rng = np.random.default_rng(seed=0)
sources = rng.random((3, nsources), dtype=dtype)
charges = rng.random((1, nsources), dtype=dtype)
# Evalute derivative approximately.
values = evaluate_helmholtz_kernel(sources, targets, charges, wavenumber)
x_deriv = (values[0, 1, 0] - values[0, 2, 0]) / (2 * eps)
y_deriv = (values[0, 3, 0] - values[0, 4, 0]) / (2 * eps)
z_deriv = (values[0, 5, 0] - values[0, 6, 0]) / (2 * eps)
expected = np.array([x_deriv, y_deriv, z_deriv])
actual = evaluate_helmholtz_kernel(
sources, targets, charges, wavenumber, return_gradients=True
)[0, 0, 1:]
np.testing.assert_allclose(actual, expected, rtol=1e-5)
def test_modified_helmholtz_derivative_is_correct():
"""Test that the Gradient of the Helmholtz kernel is correct."""
from rusty_green_kernel import evaluate_modified_helmholtz_kernel
nsources = 10
omega = 1.3
eps = 1e-10
dtype = np.float64
targets = np.array(
[
[1.1, 1.5, 2.3],
[1.1 + eps, 1.5, 2.3],
[1.1 - eps, 1.5, 2.3],
[1.1, 1.5 + eps, 2.3],
[1.1, 1.5 - eps, 2.3],
[1.1, 1.5, 2.3 + eps],
[1.1, 1.5, 2.3 - eps],
]
).T
rng = np.random.default_rng(seed=0)
sources = rng.random((3, nsources), dtype=dtype)
charges = rng.random((1, nsources), dtype=dtype)
# Evalute derivative approximately.
values = evaluate_modified_helmholtz_kernel(sources, targets, charges, omega)
x_deriv = (values[0, 1, 0] - values[0, 2, 0]) / (2 * eps)
y_deriv = (values[0, 3, 0] - values[0, 4, 0]) / (2 * eps)
z_deriv = (values[0, 5, 0] - values[0, 6, 0]) / (2 * eps)
expected = np.array([x_deriv, y_deriv, z_deriv])
actual = evaluate_modified_helmholtz_kernel(
sources, targets, charges, omega, return_gradients=True
)[0, 0, 1:]
np.testing.assert_allclose(actual, expected, rtol=1e-5)
def test_helmholtz_at_zero_agrees_with_laplace():
"""Test if Helmholtz with wavenumber 0 agrees with Laplace."""
from rusty_green_kernel import evaluate_helmholtz_kernel
from rusty_green_kernel import evaluate_laplace_kernel
nsources = 10
ntargets = 20
ncharge_vecs = 2
wavenumber = 0
dtype = np.float64
rng = np.random.default_rng(seed=0)
# Construct target and sources so that they do not overlap
# apart from the first point.
targets = 1.5 + rng.random((3, ntargets), dtype=dtype)
sources = rng.random((3, nsources), dtype=dtype)
sources[:, 0] = targets[:, 0] # Test what happens if source = target
charges = rng.random((ncharge_vecs, nsources), dtype=dtype) + 1j * rng.random(
(ncharge_vecs, nsources), dtype=dtype
)
values_helmholtz = evaluate_helmholtz_kernel(
sources, targets, charges, wavenumber, return_gradients=True
)
values_laplace = evaluate_laplace_kernel(
sources, targets, np.real(charges), return_gradients=True
) + 1j * evaluate_laplace_kernel(
sources, targets, np.imag(charges), return_gradients=True
)
np.testing.assert_allclose(values_helmholtz, values_laplace, rtol=1E-14)
def test_helmholtz_imaginary_wavenumber_agrees_with_modified_helmholtz():
"""Test if Helmholtz with wavenumber 0 agrees with Laplace."""
from rusty_green_kernel import evaluate_helmholtz_kernel
from rusty_green_kernel import evaluate_modified_helmholtz_kernel
nsources = 10
ntargets = 20
ncharge_vecs = 2
wavenumber = 1.3j
dtype = np.float64
rng = np.random.default_rng(seed=0)
# Construct target and sources so that they do not overlap
# apart from the first point.
targets = 1.5 + rng.random((3, ntargets), dtype=dtype)
sources = rng.random((3, nsources), dtype=dtype)
sources[:, 0] = targets[:, 0] # Test what happens if source = target
charges = rng.random((ncharge_vecs, nsources), dtype=dtype) + 1j * rng.random(
(ncharge_vecs, nsources), dtype=dtype
)
values_helmholtz = evaluate_helmholtz_kernel(
sources, targets, charges, wavenumber, return_gradients=True
)
values_modified_helmholtz = evaluate_modified_helmholtz_kernel(
sources, targets, np.real(charges), np.imag(wavenumber), return_gradients=True
) + 1j * evaluate_modified_helmholtz_kernel(
sources, targets, np.imag(charges), np.imag(wavenumber), return_gradients=True
)
np.testing.assert_allclose(values_helmholtz, values_modified_helmholtz, rtol=1E-14) | """Test the Laplace kernel."""
from rusty_green_kernel import evaluate_laplace_kernel
nsources = 10
ntargets = 20
ncharge_vecs = 2
rng = np.random.default_rng(seed=0)
# Construct target and sources so that they do not overlap
# apart from the first point.
targets = 1.5 + rng.random((3, ntargets), dtype=dtype)
sources = rng.random((3, nsources), dtype=dtype)
sources[:, 0] = targets[:, 0] # Test what happens if source = target
charges = rng.random((ncharge_vecs, nsources), dtype=dtype)
actual = evaluate_laplace_kernel(
sources, targets, charges, dtype=dtype, parallel=parallel
)
# Calculate expected result
# A divide by zero error is expected to happen here.
# So just ignore the warning.
old_param = np.geterr()["divide"]
np.seterr(divide="ignore")
expected = np.empty((nsources, ntargets), dtype=dtype)
for index, target in enumerate(targets.T):
expected[:, index] = 1.0 / (
4 * np.pi * np.linalg.norm(sources - target.reshape(3, 1), axis=0)
)
# Reset the warnings
np.seterr(divide=old_param)
expected[0, 0] = 0 # First source and target are identical.
expected = np.expand_dims(charges @ expected, -1)
np.testing.assert_allclose(actual, expected, rtol=rtol) |
__init__.py | from jdxapi.routes.health import *
from jdxapi.routes.upload_job_description_file import *
from jdxapi.routes.upload_job_description_context import *
from jdxapi.routes.framework_recommendations import * | from jdxapi.routes.framework_selections import *
from jdxapi.routes.generate_job_schema_plus import *
from jdxapi.routes.get_score import *
from jdxapi.routes.match_table import *
from jdxapi.routes.user_actions import *
from jdxapi.routes.preview import * | |
mutexkv.go | // Copyright 2016-2020 The Libsacloud Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package mutexkv
import (
"sync"
)
// MutexKV is a simple key/value store for arbitrary mutexes. It can be used to
// serialize changes across arbitrary collaborators that share knowledge of the
// keys they must serialize on.
type MutexKV struct {
lock sync.Mutex
store map[string]*sync.Mutex
}
// Lock the mutex for the given key. Caller is responsible for calling Unlock
// for the same key
func (m *MutexKV) Lock(key string) {
m.get(key).Lock()
}
// Unlock the mutex for the given key. Caller must have called Lock for the same key first
func (m *MutexKV) Unlock(key string) {
m.get(key).Unlock()
}
// Returns a mutex for the given key, no guarantee of its lock status
func (m *MutexKV) get(key string) *sync.Mutex {
m.lock.Lock()
defer m.lock.Unlock()
mutex, ok := m.store[key]
if !ok |
return mutex
}
// NewMutexKV Returns a properly initialized MutexKV
func NewMutexKV() *MutexKV {
return &MutexKV{
store: make(map[string]*sync.Mutex),
}
}
| {
mutex = &sync.Mutex{}
m.store[key] = mutex
} |
user.entity.ts |
import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";
@Entity({name: 'users'})
export class | {
@PrimaryGeneratedColumn()
id:number;
@Column({type: 'varchar', length: 50, nullable: false, unique: true})
username:string;
@Column({type: 'varchar', length: 50, nullable: false, unique: true})
password:string;
@Column({type: 'varchar', length: 50, nullable: false, unique: true})
rol_id:number;
@Column({type: 'varchar', length: 50, nullable: false, unique: true})
created_at:string;
} | UserEntity |
InteractiveJsonDocument.js | import React from 'react';
import './InteractiveJsonDocument.css';
import InteractiveJsonKeyValue from './InteractiveJsonKeyValue';
const CURLY_OPEN = `{`;
const CURLY_CLOSE = `}`;
class | extends React.Component {
constructor(props) {
super(props);
}
render() {
const { json } = this.props;
return (<pre>
<span>{CURLY_OPEN}</span>
{Object.keys(json).map((property, index, arr) => {
return (<InteractiveJsonKeyValue
property={property}
value={json[property]}
indentSize={4}
key={property}
drawTrailingComma={index < arr.length-1}
/>);
})}
<span>{CURLY_CLOSE}</span>
</pre>);
}
}
export default InteractiveJsonDocument;
| InteractiveJsonDocument |
mem_engine.rs | // Copyright 2020-2021 The Datafuse Authors.
//
// SPDX-License-Identifier: Apache-2.0.
use std::collections::HashMap;
use std::sync::Arc;
use std::sync::Mutex;
use common_flights::AppendResult;
use common_flights::DataPartInfo;
use common_planners::Partition;
use common_planners::Statistics;
use tonic::Status;
use crate::protobuf::CmdCreateDatabase;
use crate::protobuf::CmdCreateTable;
use crate::protobuf::Db;
use crate::protobuf::Table;
// MemEngine is a prototype storage that is primarily used for testing purposes.
pub struct MemEngine {
pub dbs: HashMap<String, Db>,
pub tbl_parts: HashMap<String, HashMap<String, Vec<DataPartInfo>>>,
pub next_id: i64,
pub next_ver: i64,
}
impl MemEngine {
#[allow(dead_code)]
pub fn create() -> Arc<Mutex<MemEngine>> {
let e = MemEngine {
dbs: HashMap::new(),
tbl_parts: HashMap::new(),
next_id: 0,
next_ver: 0,
};
Arc::new(Mutex::new(e))
}
pub fn create_database(
&mut self,
cmd: CmdCreateDatabase,
if_not_exists: bool,
) -> anyhow::Result<i64> {
// TODO: support plan.engine plan.options
let curr = self.dbs.get(&cmd.db_name);
if let Some(curr) = curr {
return if if_not_exists {
Ok(curr.db_id)
} else {
Err(anyhow::anyhow!("{} database exists", cmd.db_name))
};
}
let mut db = cmd
.db
.ok_or_else(|| Status::invalid_argument("require field: CmdCreateDatabase::db"))?;
let db_id = self.create_id();
db.db_id = db_id;
db.ver = self.create_ver();
self.dbs.insert(cmd.db_name, db);
Ok(db_id)
}
pub fn drop_database(&mut self, db_name: &str, if_exists: bool) -> Result<(), Status> {
self.remove_db_data_parts(db_name);
let entry = self.dbs.remove_entry(db_name);
match (entry, if_exists) {
(_, true) => Ok(()),
(Some((_id, _db)), false) => Ok(()),
(_, false) => Err(Status::not_found(format!("database {} not found", db_name))),
}
}
#[allow(dead_code)]
pub fn get_database(&self, db: String) -> anyhow::Result<Db> {
let x = self
.dbs
.get(&db)
.ok_or_else(|| anyhow::anyhow!("database not found"))?;
Ok(x.clone())
}
// Create a table. It generates a table id and fill it.
#[allow(dead_code)]
pub fn create_table(
&mut self,
cmd: CmdCreateTable,
if_not_exists: bool,
) -> Result<i64, Status> {
// TODO: support plan.engine plan.options
let table_id = self
.dbs
.get(&cmd.db_name)
.ok_or_else(|| Status::invalid_argument("database not found"))?
.table_name_to_id
.get(&cmd.table_name);
if let Some(table_id) = table_id {
return if if_not_exists {
Ok(*table_id)
} else {
Err(Status::already_exists("table exists"))
};
}
let mut table = cmd
.table
.ok_or_else(|| Status::invalid_argument("require field: CmdCreateTable::table"))?;
let table_id = self.create_id();
table.table_id = table_id;
table.ver = self.create_ver();
let db = self.dbs.get_mut(&cmd.db_name).unwrap();
db.table_name_to_id.insert(cmd.table_name, table_id);
db.tables.insert(table_id, table);
Ok(table_id)
}
pub fn drop_table(
&mut self,
db_name: &str,
tbl_name: &str,
if_exists: bool,
) -> Result<(), Status> {
self.remove_table_data_parts(db_name, tbl_name);
let r = self.dbs.get_mut(db_name).map(|db| {
let name2id_removed = db.table_name_to_id.remove_entry(tbl_name);
let id_removed = name2id_removed
.as_ref()
.and_then(|(_, id)| db.tables.remove(&id));
(name2id_removed, id_removed)
});
match (r, if_exists) {
(_, true) => Ok(()),
(None, false) => Err(Status::not_found(format!("database {} not found", db_name))),
(Some((None, _)), false) => {
Err(Status::not_found(format!("table {} not found", tbl_name)))
}
(Some((Some(_), Some(_))), false) => Ok(()),
_ => Err(Status::internal(
"inconsistent meta state, mappings between names and ids are out-of-sync"
.to_string(),
)),
}
}
pub fn get_table(&mut self, db_name: String, table_name: String) -> Result<Table, Status> {
let db = self
.dbs
.get(&db_name)
.ok_or_else(|| Status::not_found(format!("database not found: {:}", db_name)))?;
let table_id = db
.table_name_to_id
.get(&table_name)
.ok_or_else(|| Status::not_found(format!("table not found: {:}", table_name)))?;
let table = db.tables.get(&table_id).unwrap();
Ok(table.clone())
}
pub fn get_data_parts(&self, db_name: &str, table_name: &str) -> Option<Vec<DataPartInfo>> {
let parts = self.tbl_parts.get(db_name);
parts.and_then(|m| m.get(table_name)).map(Clone::clone)
}
pub fn append_data_parts(
&mut self,
db_name: &str,
table_name: &str,
append_res: &AppendResult,
) {
let part_info = || {
append_res
.parts
.iter()
.map(|p| {
let loc = &p.location;
DataPartInfo {
partition: Partition {
name: loc.clone(),
version: 0,
},
stats: Statistics {
read_bytes: p.disk_bytes,
read_rows: p.rows,
},
}
})
.collect::<Vec<_>>()
};
self.tbl_parts
.entry(db_name.to_string())
.and_modify(move |e| {
e.entry(table_name.to_string())
.and_modify(|v| v.append(&mut part_info()))
.or_insert_with(part_info);
})
.or_insert_with(|| {
[(table_name.to_string(), part_info())]
.iter()
.cloned()
.collect()
});
}
pub fn remove_table_data_parts(&mut self, db_name: &str, table_name: &str) |
pub fn remove_db_data_parts(&mut self, db_name: &str) {
self.tbl_parts.remove(db_name);
}
pub fn create_id(&mut self) -> i64 {
let id = self.next_id;
self.next_id += 1;
id
}
pub fn create_ver(&mut self) -> i64 {
let ver = self.next_ver;
self.next_ver += 1;
ver
}
}
| {
self.tbl_parts
.remove(db_name)
.and_then(|mut t| t.remove(table_name));
} |
bitcoin_tr_TR.ts | <TS language="tr_TR" version="2.1">
<context>
<name>AddressBookPage</name>
<message>
<source>Right-click to edit address or label</source>
<translation>Adresi veya etiketi düzenlemek için sağ tıklayın</translation>
</message>
<message>
<source>Create a new address</source>
<translation>Yeni adres oluştur</translation>
</message>
<message>
<source>&New</source>
<translation>&Yeni</translation>
</message>
<message>
<source>Copy the currently selected address to the system clipboard</source>
<translation>Seçili adresi panoya kopyala</translation>
</message>
<message>
<source>&Copy</source>
<translation>&Kopyala</translation>
</message>
<message>
<source>C&lose</source>
<translation>K&apat</translation>
</message>
<message>
<source>Delete the currently selected address from the list</source>
<translation>Seçili adresi listeden sil</translation>
</message>
<message>
<source>Export the data in the current tab to a file</source>
<translation>Seçili sekmedeki veriyi dosya olarak dışa aktar</translation>
</message>
<message>
<source>&Export</source>
<translation>&Dışa Aktar</translation>
</message>
<message>
<source>&Delete</source>
<translation>&Sil</translation>
</message>
<message>
<source>Choose the address to send coins to</source>
<translation>koinlerin gönderileceği adresi seçin</translation>
</message>
<message>
<source>Choose the address to receive coins with</source>
<translation>Alıcı adresi seçiniz</translation>
</message>
<message>
<source>C&hoose</source>
<translation>Seçim</translation>
</message>
<message>
<source>Sending addresses</source>
<translation>Gönderilen Adresler</translation>
</message>
<message>
<source>Receiving addresses</source>
<translation>Alınan Adresler</translation>
</message>
<message>
<source>These are your zoowcash addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
<translation>Bunlar ödeme göndermek için gereken zoowcash adreslerinizdir. Para göndermeden önce her zaman miktarı ve alıcı adresi kontrol edin.</translation>
</message>
<message>
<source>These are your zoowcash addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
<translation>Bunlar ödeme almak için kullanılacak zoowcash adreslerinizdir. Her işlem için yeni bir ödeme alma adresi kullanılması tavsiye edilir.</translation>
</message>
<message>
<source>&Copy Address</source>
<translation>Adresi Kopyala</translation>
</message>
<message>
<source>Copy &Label</source>
<translation>Kopyala ve Etiketle</translation>
</message>
<message>
<source>&Edit</source>
<translation>Düzenle</translation>
</message>
<message>
<source>Export Address List</source>
<translation>Adres Listesini Dışar Aktar</translation>
</message>
<message>
<source>Comma separated file (*.csv)</source>
<translation>Virgül ile ayrılmış dosya (*.csv)</translation>
</message>
<message>
<source>Exporting Failed</source>
<translation>Dışa Aktarma Başarısız</translation>
</message>
<message>
<source>There was an error trying to save the address list to %1. Please try again.</source>
<translation>Adres listesini %1'e kaydederken bir hata oluştu. Lütfen tekrar deneyin.</translation>
</message>
</context>
<context>
<name>AddressTableModel</name>
<message>
<source>Label</source>
<translation>etiket</translation>
</message>
<message>
<source>Address</source>
<translation>adres</translation>
</message>
<message>
<source>(no label)</source>
<translation>(etiket yok)</translation>
</message>
</context>
<context>
<name>AskPassphraseDialog</name>
<message>
<source>Passphrase Dialog</source>
<translation>Parola Diyaloğu</translation>
</message>
<message>
<source>Enter passphrase</source>
<translation>Parolayı girin</translation>
</message>
<message>
<source>New passphrase</source>
<translation>Yeni parola</translation>
</message>
<message>
<source>Repeat new passphrase</source>
<translation>Yeni parolayı tekrarla</translation>
</message>
<message>
<source>Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>ten or more random characters</b>, or <b>eight or more words</b>.</source>
<translation>Yeni parolayı cüzdana girin.<br/>Lütfen <b>on yada daha fazla karakter</b> veya <b>sekiz yada daha fazla kelime</b>içeren bir parola kullanın. </translation>
</message>
<message>
<source>Encrypt wallet</source>
<translation>Cüzdanı Şifrele</translation>
</message>
<message>
<source>This operation needs your wallet passphrase to unlock the wallet.</source>
<translation>Bu işlem, cüzdan kilidinizi açmak için parolanıza ihtiyaç duyuyor</translation>
</message>
<message>
<source>Unlock wallet</source>
<translation>Cüzdanı Kilitle</translation>
</message>
<message>
<source>This operation needs your wallet passphrase to decrypt the wallet.</source>
<translation>Bu işlem, cüzdan kilidinizi açmak için parolanıza ihtiyaç duyuyor</translation>
</message>
<message>
<source>Decrypt wallet</source>
<translation>Cüzdanın Şifresini Çöz</translation>
</message>
<message>
<source>Change passphrase</source>
<translation>Parolayı değiştir</translation>
</message>
<message>
<source>Enter the old passphrase and new passphrase to the wallet.</source>
<translation>Eski ve yeni parolanızı cüzdana girin.</translation>
</message>
<message>
<source>Confirm wallet encryption</source>
<translation>Cüzdan Şifrelemesini Onaylayın</translation>
</message>
<message>
<source>Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR ZOOWCASHS</b>!</source>
<translation>Uyarı: Eğer cüzdanınızı şifreleyip parolanızı kaybederseniz (unutursanız) , <b>BÜTÜN ZOOWCASH'LERINIZI KAYBEDECEKSINIZ</b>!</translation>
</message>
<message>
<source>Are you sure you wish to encrypt your wallet?</source>
<translation>Cüzdanınızı şifrelemek istediğinizden emin misiniz?</translation>
</message>
<message>
<source>Wallet encrypted</source>
<translation>Cüzdan Şifrelendi</translation>
</message>
<message>
<source>%1 will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your zoowcashs from being stolen by malware infecting your computer.</source>
<translation>%1 Şifreleme işlemini bitirmek için kapatılacak. Şunu unutmayın ki şampiyon galatasaray ve şifrelemek, zoowcashlerinizin bilgisayarınıza bulaşan malware yazılımları tarafından çalınmasını tamamen engelleyemez.</translation>
</message>
<message>
<source>IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet.</source>
<translation>ÖNEMLİ: Yeni oluşturduğunuz şifrelenmiş cüzdan dosyasını önceki yedeklenmiş cüzdan dosyasıyla değiştirmeniz gerekmektedir. Güvenlik sebeplerinden dolayı yeni, şifrelenmiş cüzdanınızı kullanmaya başlar başlamaz önceki şifrelenmemiş cüzdan yedekleri kullanılmaz hale gelecektir.</translation>
</message>
<message>
<source>Wallet encryption failed</source>
<translation>Cüzdan şifreleme başarısız oldu</translation>
</message>
<message>
<source>The supplied passphrases do not match.</source>
<translation>Girilen parolalar eşleşmiyor.</translation>
</message>
<message>
<source>Wallet unlock failed</source>
<translation>Cüzdan Kilidi Açma Hatası</translation>
</message>
<message>
<source>Warning: The Caps Lock key is on!</source>
<translation>Dikkat! Caps Lock tuşunuz açık!</translation>
</message>
</context>
<context>
<name>BanTableModel</name>
</context>
<context>
<name>BitcoinGUI</name>
<message>
<source>Sign &message...</source>
<translation>İmza &mesaj</translation>
</message>
<message>
<source>Synchronizing with network...</source>
<translation>Ağ ile bağlantı kuruluyor...</translation>
</message>
<message>
<source>&Transactions</source>
<translation>&İşlemler</translation>
</message>
<message>
<source>Browse transaction history</source>
<translation>İşlem geçmişinize göz atın</translation>
</message>
<message>
<source>E&xit</source>
<translation>Çıkış</translation>
</message>
<message>
<source>Quit application</source>
<translation>Başvuruyu iptal edin</translation>
</message>
<message>
<source>&About %1</source>
<translation>Hakkında%1</translation>
</message>
<message>
<source>Show information about %1</source>
<translation>%1 hakkındaki bilgileri görüntüle</translation>
</message>
<message>
<source>About &Qt</source>
<translation>Qt Hakkında</translation>
</message>
<message>
<source>Show information about Qt</source>
<translation>Qt hakkındaki bilgileri görüntüleyin</translation>
</message>
<message>
<source>&Options...</source>
<translation>&Seçenekler</translation>
</message>
<message>
<source>&Encrypt Wallet...</source>
<translation>&Cüzdan Şifreleme</translation>
</message>
<message>
<source>&Backup Wallet...</source>
<translation>&Cüzdan Yedekleme</translation>
</message>
<message>
<source>&Sending addresses...</source>
<translation>Gönderme adresleri</translation>
</message>
<message>
<source>&Receiving addresses...</source>
<translation>Alış adresleri</translation>
</message>
<message>
<source>Open &URI...</source>
<translation>URI'yi aç</translation>
</message>
<message>
<source>Network activity disabled.</source>
<translation>Ağ etkinliği devre dışı.</translation>
</message>
<message>
<source>Click to enable network activity again.</source>
<translation>Ağ aktivitesini tekrar başlatmak için tıklayın.</translation>
</message>
<message>
<source>Reindexing blocks on disk...</source>
<translation>Bloklar disk üzerinde yeniden indeksleniyor...</translation>
</message>
<message>
<source>Send coins to a zoowcash address</source>
<translation>zoowcash adresine madeni para gönderin</translation>
</message>
<message>
<source>Backup wallet to another location</source>
<translation>Cüzdanınızı başka bir lokasyona yedekleyin</translation>
</message>
<message>
<source>Open debugging and diagnostic console</source>
<translation>Hata giderme konsolunu aç</translation>
</message>
<message>
<source>&Verify message...</source>
<translation>Onay mesajı...</translation>
</message>
<message>
<source>zoowcash</source>
<translation>zoowcash</translation>
</message>
<message>
<source>Wallet</source>
<translation>Cüzdan</translation>
</message>
<message>
<source>&Send</source>
<translation>Gönder</translation>
</message>
<message>
<source>&Receive</source>
<translation>Al</translation>
</message>
<message>
<source>&Show / Hide</source>
<translation>Göster / Gizle</translation>
</message>
<message>
<source>&Settings</source>
<translation>&Ayarlar</translation>
</message>
<message>
<source>Show the list of used sending addresses and labels</source>
<translation>Kullanılan gönderim adreslerinin ve etiketlerinin listesini göster</translation>
</message>
<message>
<source>Show the list of used receiving addresses and labels</source>
<translation>Kullanılan alış adreslerinin ve etiketlerinin listesini göster</translation>
</message>
<message>
<source>&Command-line options</source>
<translation>Komut satırı ayarları</translation>
</message>
<message>
<source>Indexing blocks on disk...</source>
<translation>Bloklar disk üzerinde indeksleniyor...</translation>
</message>
<message>
<source>Error</source>
<translation>Hata</translation>
</message>
<message>
<source>Warning</source>
<translation>Uyarı</translation>
</message>
<message>
<source>Information</source>
<translation>Bilgi</translation>
</message>
<message>
<source>Date: %1
</source>
<translation>Tarih %1</translation>
</message>
<message>
<source>HD key generation is <b>enabled</b></source>
<translation>HD anahtar üretimi<b>aktif</b></translation>
</message>
<message>
<source>HD key generation is <b>disabled</b></source>
<translation>HD anahtar üretimi <b>pasif</b></translation>
</message>
</context>
<context>
<name>CoinControlDialog</name>
<message>
<source>Bytes:</source>
<translation>Bayt</translation>
</message>
<message>
<source>Fee:</source>
<translation>Ücret:</translation>
</message>
<message>
<source>After Fee:</source>
<translation>Ücretten sonra kalan:</translation>
</message>
<message>
<source>Change:</source>
<translation>Değişen:</translation>
</message>
<message>
<source>List mode</source>
<translation>Listeleme modu</translation>
</message>
<message>
<source>Date</source>
<translation>Tarih</translation>
</message>
<message>
<source>Confirmations</source>
<translation>Onaylamalar</translation>
</message>
<message>
<source>Confirmed</source>
<translation>Kabul edilen</translation>
</message>
<message>
<source>Copy address</source>
<translation>Adresi kopyala</translation>
</message>
<message>
<source>Copy label</source>
<translation>Etiketi kopyala</translation>
</message>
<message>
<source>Copy fee</source>
<translation>Ücreti kopyala</translation>
</message>
<message>
<source>(%1 locked)</source>
<translation>(%1 kilitli)</translation>
</message>
<message>
<source>yes</source>
<translation>Evet</translation>
</message>
<message>
<source>no</source>
<translation>Hayır</translation>
</message>
<message>
<source>(no label)</source>
<translation>(etiket yok)</translation>
</message>
</context>
<context>
<name>EditAddressDialog</name>
<message>
<source>Edit Address</source>
<translation>Adresi Düzenle</translation>
</message>
<message>
<source>&Label</source>
<translation>Etiket</translation>
</message>
<message>
<source>&Address</source>
<translation>Adres</translation>
</message>
<message>
<source>New receiving address</source>
<translation>Yeni alış adresi</translation>
</message>
<message>
<source>New sending address</source>
<translation>Yeni gönderim adresi</translation>
</message>
<message>
<source>Edit receiving address</source>
<translation>Alış adresini düzenleyin</translation>
</message>
<message>
<source>Edit sending address</source>
<translation>Gönderim adresini düzenleyin</translation>
</message> | <source>The entered address "%1" is not a valid zoowcash address.</source>
<translation>Girilen adres "%1" zoowcash adresiyle eşleşmiyor.</translation>
</message>
<message>
<source>The entered address "%1" is already in the address book.</source>
<translation>Girilen adres "%1" adres defterinde zaten kayıtlı.</translation>
</message>
<message>
<source>New key generation failed.</source>
<translation>Yeni anahtar üretimi başarısız.</translation>
</message>
</context>
<context>
<name>FreespaceChecker</name>
<message>
<source>name</source>
<translation>isim</translation>
</message>
</context>
<context>
<name>HelpMessageDialog</name>
<message>
<source>version</source>
<translation>versiyon</translation>
</message>
<message>
<source>About %1</source>
<translation>Hakkında %1</translation>
</message>
<message>
<source>Command-line options</source>
<translation>Komut satırı ayarları</translation>
</message>
<message>
<source>Usage:</source>
<translation>Kullanım:</translation>
</message>
<message>
<source>command-line options</source>
<translation>komut satırı ayarları</translation>
</message>
<message>
<source>UI Options:</source>
<translation>UI Ayarları:</translation>
</message>
<message>
<source>Set language, for example "de_DE" (default: system locale)</source>
<translation>Bir dil seçin, örneğin "de_DE" (seçilen: Sistem dili)</translation>
</message>
</context>
<context>
<name>Intro</name>
<message>
<source>Welcome</source>
<translation>Hoş geldiniz</translation>
</message>
<message>
<source>zoowcash</source>
<translation>zoowcash
</translation>
</message>
<message>
<source>Error</source>
<translation>Hata</translation>
</message>
</context>
<context>
<name>ModalOverlay</name>
<message>
<source>Form</source>
<translation>Form</translation>
</message>
<message>
<source>Number of blocks left</source>
<translation>Kalan blokların sayısı</translation>
</message>
<message>
<source>Unknown...</source>
<translation>Bilinmiyor...</translation>
</message>
<message>
<source>Last block time</source>
<translation>Son blok zamanı</translation>
</message>
<message>
<source>calculating...</source>
<translation>hesaplanıyor...</translation>
</message>
<message>
<source>Hide</source>
<translation>Gizle</translation>
</message>
</context>
<context>
<name>OpenURIDialog</name>
</context>
<context>
<name>OptionsDialog</name>
<message>
<source>Options</source>
<translation>Ayarlar</translation>
</message>
<message>
<source>&Main</source>
<translation>&Ana Menü</translation>
</message>
<message>
<source>Size of &database cache</source>
<translation>Veritabanı önbelleğinin boyutu</translation>
</message>
<message>
<source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
<translation>Proxy bağlantısı IP adresleri (örneğin IPv4: 127.0.0.1 / IPv6: ::1)</translation>
</message>
<message>
<source>Open Configuration File</source>
<translation>Konfigürasyon dosyasını aç</translation>
</message>
<message>
<source>Reset all client options to default.</source>
<translation>Bütün ayarları varsayılana çevir</translation>
</message>
<message>
<source>&Network</source>
<translation>Ağ</translation>
</message>
<message>
<source>W&allet</source>
<translation>Cüzdan</translation>
</message>
<message>
<source>Port of the proxy (e.g. 9050)</source>
<translation>Proxy portu (örneğin 9050)</translation>
</message>
<message>
<source>&Window</source>
<translation>Pencere</translation>
</message>
<message>
<source>User Interface &language:</source>
<translation>Kullanıcı arayüzü dili</translation>
</message>
<message>
<source>&OK</source>
<translation>Tamam</translation>
</message>
<message>
<source>&Cancel</source>
<translation>İptal</translation>
</message>
<message>
<source>default</source>
<translation>Varsayılan</translation>
</message>
<message>
<source>Client restart required to activate changes.</source>
<translation>Değişikliklerin aktif edilebilmesi için yeniden başlatma gerekiyor.</translation>
</message>
<message>
<source>Configuration options</source>
<translation>Konfigürasyon ayarları</translation>
</message>
<message>
<source>The configuration file is used to specify advanced user options which override GUI settings. Additionally, any command-line options will override this configuration file.</source>
<translation>Konfigürasyon dosyası GUI ayarlarını geçersiz kılmak için gelişmiş kullanıcı ayarlarını değiştirir. Ek olarak, herhangi bir komut satırı seçeneği konfigürasyon dosyasını geçersiz kılar.</translation>
</message>
<message>
<source>Error</source>
<translation>Hata</translation>
</message>
<message>
<source>The configuration file could not be opened.</source>
<translation>Konfigürasyon dosyası açılamadı.</translation>
</message>
<message>
<source>This change would require a client restart.</source>
<translation>Bu değişiklik istemcinin yeniden başlatılmasını gerektirir.</translation>
</message>
<message>
<source>The supplied proxy address is invalid.</source>
<translation>Sağlanan proxy adresi geçerli değil.</translation>
</message>
</context>
<context>
<name>OverviewPage</name>
<message>
<source>Form</source>
<translation>Form</translation>
</message>
<message>
<source>The displayed information may be out of date. Your wallet automatically synchronizes with the zoowcash network after a connection is established, but this process has not completed yet.</source>
<translation>Gösterilen bilgi geçerli olmayabilir. Bağlantı tekrar sağlandıktan sonra cüzdanınız otomatik olarak senkronize olacaktır. Henüz senkronize olma işlemi tamamlanmadı.</translation>
</message>
<message>
<source>Watch-only:</source>
<translation>Sadece görüntülenebilir:</translation>
</message>
<message>
<source>Available:</source>
<translation>Kullanılabilir:</translation>
</message>
<message>
<source>Your current spendable balance</source>
<translation>Mevcut harcanabilir tutarınız</translation>
</message>
<message>
<source>Pending:</source>
<translation>Bekleyen:</translation>
</message>
<message>
<source>Total:</source>
<translation>Toplam:</translation>
</message>
<message>
<source>Your current total balance</source>
<translation>Toplam mevcut miktarınız</translation>
</message>
<message>
<source>Your current balance in watch-only addresses</source>
<translation>Sadece görüntülenebilir adreslerdeki mevcut miktarınız</translation>
</message>
<message>
<source>Spendable:</source>
<translation>Harcanabilir:</translation>
</message>
<message>
<source>Recent transactions</source>
<translation>Yakın zamanda yapılmış işlemler</translation>
</message>
<message>
<source>Unconfirmed transactions to watch-only addresses</source>
<translation>Sadece görüntülenebilir adreslerdeki doğrulanmamış işlemler</translation>
</message>
<message>
<source>Current total balance in watch-only addresses</source>
<translation>Sadece görüntülenebilir adreslerdeki mevcut toplam miktar</translation>
</message>
</context>
<context>
<name>PaymentServer</name>
<message>
<source>Payment request error</source>
<translation>Ödeme isteği hatası</translation>
</message>
<message>
<source>Payment request fetch URL is invalid: %1</source>
<translation>Ödeme isteği URL'si hatalı: %1</translation>
</message>
<message>
<source>Invalid payment address %1</source>
<translation>Hatalı ödeme adresi %1</translation>
</message>
<message>
<source>Network request error</source>
<translation>Ağ hatası</translation>
</message>
</context>
<context>
<name>PeerTableModel</name>
<message>
<source>Sent</source>
<translation>Gönder</translation>
</message>
<message>
<source>Received</source>
<translation>Alındı</translation>
</message>
</context>
<context>
<name>QObject</name>
<message>
<source>Enter a zoowcash address (e.g. %1)</source>
<translation>zoowcash adresinizi girin (örneğin %1)</translation>
</message>
<message>
<source>N/A</source>
<translation>Yok</translation>
</message>
<message>
<source>%1 and %2</source>
<translation>%1 ve %2</translation>
</message>
<message>
<source>unknown</source>
<translation>bilinmiyor</translation>
</message>
</context>
<context>
<name>QObject::QObject</name>
<message>
<source>Error: %1</source>
<translation>Hata: %1</translation>
</message>
</context>
<context>
<name>QRImageWidget</name>
<message>
<source>&Save Image...</source>
<translation>&Görüntüyü kaydet</translation>
</message>
<message>
<source>&Copy Image</source>
<translation>&Görüntüyü kopyala</translation>
</message>
<message>
<source>Save QR Code</source>
<translation>QR kodu kaydet</translation>
</message>
</context>
<context>
<name>RPCConsole</name>
<message>
<source>N/A</source>
<translation>Yok</translation>
</message>
<message>
<source>Client version</source>
<translation>Arayüz versiyonu</translation>
</message>
<message>
<source>&Information</source>
<translation>&Bilgi</translation>
</message>
<message>
<source>Debug window</source>
<translation>Hata giderme penceresi</translation>
</message>
<message>
<source>General</source>
<translation>Genel</translation>
</message>
<message>
<source>Using BerkeleyDB version</source>
<translation>Kullanılan BerkeleyDB versiyonu</translation>
</message>
<message>
<source>Startup time</source>
<translation>Başlangıç zamanı</translation>
</message>
<message>
<source>Network</source>
<translation>Ağ</translation>
</message>
<message>
<source>Name</source>
<translation>İsim</translation>
</message>
<message>
<source>Number of connections</source>
<translation>Bağlantı sayısı</translation>
</message>
<message>
<source>Block chain</source>
<translation>Blok zinciri</translation>
</message>
<message>
<source>Memory usage</source>
<translation>Bellek kullanımı</translation>
</message>
<message>
<source>&Reset</source>
<translation>&Yeniden başlat</translation>
</message>
<message>
<source>Received</source>
<translation>Alındı</translation>
</message>
<message>
<source>Sent</source>
<translation>Gönder</translation>
</message>
<message>
<source>Whitelisted</source>
<translation>Beyaz listede</translation>
</message>
<message>
<source>Version</source>
<translation>Versiyon</translation>
</message>
<message>
<source>Services</source>
<translation>Servisler</translation>
</message>
<message>
<source>Connection Time</source>
<translation>Bağlantı süresi</translation>
</message>
<message>
<source>Last Send</source>
<translation>Son gönderim</translation>
</message>
<message>
<source>Last Receive</source>
<translation>Son alış</translation>
</message>
<message>
<source>Ping Time</source>
<translation>Ping süresi</translation>
</message>
<message>
<source>Ping Wait</source>
<translation>Ping bekliyor</translation>
</message>
<message>
<source>Last block time</source>
<translation>Son blok zamanı</translation>
</message>
<message>
<source>&Open</source>
<translation>&Aç</translation>
</message>
<message>
<source>&Console</source>
<translation>&Konsol</translation>
</message>
<message>
<source>&Network Traffic</source>
<translation>&Ağ trafiği</translation>
</message>
<message>
<source>Totals</source>
<translation>Toplam</translation>
</message>
<message>
<source>Clear console</source>
<translation>Konsolu temizle</translation>
</message>
<message>
<source>1 &hour</source>
<translation>1 &saat</translation>
</message>
<message>
<source>1 &day</source>
<translation>1 &gün</translation>
</message>
<message>
<source>1 &week</source>
<translation>1 &hafta</translation>
</message>
<message>
<source>1 &year</source>
<translation>1 &yıl</translation>
</message>
<message>
<source>&Disconnect</source>
<translation>&Bağlantı kesildi</translation>
</message>
<message>
<source>Network activity disabled</source>
<translation>Ağ aktivitesi pasif</translation>
</message>
<message>
<source>never</source>
<translation>asla</translation>
</message>
<message>
<source>Inbound</source>
<translation>Gelen</translation>
</message>
<message>
<source>Outbound</source>
<translation>Giden</translation>
</message>
<message>
<source>Yes</source>
<translation>Evet</translation>
</message>
<message>
<source>No</source>
<translation>Hayır</translation>
</message>
<message>
<source>Unknown</source>
<translation>Bilinmiyor</translation>
</message>
</context>
<context>
<name>ReceiveCoinsDialog</name>
<message>
<source>&Label:</source>
<translation>&Etiket</translation>
</message>
<message>
<source>&Message:</source>
<translation>&Mesaj</translation>
</message>
<message>
<source>Clear</source>
<translation>Temizle</translation>
</message>
<message>
<source>Show</source>
<translation>Göster</translation>
</message>
<message>
<source>Remove</source>
<translation>Sil</translation>
</message>
<message>
<source>Copy URI</source>
<translation>URI'yi kopyala</translation>
</message>
<message>
<source>Copy label</source>
<translation>Etiketi kopyala</translation>
</message>
<message>
<source>Copy message</source>
<translation>Mesajı kopyala</translation>
</message>
</context>
<context>
<name>ReceiveRequestDialog</name>
<message>
<source>QR Code</source>
<translation>QR kod</translation>
</message>
<message>
<source>Copy &URI</source>
<translation>URI'yi kopyala</translation>
</message>
<message>
<source>Copy &Address</source>
<translation>&Adresi Kopyala</translation>
</message>
<message>
<source>&Save Image...</source>
<translation>&Görüntüyü kaydet</translation>
</message>
<message>
<source>Payment information</source>
<translation>Ödeme bilgisi</translation>
</message>
<message>
<source>URI</source>
<translation>URI</translation>
</message>
<message>
<source>Address</source>
<translation>adres</translation>
</message>
<message>
<source>Label</source>
<translation>etiket</translation>
</message>
<message>
<source>Message</source>
<translation>Mesaj</translation>
</message>
</context>
<context>
<name>RecentRequestsTableModel</name>
<message>
<source>Date</source>
<translation>Tarih</translation>
</message>
<message>
<source>Label</source>
<translation>etiket</translation>
</message>
<message>
<source>Message</source>
<translation>Mesaj</translation>
</message>
<message>
<source>(no label)</source>
<translation>(etiket yok)</translation>
</message>
<message>
<source>(no message)</source>
<translation>(mesaj yok)</translation>
</message>
</context>
<context>
<name>SendCoinsDialog</name>
<message>
<source>Send Coins</source>
<translation>Coin gönder</translation>
</message>
<message>
<source>automatically selected</source>
<translation>Otomatik seçildi</translation>
</message>
<message>
<source>Bytes:</source>
<translation>Bayt</translation>
</message>
<message>
<source>Fee:</source>
<translation>Ücret:</translation>
</message>
<message>
<source>After Fee:</source>
<translation>Ücretten sonra kalan:</translation>
</message>
<message>
<source>Change:</source>
<translation>Değişen:</translation>
</message>
<message>
<source>Transaction Fee:</source>
<translation>Gönderim ücreti:</translation>
</message>
<message>
<source>Choose...</source>
<translation>Seçiniz...</translation>
</message>
<message>
<source>per kilobyte</source>
<translation>kilobyte başına</translation>
</message>
<message>
<source>Hide</source>
<translation>Gizle</translation>
</message>
<message>
<source>Recommended:</source>
<translation>Önerilen:</translation>
</message>
<message>
<source>Clear &All</source>
<translation>Hepsini sil</translation>
</message>
<message>
<source>Copy fee</source>
<translation>Ücreti kopyala</translation>
</message>
<message>
<source>%1 (%2 blocks)</source>
<translation>%1 (%2 blok)</translation>
</message>
<message>
<source>%1 to %2</source>
<translation>%1'den %2'e</translation>
</message>
<message>
<source>Are you sure you want to send?</source>
<translation>Göndermek istediğinize emin misiniz?</translation>
</message>
<message>
<source>or</source>
<translation>ya da</translation>
</message>
<message>
<source>Confirm send coins</source>
<translation>Coin gönderimini onaylayın</translation>
</message>
<message>
<source>Warning: Invalid zoowcash address</source>
<translation>Uyarı: Hatalı zoowcash adresi</translation>
</message>
<message>
<source>(no label)</source>
<translation>(etiket yok)</translation>
</message>
</context>
<context>
<name>SendCoinsEntry</name>
<message>
<source>&Label:</source>
<translation>&Etiket</translation>
</message>
<message>
<source>Paste address from clipboard</source>
<translation>Panodaki adresi yapıştırın</translation>
</message>
<message>
<source>Message:</source>
<translation>Mesaj:</translation>
</message>
</context>
<context>
<name>SendConfirmationDialog</name>
<message>
<source>Yes</source>
<translation>Evet</translation>
</message>
</context>
<context>
<name>ShutdownWindow</name>
</context>
<context>
<name>SignVerifyMessageDialog</name>
<message>
<source>Paste address from clipboard</source>
<translation>Panodaki adresi yapıştırın</translation>
</message>
<message>
<source>Signature</source>
<translation>İmza</translation>
</message>
<message>
<source>Sign &Message</source>
<translation>İmza &Mesaj</translation>
</message>
<message>
<source>Clear &All</source>
<translation>Hepsini sil</translation>
</message>
<message>
<source>The entered address is invalid.</source>
<translation>Girilen adres hatalı.</translation>
</message>
<message>
<source>Please check the address and try again.</source>
<translation>Adresi kontrol ettikten sonra lütfen tekrar deneyin.</translation>
</message>
<message>
<source>Please check the signature and try again.</source>
<translation>İmzanızı kontrol ettikten sonra lütfen tekrar deneyin.</translation>
</message>
<message>
<source>Message verification failed.</source>
<translation>Mesaj onayı hatalı.</translation>
</message>
<message>
<source>Message verified.</source>
<translation>Mesaj onaylandı.</translation>
</message>
</context>
<context>
<name>SplashScreen</name>
</context>
<context>
<name>TrafficGraphWidget</name>
</context>
<context>
<name>TransactionDesc</name>
<message>
<source>Status</source>
<translation>Durum</translation>
</message>
<message>
<source>Date</source>
<translation>Tarih</translation>
</message>
<message>
<source>Source</source>
<translation>Kaynak</translation>
</message>
<message>
<source>Generated</source>
<translation>Oluşturuldu</translation>
</message>
<message>
<source>unknown</source>
<translation>bilinmiyor</translation>
</message>
<message>
<source>label</source>
<translation>etiket</translation>
</message>
<message>
<source>not accepted</source>
<translation>kabul edilmedi</translation>
</message>
<message>
<source>Transaction fee</source>
<translation>Gönderim ücreti</translation>
</message>
<message>
<source>Message</source>
<translation>Mesaj</translation>
</message>
<message>
<source>Comment</source>
<translation>Yorum</translation>
</message>
<message>
<source>Transaction total size</source>
<translation>Gönderimin toplam boyutu</translation>
</message>
<message>
<source>Debug information</source>
<translation>Hata giderme bilgisi</translation>
</message>
<message>
<source>true</source>
<translation>doğru</translation>
</message>
<message>
<source>false</source>
<translation>anlış</translation>
</message>
</context>
<context>
<name>TransactionDescDialog</name>
</context>
<context>
<name>TransactionTableModel</name>
<message>
<source>Date</source>
<translation>Tarih</translation>
</message>
<message>
<source>Type</source>
<translation>Tip</translation>
</message>
<message>
<source>Label</source>
<translation>etiket</translation>
</message>
<message>
<source>Confirmed (%1 confirmations)</source>
<translation>Onaylandı (%1 onaylanan)</translation>
</message>
<message>
<source>Generated but not accepted</source>
<translation>Oluşturuldu fakat kabul edilmedi</translation>
</message>
<message>
<source>Received with</source>
<translation>ile alındı</translation>
</message>
<message>
<source>Mined</source>
<translation>Kazıldı</translation>
</message>
<message>
<source>(n/a)</source>
<translation>(yok)</translation>
</message>
<message>
<source>(no label)</source>
<translation>(etiket yok)</translation>
</message>
</context>
<context>
<name>TransactionView</name>
<message>
<source>All</source>
<translation>Hepsi</translation>
</message>
<message>
<source>Today</source>
<translation>Bugün</translation>
</message>
<message>
<source>This week</source>
<translation>Bu hafta</translation>
</message>
<message>
<source>This month</source>
<translation>Bu Ay</translation>
</message>
<message>
<source>Last month</source>
<translation>Son ay</translation>
</message>
<message>
<source>This year</source>
<translation>Bu yıl</translation>
</message>
<message>
<source>Received with</source>
<translation>ile alındı</translation>
</message>
<message>
<source>Mined</source>
<translation>Kazıldı</translation>
</message>
<message>
<source>Other</source>
<translation>Diğerleri</translation>
</message>
<message>
<source>Copy address</source>
<translation>Adresi kopyala</translation>
</message>
<message>
<source>Copy label</source>
<translation>Etiketi kopyala</translation>
</message>
<message>
<source>Comma separated file (*.csv)</source>
<translation>Virgül ile ayrılmış dosya (*.csv)</translation>
</message>
<message>
<source>Confirmed</source>
<translation>Kabul edilen</translation>
</message>
<message>
<source>Date</source>
<translation>Tarih</translation>
</message>
<message>
<source>Type</source>
<translation>Tip</translation>
</message>
<message>
<source>Label</source>
<translation>etiket</translation>
</message>
<message>
<source>Address</source>
<translation>adres</translation>
</message>
<message>
<source>Exporting Failed</source>
<translation>Dışa Aktarma Başarısız</translation>
</message>
</context>
<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
<name>WalletFrame</name>
</context>
<context>
<name>WalletModel</name>
<message>
<source>Send Coins</source>
<translation>Coin gönder</translation>
</message>
<message>
<source>New fee:</source>
<translation>Yeni ücret:</translation>
</message>
</context>
<context>
<name>WalletView</name>
<message>
<source>&Export</source>
<translation>&Çıkar</translation>
</message>
<message>
<source>Backup Wallet</source>
<translation>Cüzdanı yedekle</translation>
</message>
<message>
<source>Backup Failed</source>
<translation>Yedekleme başarısız</translation>
</message>
<message>
<source>Backup Successful</source>
<translation>Yedekleme tamamlandı</translation>
</message>
</context>
<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
<translation>Ayarlar:</translation>
</message>
<message>
<source>Accept command line and JSON-RPC commands</source>
<translation>JSON-RPC komutları ile komut satırını onaylayın</translation>
</message>
<message>
<source>zoowcash Core</source>
<translation>zoowcash Çekirdeği</translation>
</message>
<message>
<source><category> can be:</source>
<translation><category> can be:</translation>
</message>
<message>
<source>Block creation options:</source>
<translation>Blok oluşturma ayarları:</translation>
</message>
<message>
<source>Connection options:</source>
<translation>Bağlantı ayarları:</translation>
</message>
<message>
<source>Copyright (C) %i-%i</source>
<translation>Copyright (C) %i-%i</translation>
</message>
<message>
<source>Debugging/Testing options:</source>
<translation>Hata giderme/test ayarları:</translation>
</message>
<message>
<source>Error: Disk space is low!</source>
<translation>Hata: Disk boyutu düşük!</translation>
</message>
<message>
<source>Loading P2P addresses...</source>
<translation>P2P adresleri yükleniyor...</translation>
</message>
<message>
<source>Loading banlist...</source>
<translation>Ban listesi yükleniyor...</translation>
</message>
<message>
<source>Print this help message and exit</source>
<translation>Bu yardım mesajını yazdır ve çıkış yap</translation>
</message>
<message>
<source>Print version and exit</source>
<translation>Versiyonu yazdır ve çıkış yap</translation>
</message>
<message>
<source>Verifying blocks...</source>
<translation>Bloklar Onaylanıyor...</translation>
</message>
<message>
<source>Wallet needed to be rewritten: restart %s to complete</source>
<translation>%s tamamlanması için cüzdanın yeniden başlatılması gerekiyor</translation>
</message>
<message>
<source>Wallet options:</source>
<translation>Cüzdan Ayarları</translation>
</message>
<message>
<source>(default: %u)</source>
<translation>(varsayılan: %u)</translation>
</message>
<message>
<source>Error reading from database, shutting down.</source>
<translation>Veritabanı okuma hatası, kapatıldı.</translation>
</message>
<message>
<source>Information</source>
<translation>Bilgi</translation>
</message>
<message>
<source>Invalid -onion address or hostname: '%s'</source>
<translation>Hatalı -onion adresi ya da host adı: '%s'</translation>
</message>
<message>
<source>RPC server options:</source>
<translation>RPC sunucu ayarları</translation>
</message>
<message>
<source>This is experimental software.</source>
<translation>Bu deneysel bir yazılımdır.</translation>
</message>
<message>
<source>Tor control port password (default: empty)</source>
<translation>Tor kontrolü portu şifresi (varsayılan: boş bırakınız)</translation>
</message>
<message>
<source>Transaction too large</source>
<translation>İşlem çok büyük</translation>
</message>
<message>
<source>Username for JSON-RPC connections</source>
<translation>JSON-RPC bağlantıları için kullanıcı adı</translation>
</message>
<message>
<source>Verifying wallet(s)...</source>
<translation>Cüzdan(lar) onaylanıyor...</translation>
</message>
<message>
<source>Warning</source>
<translation>Uyarı</translation>
</message>
<message>
<source>Password for JSON-RPC connections</source>
<translation>JSON-RPC bağlantıları için şifre</translation>
</message>
<message>
<source>(default: %s)</source>
<translation>(varsayılan: %s)</translation>
</message>
<message>
<source>Specify configuration file (default: %s)</source>
<translation>Yapılandırma dosyasını belirle (varsayılan: %s)</translation>
</message>
<message>
<source>Specify connection timeout in milliseconds (minimum: 1, default: %d)</source>
<translation>Milisaniyelik zaman aşımına uğramış bağlantıyı belirle (minimum: 1, varsayılan: %d)</translation>
</message>
<message>
<source>Specify pid file (default: %s)</source>
<translation>Pid dosyasını belirle (Varsayılan: %s)</translation>
</message>
<message>
<source>Spend unconfirmed change when sending transactions (default: %u)</source>
<translation>İşlem gönderiminde onaylanmamış değişimi öde (Varsayılan: %u)</translation>
</message>
<message>
<source>Starting network threads...</source>
<translation>Bağlantı konuları başlıyor</translation>
</message>
<message>
<source>The wallet will avoid paying less than the minimum relay fee.</source>
<translation>Cüzdan minimum değişim ücretinden daha düşük olan ödemeyi önleyecektir</translation>
</message>
<message>
<source>This is the minimum transaction fee you pay on every transaction.</source>
<translation>Her işlem için minimum işlem ücretiniz budur</translation>
</message>
<message>
<source>This is the transaction fee you will pay if you send a transaction.</source>
<translation>Bir işlem göndermeniz durumunda işlem ücretiniz budur</translation>
</message>
<message>
<source>Threshold for disconnecting misbehaving peers (default: %u)</source>
<translation>Sorunlu emsalleri koparma eşiği (Varsayılan: %u)</translation>
</message>
<message>
<source>Transaction amounts must not be negative</source>
<translation>İşlem miktarı negatif olmamalı</translation>
</message>
<message>
<source>Transaction has too long of a mempool chain</source>
<translation>İşlem çok uzun bir bellek havuzu zincirine sahip</translation>
</message>
<message>
<source>Transaction must have at least one recipient</source>
<translation>İşlemin en az bir alıcıya sahip olmalı</translation>
</message>
<message>
<source>Unknown network specified in -onlynet: '%s'</source>
<translation>Belirsiz ağ belirtildi -onlynet: '%s'</translation>
</message>
<message>
<source>Insufficient funds</source>
<translation>Yetersiz Bakiye</translation>
</message>
<message>
<source>Loading block index...</source>
<translation>Blok indeksi yükleniyor</translation>
</message>
<message>
<source>Loading wallet...</source>
<translation>Cüzdan Bekleniyor...</translation>
</message>
<message>
<source>Cannot downgrade wallet</source>
<translation>Cüzdan indirgenememektedir</translation>
</message>
<message>
<source>Rescanning...</source>
<translation>Tekrar taranıyor...</translation>
</message>
<message>
<source>Done loading</source>
<translation>Yükleme tamamlandı</translation>
</message>
<message>
<source>Error</source>
<translation>Hata</translation>
</message>
</context>
</TS> | <message> |
main.py | from lib.types import IStdin, IStdout
def main(stdin: IStdin, stdout: IStdout):
| stdout.write('*** You are a student at PWN_University and you are all set to graduate at the end of the semester. Unfortunately the night before graduation you learned you were going to fail your last class and now you’re afraid the school wont let you graduate. Luckily you have a friend in IT and after hearing of your situation he casually sends you a message with the IP address for one of the schools secure servers. Your goal is to hack into the server and figure out a way to change your grade! ***\n')
stdout.write('\n')
stdout.write('You are requesting access to an offical PWN_University server. Only authorised individuals are allowed further.\n')
stdout.write('\n')
stdout.write('*** You remember one of your IT friends who works for the university keeps their username encoded on their desk incase they forget the spelling. So you go to their desk and find out its MTMzN3VzZXI= ***\n')
stdout.write('\n')
stdout.write('Enter your username: ')
stdout.flush()
username = stdin.readline().strip('\n')
if username == '1337user':
stdout.write('\n')
stdout.write('*** You then remember there was a data breach of all university passwords. Luckily PWN_University does not store their passwords in plain text, but rather in MD5 hashes. You navigate to the one associated with your friends username and it is 90f2c9c53f66540e67349e0ab83d8cd0 ***\n')
stdout.write('\n')
stdout.write('Now please enter your password: ')
stdout.flush()
password = stdin.readline().strip('\n')
if password == 'p@ssword':
stdout.write('Login Successful!\n')
stdout.write('\n')
stdout.write('*** Now that you have logged into the server you remember your IT friend implying that the database of grades is a mysql databse. Maybe you should try changing directories to where that is commonly stored (please use the full path) ***\n')
stdout.write('\n')
stdout.write('~$ ')
stdout.flush()
path = stdin.readline().strip('\n')
if path == 'cd /var/lib/mysql':
stdout.write('\n')
stdout.write('*** Wow it looks like your getting close you are now in the mysql directory. You run some SQL queries on the grades database and are able to select the string that says \'PWNER1337 has a F\'. All you have to do is replace F with an A (type in the SQL command to do this bellow) ***\n')
stdout.write('\n')
stdout.write('mysql> ')
stdout.flush()
sql = stdin.readline().strip('\n')
#if sql == 'REPLACE(\'PWNER1337 has a F\', \'F\', \'A\');':
if 'REPLACE' in sql and 'PWNER1337' in sql and 'F' in sql and 'A' in sql:
stdout.write('\n')
stdout.write('*** Congratulations you changed your grade from an F to an A. Unfortunatly the university caught you in the act, but because you were able to hack PWN_University they decided to let you graduate after all! ***\n')
stdout.write('\n')
stdout.write('*** Present this flag to the challenge oragnizer to claim your prize! flag{CI_NETSEC_1ST_COMP}\n')
else :
stdout.write('\n')
stdout.write('*** Oh no looks like you entered the wrong SQL command maybe you should try reconnecting to the server and try another answer... ***\n')
else :
stdout.write('\n')
stdout.write('*** Oh no looks like you entered the wrong path maybe you should try reconnecting to the server and try another answer... ***\n')
else :
stdout.write('\n')
stdout.write('Thats not the correct password access denied!\n')
stdout.write('*** Oh no looks like your access was denied maybe you should try reconnecting to the server and try another answer... ***\n')
else :
stdout.write('\n')
stdout.write('Thats not a valid username access denied!\n')
stdout.write('*** Oh no looks like your access was denied maybe you should try reconnecting to the server and try another answer... ***\n')
|
|
survey.component.ts | import { Component, Input } from '@angular/core';
import * as Survey from 'survey-angular';
import { InsertService } from '../insert/insert.service';
import { addQuestionTypes } from './question-types';
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
import { Router, ActivatedRoute } from '@angular/router';
@Component({
selector: 'survey',
template: `<div class="survey-container contentcontainer codecontainer"><div id="surveyElement"></div></div>`,
styleUrls: ['./survey.component.scss']
})
export class | {
@Input() jsonData: any;
@Input() onComplete: Function;
public surveyModel: Survey.SurveyModel;
public onPageUpdate: BehaviorSubject<Survey.SurveyModel> = new BehaviorSubject<Survey.SurveyModel>(null);
private clientId: string;
constructor(private insertService: InsertService, private _router: Router) { }
ngOnInit() {
addQuestionTypes(Survey);
let surveyModel = new Survey.Model(this.jsonData);
surveyModel.showQuestionNumbers = 'off';
// Survey.Survey.cssType = "bootstrap"; //This breaks IE 11
Survey.defaultBootstrapCss.page.root = "sv_page";
Survey.defaultBootstrapCss.pageDescription = "sv_page_description";
Survey.defaultBootstrapCss.pageTitle = "sv_page_title";
Survey.defaultBootstrapCss.navigationButton = "btn btn-primary";
Survey.defaultBootstrapCss.question.title = "sv_q_title";
Survey.defaultBootstrapCss.question.description = "sv_q_description small";
Survey.defaultBootstrapCss.panel.title = "sv_p_title";
Survey.defaultBootstrapCss.panel.container = "sv_p_container";
Survey.defaultBootstrapCss.panel.description = "sv_p_description";
Survey.defaultBootstrapCss.row = "sv_row";
Survey.defaultBootstrapCss.matrixdynamic.button = "btn btn-default";
Survey.defaultBootstrapCss.paneldynamic.button = "btn btn-default";
Survey.defaultBootstrapCss.paneldynamic.root = "sv_p_dynamic"; // not used?
Survey.dxSurveyService.serviceUrl = "api/survey";
surveyModel.onComplete.add((sender, options) => {
// generate a client identifier. replace this with a hashed value.
let date = new Date();
this.clientId = date.getTime() + "-survey";
surveyModel.sendResult("PotentialApplicantResult", this.clientId);
if (this.onComplete) {
this.onComplete(sender.data);
}
});
// redirect the user after the send to database is finished.
surveyModel.onSendResult.add((sender, options) => {
// redirect to results page
var data = JSON.stringify(sender.data);
// redirect to the results page.
this._router.navigate(['result', this.clientId])
});
surveyModel.onCurrentPageChanged.add((sender, options) => {
this.onPageUpdate.next(sender)
});
Survey.SurveyNG.render('surveyElement', { model: surveyModel });
this.surveyModel = surveyModel;
// this.insertService.updateInsert('sidebar-left',
// {type: 'survey-sidebar', inputs: {survey: this}});
// this.onPageUpdate.next(surveyModel);
//}
//changePage(pageNo: number) {
// this.surveyModel.currentPageNo = pageNo;
//}
}
}
| SurveyComponent |
checker.go | package appregistry
import (
"archive/tar"
"io"
)
func NewFormatChecker() *formatChecker {
return &formatChecker{}
}
type formatChecker struct {
fileCount int
isNestedBundle bool
}
func (b *formatChecker) IsNestedBundleFormat() bool {
return b.isNestedBundle
}
// Process determines format type for a given operator manifest.
//
// In order to be backwards compatible, we support two formats:
// a. Flattened: Similar to configMap 'data' format, the entire operator
// manifest is stored in one file.
// b. Nested Bundle: Operator bundle format as defined by operator registry.
//
// Operator Courier archives a flattened format file as shown below:
// /
// |──bundle.yaml
//
// Whereas, nested operator bundle has the following format:
// manifests
// |──etcd
// | |──etcdcluster.crd.yaml
// | |──etcdoperator.clusterserviceversion.yaml
// |──prometheus
// | |──prometheus.crd.yaml
// | |──prometheus.clusterserviceversion.yaml
//
// When we decide to drop support for flattened format, we will no longer have
// any use for this function, we can remove it then.
// While we support both, this is where we determine the format so that we can
// execute the right tar ball processor.
//
// This function maintains state associated with a tar file, so it can be used
// for a single tar file only. The caller is responsible for creating a new
// instance for each tar ball it handles.
func (b *formatChecker) Process(header *tar.Header, reader io.Reader) (done bool, err error) {
// We expect tar ball using flattened format to contain exactly one file.
// So if we run into more than one file then we deem the tar to be
// a manifest using operator bundle format.
if header.Typeflag == tar.TypeReg {
b.fileCount += 1
if b.fileCount > 1 {
b.isNestedBundle = true |
done = true
return
}
}
return
}
|
|
initialize.js | /* -------------------------------------------------+
Title: Mate Rio - Admin Template
Framework: Materialize
Version: 1.0 stable
Author: Jozef Dvorský, http://www.creatingo.com
+-------------------------------------------------- */
(function($){
$(function(){
"use strict";
var window_width = $(window).width();
// Color Palette - convert rgb to hex value string
function r | rgb) {
if (/^#[0-9A-F]{6}$/i.test(rgb)) { return rgb; }
rgb = rgb.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);
if (rgb === null) { return "N/A"; }
function hex(x) {
return ("0" + parseInt(x).toString(16)).slice(-2);
}
return "#" + hex(rgb[1]) + hex(rgb[2]) + hex(rgb[3]);
}
// Color Palette - auto add color captions
$('.dynamic-color .col').each(function () {
$(this).children().each(function () {
var color = $(this).css('background-color'),
classes = $(this).attr('class');
$(this).html(rgb2hex(color) + " " + classes);
if (classes.indexOf("darken") >= 0 || $(this).hasClass('black')) {
$(this).css('color', 'rgba(255,255,255,.9');
} else {
$(this).css('color', 'rgba(0,0,0,.9');
}
});
});
$('.slider').slider({full_width: true});
$('.button-collapse').sideNav();
$('.datepicker').pickadate({selectYears: 20});
$('select').not('.disabled').material_select();
$('.materialboxed').materialbox();
$('.modal-trigger').leanModal();
$('.tabs-wrapper').pushpin({ top: 240 });
$('.scrollspy').scrollSpy();
// Handlig window resize actions, after resize event is done
var rtime;
var timeout = false;
var delta = 200;
$(window).resize(function() {
rtime = new Date();
if (timeout === false) {
timeout = true;
setTimeout(resizeend, delta);
}
});
function resizeend() {
if (new Date() - rtime < delta) {
setTimeout(resizeend, delta);
} else {
timeout = false;
// Here goes custom actions
$('#slide-menu').simplebar('recalculate');
}
}
// Set checkbox on forms.html to indeterminate
var indeterminateCheckbox = document.getElementById('indeterminate-checkbox');
if (indeterminateCheckbox !== null)
indeterminateCheckbox.indeterminate = true;
// Floating-Fixed table of contents
if ($('nav').length) {
$('.toc-wrapper').pushpin({ top: $('nav').height() });
}
else if ($('#index-banner').length) {
$('.toc-wrapper').pushpin({ top: $('#index-banner').height() });
}
else {
$('.toc-wrapper').pushpin({ top: 0 });
}
}); // end of document ready
})(jQuery); // end of jQuery name space | gb2hex( |
result1.rs | // result1.rs
// Make this test pass! Execute `rustlings hint result1` for hints :)
#[derive(PartialEq, Debug)]
struct PositiveNonzeroInteger(u64);
#[derive(PartialEq, Debug)]
enum CreationError {
Negative,
Zero,
}
impl PositiveNonzeroInteger {
fn new(value: i64) -> Result<PositiveNonzeroInteger, CreationError> {
if value == 0 {
Err(CreationError::Zero)
} else if value < 0{
Err(CreationError::Negative)
} else {
Ok(PositiveNonzeroInteger(value as u64))
}
}
}
#[test]
fn test_creation() | {
assert!(PositiveNonzeroInteger::new(10).is_ok());
assert_eq!(
Err(CreationError::Negative),
PositiveNonzeroInteger::new(-10)
);
assert_eq!(Err(CreationError::Zero), PositiveNonzeroInteger::new(0));
} |
|
knight.go | package controller
import (
"encoding/json"
"fmt"
"github.com/kartmatias/chess_move_go/model"
"math"
"net/http"
"regexp"
"strconv"
"strings"
)
type KnightHandler struct {
Store *model.PositionStore
}
type coordinate struct {
x int
y int
}
var (
//https://regex101.com/
getRequest = regexp.MustCompile(`^\/knight\/[a-h][1-8]$`)
listRequest = regexp.MustCompile(`\/knight[\/]*$`)
)
func (h *KnightHandler) ServeHTTP(writer http.ResponseWriter, request *http.Request) {
writer.Header().Set("content-type", "application/json")
switch {
case request.Method == http.MethodGet && getRequest.MatchString(request.URL.Path):
h.Get(writer, request)
case request.Method == http.MethodGet && listRequest.MatchString(request.URL.Path):
h.List(writer, request)
case request.Method == http.MethodPost :
h.Post(writer, request)
}
}
func (h *KnightHandler) Get(w http.ResponseWriter, r *http.Request) {
position := strings.ReplaceAll(getRequest.FindString(r.URL.Path), "/knight/", "")
if !IsValidPosition(position) {
ReturnError(w, http.StatusInternalServerError, "INVALID POSITION")
return
}
fmt.Println(position)
h.generate()
h.Store.RLock()
positions := make([]model.Position, 0, len(h.Store.List))
for _, value := range h.Store.List {
if isValidMove(position, value.ID) {
positions = append(positions, value)
}
}
h.Store.RUnlock()
jbytes, err := json.Marshal(positions)
if err != nil {
ReturnError(w, http.StatusInternalServerError, "Error when listing")
return
}
w.WriteHeader(http.StatusOK)
w.Write(jbytes)
}
func (h *KnightHandler) Post(w http.ResponseWriter, r *http.Request) {
var p model.Position
if err := json.NewDecoder(r.Body).Decode(&p); err != nil {
ReturnError(w, http.StatusInternalServerError, "EMPTY BODY")
}
if !IsValidPosition(p.ID) {
ReturnError(w, http.StatusInternalServerError, "INVALID POSITION")
return
}
h.Store.Lock()
h.Store.List[p.ID] = p
h.Store.Unlock()
jsonBytes, err := json.Marshal(p)
if err != nil {
ReturnError(w, http.StatusInternalServerError, "Internal server error")
return
}
w.WriteHeader(http.StatusOK)
w.Write(jsonBytes)
}
func (h *KnightHandler) List(w http.ResponseWriter, r *http.Request) {
h.Store.RLock()
positions := make([]model.Position, 0, len(h.Store.List))
for _, value := range h.Store.List {
positions = append(positions, value)
}
h.Store.RUnlock()
jbytes, err := json.Marshal(positions)
if err != nil {
ReturnError(w, http.StatusInternalServerError, "Error when listing")
return
}
w.WriteHeader(http.StatusOK)
w.Write(jbytes)
}
func (h *KnightHandler) generate() {
if len(h.Store.List) != 0 {
return
}
list := GenerateValidPositions()
for _, position := range list {
h.Store.Lock()
h.Store.List[position.ID] = position
h.Store.Unlock()
}
}
func GetX(pos string) int {
return int(CharCodeAt(pos, 0) - 96)
}
func GetY(pos string) int {
y, err := strconv.Atoi( Substr(pos,1,1) )
if err != nil {
return 0
}
return y
}
func IsValidPosition(position string) bool {
var validPos = regexp.MustCompile(`(?m)[a-h][1-8]$`)
matches := validPos.FindStringSubmatch(position)
if len(matches) < 1 {
return false
}
return true
}
func (h *KnightHandler) ValidMoves(w http.ResponseWriter, r *http.Request) {
h.Store.RLock()
positions := make([]model.Position, 0, len(h.Store.List))
for _, value := range h.Store.List {
if isValidMove("a1", "a2") {
positions = append(positions, value)
}
}
h.Store.RUnlock()
jbytes, err := json.Marshal(positions)
if err != nil |
w.WriteHeader(http.StatusOK)
w.Write(jbytes)
}
func isValidMove(origin string, destination string) bool {
var p1 = coordinate{x: GetX(origin), y: GetY(origin)}
var p2 = coordinate{x: GetX(destination), y: GetY(destination)}
return (math.Abs(float64(p2.x - p1.x)) == 1) &&
(math.Abs(float64(p2.y - p1.y)) == 2) ||
(math.Abs(float64(p2.x - p1.x)) == 2) &&
(math.Abs(float64(p2.y - p1.y)) == 1)
}
func GenerateValidPositions() []model.Position {
positions := make([]model.Position, 0, 63)
for i := 1; i < 9; i++ {
for j := 1; j < 9; j++ {
strPos := string(96 + i) + strconv.Itoa(j)
positions = append(positions,model.Position{ID: strPos, Position: strPos})
}
}
return positions
}
| {
ReturnError(w, http.StatusInternalServerError, "Error when listing")
return
} |
Opengauss_Function_MOT_Case0025.py | """
Copyright (c) 2022 Huawei Technologies Co.,Ltd.
openGauss is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details.
"""
'''
Case Type: MOT不支持的数据类型
Case Name: MOT不支持的数据类型Reltime
'''
import unittest
import sys
sys.path.append(sys.path[0] + "/../")
from testcase.utils.Constant import Constant
from testcase.utils.CommonSH import CommonSH
from testcase.utils.Logger import Logger
logger = Logger()
class Mot_datatype_test(unittest.TestCase):
def setUp(self):
self.sh_primysh = CommonSH('PrimaryDbUser')
self.constant = Constant()
# logger.info('------------修改配置,并重启数据库------------')
# self.configitem = "enable_incremental_checkpoint=off"
# mod_msg = self.sh_primysh.execute_gsguc('set', self.constant.GSGUC_SUCCESS_MSG, self.configitem) | # startmsg = str(self.sh_primysh.start_db_cluster())
# self.assertTrue(stopmsg)
# self.assertTrue(startmsg)
def test_mot_none_datatype_array(self):
logger.info("------------------------Opengauss_Function_MOT_Case0025开始执行---------------------")
self.schema = 'schema_mot_test'
self.tablename = 'MOTTable'
self.datatype = 'reltime'
self.sql_cmd = f'''CREATE SCHEMA {self.schema};
CREATE FOREIGN TABLE {self.schema}.{self.tablename}(t1 {self.datatype});
DROP SCHEMA {self.schema} CASCADE;
'''
logger.info("-------------------------开始用例测试:MOT不支持数据类型reltime--------------------------")
msg = self.sh_primysh.execut_db_sql(self.sql_cmd)
logger.info(msg)
self.assertIn(self.constant.NOT_SUPPORTED_TYPE, msg)
def tearDown(self):
# logger.info('-----------恢复配置,并重启数据库-----------')
# self.configitem = "enable_incremental_checkpoint=on"
# mod_msg = self.sh_primysh.execute_gsguc('set', self.constant.GSGUC_SUCCESS_MSG, self.configitem)
# stopmsg = str(self.sh_primysh.stop_db_cluster())
# startmsg = str(self.sh_primysh.start_db_cluster())
# self.assertTrue(stopmsg)
# self.assertTrue(startmsg)
logger.info('---------------Opengauss_Function_MOT_Case0025执行结束---------------') | # stopmsg = str(self.sh_primysh.stop_db_cluster()) |
pcr25.rs | #[doc = "Reader of register PCR25"]
pub type R = crate::R<u32, super::PCR25>;
#[doc = "Writer for register PCR25"]
pub type W = crate::W<u32, super::PCR25>;
#[doc = "Register PCR25 `reset()`'s with value 0"]
impl crate::ResetValue for super::PCR25 {
type Type = u32;
#[inline(always)]
fn reset_value() -> Self::Type {
0
}
}
#[doc = "Pull Select\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum PS_A {
#[doc = "0: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set."]
PS_0,
#[doc = "1: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set."]
PS_1,
}
impl From<PS_A> for bool {
#[inline(always)]
fn from(variant: PS_A) -> Self {
match variant {
PS_A::PS_0 => false,
PS_A::PS_1 => true,
}
}
}
#[doc = "Reader of field `PS`"]
pub type PS_R = crate::R<bool, PS_A>;
impl PS_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> PS_A {
match self.bits {
false => PS_A::PS_0,
true => PS_A::PS_1,
}
}
#[doc = "Checks if the value of the field is `PS_0`"]
#[inline(always)]
pub fn is_ps_0(&self) -> bool {
*self == PS_A::PS_0
}
#[doc = "Checks if the value of the field is `PS_1`"]
#[inline(always)]
pub fn is_ps_1(&self) -> bool {
*self == PS_A::PS_1
}
}
#[doc = "Write proxy for field `PS`"]
pub struct PS_W<'a> {
w: &'a mut W,
}
impl<'a> PS_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: PS_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE field is set."]
#[inline(always)]
pub fn ps_0(self) -> &'a mut W {
self.variant(PS_A::PS_0)
}
#[doc = "Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE field is set."]
#[inline(always)]
pub fn ps_1(self) -> &'a mut W {
self.variant(PS_A::PS_1)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01);
self.w
}
}
#[doc = "Pull Enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum PE_A {
#[doc = "0: no description available"]
PE_0,
#[doc = "1: no description available"]
PE_1,
}
impl From<PE_A> for bool {
#[inline(always)]
fn from(variant: PE_A) -> Self {
match variant {
PE_A::PE_0 => false,
PE_A::PE_1 => true,
}
}
}
#[doc = "Reader of field `PE`"]
pub type PE_R = crate::R<bool, PE_A>;
impl PE_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> PE_A {
match self.bits {
false => PE_A::PE_0,
true => PE_A::PE_1,
}
}
#[doc = "Checks if the value of the field is `PE_0`"]
#[inline(always)]
pub fn is_pe_0(&self) -> bool {
*self == PE_A::PE_0
}
#[doc = "Checks if the value of the field is `PE_1`"]
#[inline(always)]
pub fn is_pe_1(&self) -> bool {
*self == PE_A::PE_1
}
}
#[doc = "Write proxy for field `PE`"]
pub struct PE_W<'a> {
w: &'a mut W,
}
impl<'a> PE_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: PE_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "no description available"]
#[inline(always)]
pub fn pe_0(self) -> &'a mut W {
self.variant(PE_A::PE_0)
}
#[doc = "no description available"]
#[inline(always)]
pub fn pe_1(self) -> &'a mut W {
self.variant(PE_A::PE_1)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1);
self.w
}
}
#[doc = "Slew Rate Enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SRE_A {
#[doc = "0: Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output."]
SRE_0,
#[doc = "1: Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output."]
SRE_1,
}
impl From<SRE_A> for bool {
#[inline(always)]
fn from(variant: SRE_A) -> Self {
match variant {
SRE_A::SRE_0 => false,
SRE_A::SRE_1 => true,
}
}
}
#[doc = "Reader of field `SRE`"]
pub type SRE_R = crate::R<bool, SRE_A>;
impl SRE_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> SRE_A {
match self.bits {
false => SRE_A::SRE_0,
true => SRE_A::SRE_1,
}
}
#[doc = "Checks if the value of the field is `SRE_0`"]
#[inline(always)]
pub fn is_sre_0(&self) -> bool {
*self == SRE_A::SRE_0
}
#[doc = "Checks if the value of the field is `SRE_1`"]
#[inline(always)]
pub fn is_sre_1(&self) -> bool {
*self == SRE_A::SRE_1
}
}
#[doc = "Write proxy for field `SRE`"]
pub struct SRE_W<'a> {
w: &'a mut W,
}
impl<'a> SRE_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: SRE_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Fast slew rate is configured on the corresponding pin, if the pin is configured as a digital output."]
#[inline(always)]
pub fn sre_0(self) -> &'a mut W {
self.variant(SRE_A::SRE_0)
}
#[doc = "Slow slew rate is configured on the corresponding pin, if the pin is configured as a digital output."]
#[inline(always)]
pub fn sre_1(self) -> &'a mut W {
self.variant(SRE_A::SRE_1)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2);
self.w
}
}
#[doc = "Open Drain Enable\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ODE_A {
#[doc = "0: Open drain output is disabled on the corresponding pin."]
ODE_0,
#[doc = "1: Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output."]
ODE_1,
}
impl From<ODE_A> for bool {
#[inline(always)]
fn from(variant: ODE_A) -> Self {
match variant {
ODE_A::ODE_0 => false,
ODE_A::ODE_1 => true,
}
}
}
#[doc = "Reader of field `ODE`"]
pub type ODE_R = crate::R<bool, ODE_A>;
impl ODE_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ODE_A {
match self.bits {
false => ODE_A::ODE_0,
true => ODE_A::ODE_1,
}
}
#[doc = "Checks if the value of the field is `ODE_0`"]
#[inline(always)]
pub fn is_ode_0(&self) -> bool {
*self == ODE_A::ODE_0
}
#[doc = "Checks if the value of the field is `ODE_1`"]
#[inline(always)]
pub fn is_ode_1(&self) -> bool {
*self == ODE_A::ODE_1
}
}
#[doc = "Write proxy for field `ODE`"]
pub struct ODE_W<'a> {
w: &'a mut W,
}
impl<'a> ODE_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: ODE_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Open drain output is disabled on the corresponding pin."]
#[inline(always)]
pub fn ode_0(self) -> &'a mut W {
self.variant(ODE_A::ODE_0)
}
#[doc = "Open drain output is enabled on the corresponding pin, if the pin is configured as a digital output."]
#[inline(always)]
pub fn ode_1(self) -> &'a mut W {
self.variant(ODE_A::ODE_1)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5);
self.w
}
}
#[doc = "Pin Mux Control\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum MUX_A {
#[doc = "0: Pin disabled (Alternative 0) (analog)."]
MUX_0,
#[doc = "1: Alternative 1 (GPIO)."]
MUX_1,
#[doc = "2: Alternative 2 (chip-specific)."]
MUX_2,
#[doc = "3: Alternative 3 (chip-specific)."]
MUX_3,
#[doc = "4: Alternative 4 (chip-specific)."]
MUX_4,
#[doc = "5: Alternative 5 (chip-specific)."]
MUX_5,
#[doc = "6: Alternative 6 (chip-specific)."]
MUX_6,
#[doc = "7: Alternative 7 (chip-specific)."]
MUX_7,
}
impl From<MUX_A> for u8 {
#[inline(always)]
fn from(variant: MUX_A) -> Self {
match variant {
MUX_A::MUX_0 => 0,
MUX_A::MUX_1 => 1,
MUX_A::MUX_2 => 2,
MUX_A::MUX_3 => 3,
MUX_A::MUX_4 => 4,
MUX_A::MUX_5 => 5,
MUX_A::MUX_6 => 6,
MUX_A::MUX_7 => 7,
}
}
}
#[doc = "Reader of field `MUX`"]
pub type MUX_R = crate::R<u8, MUX_A>;
impl MUX_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> MUX_A {
match self.bits {
0 => MUX_A::MUX_0,
1 => MUX_A::MUX_1,
2 => MUX_A::MUX_2,
3 => MUX_A::MUX_3,
4 => MUX_A::MUX_4,
5 => MUX_A::MUX_5,
6 => MUX_A::MUX_6,
7 => MUX_A::MUX_7,
_ => unreachable!(),
}
}
#[doc = "Checks if the value of the field is `MUX_0`"]
#[inline(always)]
pub fn is_mux_0(&self) -> bool {
*self == MUX_A::MUX_0
}
#[doc = "Checks if the value of the field is `MUX_1`"]
#[inline(always)]
pub fn is_mux_1(&self) -> bool {
*self == MUX_A::MUX_1
}
#[doc = "Checks if the value of the field is `MUX_2`"]
#[inline(always)]
pub fn is_mux_2(&self) -> bool {
*self == MUX_A::MUX_2
}
#[doc = "Checks if the value of the field is `MUX_3`"]
#[inline(always)]
pub fn is_mux_3(&self) -> bool {
*self == MUX_A::MUX_3
}
#[doc = "Checks if the value of the field is `MUX_4`"]
#[inline(always)]
pub fn is_mux_4(&self) -> bool {
*self == MUX_A::MUX_4
}
#[doc = "Checks if the value of the field is `MUX_5`"]
#[inline(always)]
pub fn is_mux_5(&self) -> bool {
*self == MUX_A::MUX_5
}
#[doc = "Checks if the value of the field is `MUX_6`"]
#[inline(always)]
pub fn is_mux_6(&self) -> bool {
*self == MUX_A::MUX_6
}
#[doc = "Checks if the value of the field is `MUX_7`"]
#[inline(always)]
pub fn is_mux_7(&self) -> bool {
*self == MUX_A::MUX_7
}
}
#[doc = "Write proxy for field `MUX`"]
pub struct MUX_W<'a> {
w: &'a mut W,
}
impl<'a> MUX_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: MUX_A) -> &'a mut W {
{
self.bits(variant.into())
}
}
#[doc = "Pin disabled (Alternative 0) (analog)."]
#[inline(always)]
pub fn mux_0(self) -> &'a mut W {
self.variant(MUX_A::MUX_0)
}
#[doc = "Alternative 1 (GPIO)."]
#[inline(always)]
pub fn mux_1(self) -> &'a mut W {
self.variant(MUX_A::MUX_1)
}
#[doc = "Alternative 2 (chip-specific)."]
#[inline(always)]
pub fn mux_2(self) -> &'a mut W {
self.variant(MUX_A::MUX_2)
}
#[doc = "Alternative 3 (chip-specific)."]
#[inline(always)]
pub fn mux_3(self) -> &'a mut W {
self.variant(MUX_A::MUX_3)
}
#[doc = "Alternative 4 (chip-specific)."]
#[inline(always)]
pub fn mux_4(self) -> &'a mut W {
self.variant(MUX_A::MUX_4)
}
#[doc = "Alternative 5 (chip-specific)."]
#[inline(always)]
pub fn mux_5(self) -> &'a mut W {
self.variant(MUX_A::MUX_5)
}
#[doc = "Alternative 6 (chip-specific)."]
#[inline(always)]
pub fn mux_6(self) -> &'a mut W {
self.variant(MUX_A::MUX_6)
}
#[doc = "Alternative 7 (chip-specific)."]
#[inline(always)]
pub fn mux_7(self) -> &'a mut W {
self.variant(MUX_A::MUX_7)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x07 << 8)) | (((value as u32) & 0x07) << 8);
self.w
}
}
#[doc = "Lock Register\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum LK_A {
#[doc = "0: Pin Control Register is not locked."]
LK_0,
#[doc = "1: Pin Control Register is locked and cannot be updated until the next system reset."]
LK_1,
}
impl From<LK_A> for bool {
#[inline(always)]
fn from(variant: LK_A) -> Self {
match variant {
LK_A::LK_0 => false,
LK_A::LK_1 => true,
}
}
}
#[doc = "Reader of field `LK`"]
pub type LK_R = crate::R<bool, LK_A>;
impl LK_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> LK_A {
match self.bits {
false => LK_A::LK_0,
true => LK_A::LK_1,
}
}
#[doc = "Checks if the value of the field is `LK_0`"]
#[inline(always)]
pub fn is_lk_0(&self) -> bool {
*self == LK_A::LK_0
}
#[doc = "Checks if the value of the field is `LK_1`"]
#[inline(always)]
pub fn is_lk_1(&self) -> bool {
*self == LK_A::LK_1
}
}
#[doc = "Write proxy for field `LK`"]
pub struct LK_W<'a> {
w: &'a mut W,
}
impl<'a> LK_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: LK_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Pin Control Register is not locked."]
#[inline(always)]
pub fn lk_0(self) -> &'a mut W {
self.variant(LK_A::LK_0)
}
#[doc = "Pin Control Register is locked and cannot be updated until the next system reset."]
#[inline(always)]
pub fn lk_1(self) -> &'a mut W {
self.variant(LK_A::LK_1)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15);
self.w
}
}
#[doc = "Interrupt Configuration\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum IRQC_A {
#[doc = "0: Interrupt Status Flag (ISF) is disabled."]
IRQC_0,
#[doc = "1: ISF flag and DMA request on rising edge."]
IRQC_1,
#[doc = "2: ISF flag and DMA request on falling edge."]
IRQC_2,
#[doc = "3: ISF flag and DMA request on either edge."]
IRQC_3,
#[doc = "5: no description available"]
IRQC_5,
#[doc = "6: no description available"]
IRQC_6,
#[doc = "7: no description available"]
IRQC_7,
#[doc = "8: ISF flag and Interrupt when logic 0."]
IRQC_8,
#[doc = "9: ISF flag and Interrupt on rising-edge."]
IRQC_9,
#[doc = "10: ISF flag and Interrupt on falling-edge."]
IRQC_10,
#[doc = "11: ISF flag and Interrupt on either edge."]
IRQC_11,
#[doc = "12: ISF flag and Interrupt when logic 1."]
IRQC_12,
#[doc = "13: no description available"]
IRQC_13,
#[doc = "14: no description available"]
IRQC_14,
}
impl From<IRQC_A> for u8 {
#[inline(always)]
fn from(variant: IRQC_A) -> Self {
match variant {
IRQC_A::IRQC_0 => 0,
IRQC_A::IRQC_1 => 1,
IRQC_A::IRQC_2 => 2,
IRQC_A::IRQC_3 => 3,
IRQC_A::IRQC_5 => 5,
IRQC_A::IRQC_6 => 6,
IRQC_A::IRQC_7 => 7,
IRQC_A::IRQC_8 => 8,
IRQC_A::IRQC_9 => 9,
IRQC_A::IRQC_10 => 10,
IRQC_A::IRQC_11 => 11,
IRQC_A::IRQC_12 => 12,
IRQC_A::IRQC_13 => 13,
IRQC_A::IRQC_14 => 14,
}
}
}
#[doc = "Reader of field `IRQC`"]
pub type IRQC_R = crate::R<u8, IRQC_A>;
impl IRQC_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn | (&self) -> crate::Variant<u8, IRQC_A> {
use crate::Variant::*;
match self.bits {
0 => Val(IRQC_A::IRQC_0),
1 => Val(IRQC_A::IRQC_1),
2 => Val(IRQC_A::IRQC_2),
3 => Val(IRQC_A::IRQC_3),
5 => Val(IRQC_A::IRQC_5),
6 => Val(IRQC_A::IRQC_6),
7 => Val(IRQC_A::IRQC_7),
8 => Val(IRQC_A::IRQC_8),
9 => Val(IRQC_A::IRQC_9),
10 => Val(IRQC_A::IRQC_10),
11 => Val(IRQC_A::IRQC_11),
12 => Val(IRQC_A::IRQC_12),
13 => Val(IRQC_A::IRQC_13),
14 => Val(IRQC_A::IRQC_14),
i => Res(i),
}
}
#[doc = "Checks if the value of the field is `IRQC_0`"]
#[inline(always)]
pub fn is_irqc_0(&self) -> bool {
*self == IRQC_A::IRQC_0
}
#[doc = "Checks if the value of the field is `IRQC_1`"]
#[inline(always)]
pub fn is_irqc_1(&self) -> bool {
*self == IRQC_A::IRQC_1
}
#[doc = "Checks if the value of the field is `IRQC_2`"]
#[inline(always)]
pub fn is_irqc_2(&self) -> bool {
*self == IRQC_A::IRQC_2
}
#[doc = "Checks if the value of the field is `IRQC_3`"]
#[inline(always)]
pub fn is_irqc_3(&self) -> bool {
*self == IRQC_A::IRQC_3
}
#[doc = "Checks if the value of the field is `IRQC_5`"]
#[inline(always)]
pub fn is_irqc_5(&self) -> bool {
*self == IRQC_A::IRQC_5
}
#[doc = "Checks if the value of the field is `IRQC_6`"]
#[inline(always)]
pub fn is_irqc_6(&self) -> bool {
*self == IRQC_A::IRQC_6
}
#[doc = "Checks if the value of the field is `IRQC_7`"]
#[inline(always)]
pub fn is_irqc_7(&self) -> bool {
*self == IRQC_A::IRQC_7
}
#[doc = "Checks if the value of the field is `IRQC_8`"]
#[inline(always)]
pub fn is_irqc_8(&self) -> bool {
*self == IRQC_A::IRQC_8
}
#[doc = "Checks if the value of the field is `IRQC_9`"]
#[inline(always)]
pub fn is_irqc_9(&self) -> bool {
*self == IRQC_A::IRQC_9
}
#[doc = "Checks if the value of the field is `IRQC_10`"]
#[inline(always)]
pub fn is_irqc_10(&self) -> bool {
*self == IRQC_A::IRQC_10
}
#[doc = "Checks if the value of the field is `IRQC_11`"]
#[inline(always)]
pub fn is_irqc_11(&self) -> bool {
*self == IRQC_A::IRQC_11
}
#[doc = "Checks if the value of the field is `IRQC_12`"]
#[inline(always)]
pub fn is_irqc_12(&self) -> bool {
*self == IRQC_A::IRQC_12
}
#[doc = "Checks if the value of the field is `IRQC_13`"]
#[inline(always)]
pub fn is_irqc_13(&self) -> bool {
*self == IRQC_A::IRQC_13
}
#[doc = "Checks if the value of the field is `IRQC_14`"]
#[inline(always)]
pub fn is_irqc_14(&self) -> bool {
*self == IRQC_A::IRQC_14
}
}
#[doc = "Write proxy for field `IRQC`"]
pub struct IRQC_W<'a> {
w: &'a mut W,
}
impl<'a> IRQC_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: IRQC_A) -> &'a mut W {
unsafe { self.bits(variant.into()) }
}
#[doc = "Interrupt Status Flag (ISF) is disabled."]
#[inline(always)]
pub fn irqc_0(self) -> &'a mut W {
self.variant(IRQC_A::IRQC_0)
}
#[doc = "ISF flag and DMA request on rising edge."]
#[inline(always)]
pub fn irqc_1(self) -> &'a mut W {
self.variant(IRQC_A::IRQC_1)
}
#[doc = "ISF flag and DMA request on falling edge."]
#[inline(always)]
pub fn irqc_2(self) -> &'a mut W {
self.variant(IRQC_A::IRQC_2)
}
#[doc = "ISF flag and DMA request on either edge."]
#[inline(always)]
pub fn irqc_3(self) -> &'a mut W {
self.variant(IRQC_A::IRQC_3)
}
#[doc = "no description available"]
#[inline(always)]
pub fn irqc_5(self) -> &'a mut W {
self.variant(IRQC_A::IRQC_5)
}
#[doc = "no description available"]
#[inline(always)]
pub fn irqc_6(self) -> &'a mut W {
self.variant(IRQC_A::IRQC_6)
}
#[doc = "no description available"]
#[inline(always)]
pub fn irqc_7(self) -> &'a mut W {
self.variant(IRQC_A::IRQC_7)
}
#[doc = "ISF flag and Interrupt when logic 0."]
#[inline(always)]
pub fn irqc_8(self) -> &'a mut W {
self.variant(IRQC_A::IRQC_8)
}
#[doc = "ISF flag and Interrupt on rising-edge."]
#[inline(always)]
pub fn irqc_9(self) -> &'a mut W {
self.variant(IRQC_A::IRQC_9)
}
#[doc = "ISF flag and Interrupt on falling-edge."]
#[inline(always)]
pub fn irqc_10(self) -> &'a mut W {
self.variant(IRQC_A::IRQC_10)
}
#[doc = "ISF flag and Interrupt on either edge."]
#[inline(always)]
pub fn irqc_11(self) -> &'a mut W {
self.variant(IRQC_A::IRQC_11)
}
#[doc = "ISF flag and Interrupt when logic 1."]
#[inline(always)]
pub fn irqc_12(self) -> &'a mut W {
self.variant(IRQC_A::IRQC_12)
}
#[doc = "no description available"]
#[inline(always)]
pub fn irqc_13(self) -> &'a mut W {
self.variant(IRQC_A::IRQC_13)
}
#[doc = "no description available"]
#[inline(always)]
pub fn irqc_14(self) -> &'a mut W {
self.variant(IRQC_A::IRQC_14)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x0f << 16)) | (((value as u32) & 0x0f) << 16);
self.w
}
}
#[doc = "Interrupt Status Flag\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ISF_A {
#[doc = "0: Configured interrupt is not detected."]
ISF_0,
#[doc = "1: no description available"]
ISF_1,
}
impl From<ISF_A> for bool {
#[inline(always)]
fn from(variant: ISF_A) -> Self {
match variant {
ISF_A::ISF_0 => false,
ISF_A::ISF_1 => true,
}
}
}
#[doc = "Reader of field `ISF`"]
pub type ISF_R = crate::R<bool, ISF_A>;
impl ISF_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ISF_A {
match self.bits {
false => ISF_A::ISF_0,
true => ISF_A::ISF_1,
}
}
#[doc = "Checks if the value of the field is `ISF_0`"]
#[inline(always)]
pub fn is_isf_0(&self) -> bool {
*self == ISF_A::ISF_0
}
#[doc = "Checks if the value of the field is `ISF_1`"]
#[inline(always)]
pub fn is_isf_1(&self) -> bool {
*self == ISF_A::ISF_1
}
}
#[doc = "Write proxy for field `ISF`"]
pub struct ISF_W<'a> {
w: &'a mut W,
}
impl<'a> ISF_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: ISF_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Configured interrupt is not detected."]
#[inline(always)]
pub fn isf_0(self) -> &'a mut W {
self.variant(ISF_A::ISF_0)
}
#[doc = "no description available"]
#[inline(always)]
pub fn isf_1(self) -> &'a mut W {
self.variant(ISF_A::ISF_1)
}
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24);
self.w
}
}
impl R {
#[doc = "Bit 0 - Pull Select"]
#[inline(always)]
pub fn ps(&self) -> PS_R {
PS_R::new((self.bits & 0x01) != 0)
}
#[doc = "Bit 1 - Pull Enable"]
#[inline(always)]
pub fn pe(&self) -> PE_R {
PE_R::new(((self.bits >> 1) & 0x01) != 0)
}
#[doc = "Bit 2 - Slew Rate Enable"]
#[inline(always)]
pub fn sre(&self) -> SRE_R {
SRE_R::new(((self.bits >> 2) & 0x01) != 0)
}
#[doc = "Bit 5 - Open Drain Enable"]
#[inline(always)]
pub fn ode(&self) -> ODE_R {
ODE_R::new(((self.bits >> 5) & 0x01) != 0)
}
#[doc = "Bits 8:10 - Pin Mux Control"]
#[inline(always)]
pub fn mux(&self) -> MUX_R {
MUX_R::new(((self.bits >> 8) & 0x07) as u8)
}
#[doc = "Bit 15 - Lock Register"]
#[inline(always)]
pub fn lk(&self) -> LK_R {
LK_R::new(((self.bits >> 15) & 0x01) != 0)
}
#[doc = "Bits 16:19 - Interrupt Configuration"]
#[inline(always)]
pub fn irqc(&self) -> IRQC_R {
IRQC_R::new(((self.bits >> 16) & 0x0f) as u8)
}
#[doc = "Bit 24 - Interrupt Status Flag"]
#[inline(always)]
pub fn isf(&self) -> ISF_R {
ISF_R::new(((self.bits >> 24) & 0x01) != 0)
}
}
impl W {
#[doc = "Bit 0 - Pull Select"]
#[inline(always)]
pub fn ps(&mut self) -> PS_W {
PS_W { w: self }
}
#[doc = "Bit 1 - Pull Enable"]
#[inline(always)]
pub fn pe(&mut self) -> PE_W {
PE_W { w: self }
}
#[doc = "Bit 2 - Slew Rate Enable"]
#[inline(always)]
pub fn sre(&mut self) -> SRE_W {
SRE_W { w: self }
}
#[doc = "Bit 5 - Open Drain Enable"]
#[inline(always)]
pub fn ode(&mut self) -> ODE_W {
ODE_W { w: self }
}
#[doc = "Bits 8:10 - Pin Mux Control"]
#[inline(always)]
pub fn mux(&mut self) -> MUX_W {
MUX_W { w: self }
}
#[doc = "Bit 15 - Lock Register"]
#[inline(always)]
pub fn lk(&mut self) -> LK_W {
LK_W { w: self }
}
#[doc = "Bits 16:19 - Interrupt Configuration"]
#[inline(always)]
pub fn irqc(&mut self) -> IRQC_W {
IRQC_W { w: self }
}
#[doc = "Bit 24 - Interrupt Status Flag"]
#[inline(always)]
pub fn isf(&mut self) -> ISF_W {
ISF_W { w: self }
}
}
| variant |
mod.rs | use crate::data;
use failure;
use gl;
use crate::na;
use ncollide3d;
use resources::Resources;
use crate::ColorBuffer;
use crate::Program;
use std::cell::RefCell;
use std::rc::Rc;
mod buffers;
mod shared_debug_lines;
use self::buffers::{Buffers, LinePoint, MultiDrawItem};
use self::shared_debug_lines::SharedDebugLines;
pub struct DebugLines {
program: Program,
program_view_projection_location: Option<i32>,
program_model_matrix_location: Option<i32>,
containers: Rc<RefCell<SharedDebugLines>>,
buffers: Option<Buffers>,
draw_enabled: bool,
}
impl DebugLines {
pub fn new(gl: &gl::Gl, res: &Resources) -> Result<DebugLines, failure::Error> {
let program = Program::from_res(gl, res, "shaders/render_gl/debug_lines")?;
let program_view_projection_location = program.get_uniform_location("ViewProjection");
let program_model_matrix_location = program.get_uniform_location("Model");
Ok(DebugLines {
program,
program_view_projection_location,
program_model_matrix_location,
containers: Rc::new(RefCell::new(SharedDebugLines::new())),
buffers: None,
draw_enabled: true,
})
}
pub fn toggle(&mut self) {
self.draw_enabled = !self.draw_enabled;
}
fn check_if_invalidated_and_reinitialize(&mut self, gl: &gl::Gl) {
let mut shared_debug_lines = self.containers.borrow_mut();
if shared_debug_lines.invalidated {
let num_items = shared_debug_lines
.containers
.values()
.flat_map(|v| v.data.iter())
.count();
let should_recreate_buffer = match self.buffers {
None => true,
Some(ref buffers) if buffers.vbo_capacity < num_items => true,
_ => false,
};
if should_recreate_buffer {
self.buffers = Some(Buffers::new(gl, num_items));
}
if let Some(ref mut buffers) = self.buffers {
buffers.upload_vertices(
shared_debug_lines
.containers
.values()
.flat_map(|v| v.data.iter())
.map(|item| *item),
);
buffers.multi_draw_items.clear();
let mut offset = 0;
for container in shared_debug_lines.containers.values() {
buffers.multi_draw_items.push(MultiDrawItem {
model_matrix: na::convert(container.transform),
starting_index: offset,
index_count: container.data.len() as i32,
});
offset += container.data.len() as i32;
}
}
shared_debug_lines.invalidated = false;
}
}
pub fn render(&mut self, gl: &gl::Gl, target: &ColorBuffer, vp_matrix: &na::Matrix4<f32>) {
if self.draw_enabled {
self.check_if_invalidated_and_reinitialize(gl);
if let Some(ref buffers) = self.buffers {
if buffers.multi_draw_items.len() > 0 {
self.program.set_used();
if let Some(loc) = self.program_view_projection_location {
self.program.set_uniform_matrix_4fv(loc, &vp_matrix);
}
let program_model_matrix_location = self
.program_model_matrix_location
.expect("Debug lines Model uniform must exist");
buffers.lines_vao.bind();
unsafe {
target.set_default_blend_func(gl);
target.enable_blend(gl);
for instance in buffers.multi_draw_items.iter() {
self.program.set_uniform_matrix_4fv(
program_model_matrix_location,
&instance.model_matrix,
);
gl.DrawArrays(gl::LINES, instance.starting_index, instance.index_count);
}
target.disable_blend(gl);
}
buffers.lines_vao.unbind();
}
}
}
}
pub fn marker(&self, pos: na::Point3<f32>, size: f32) -> PointMarker {
let half = size / 2.0;
let new_id = self.containers.borrow_mut().new_container(
na::convert(na::Isometry3::from_parts(
na::Translation3::from(pos.coords),
na::UnitQuaternion::identity(),
)),
vec![
LinePoint {
pos: render_p3(pos + na::Vector3::x() * half),
color: (0.0, 1.0, 0.0, 1.0).into(),
},
LinePoint {
pos: render_p3(pos + na::Vector3::x() * -half),
color: (0.0, 1.0, 0.0, 1.0).into(),
},
LinePoint {
pos: render_p3(pos + na::Vector3::y() * half),
color: (1.0, 0.0, 0.0, 1.0).into(),
},
LinePoint {
pos: render_p3(pos + na::Vector3::y() * -half),
color: (1.0, 0.0, 0.0, 1.0).into(),
},
LinePoint {
pos: render_p3(pos + na::Vector3::z() * half),
color: (0.0, 0.0, 1.0, 1.0).into(),
},
LinePoint {
pos: render_p3(pos + na::Vector3::z() * -half),
color: (0.0, 0.0, 1.0, 1.0).into(),
},
],
);
PointMarker {
containers: self.containers.clone(),
id: new_id,
}
}
pub fn colored_marker(
&self,
pos: na::Point3<f32>,
color: na::Vector4<f32>,
size: f32,
) -> PointMarker {
let half = size / 2.0;
let new_id = self.containers.borrow_mut().new_container(
na::convert(na::Isometry3::from_parts(
na::Translation3::from(pos.coords),
na::UnitQuaternion::identity(),
)),
vec![
LinePoint {
pos: render_p3(pos + na::Vector3::x() * half),
color: render_color_vec4(color),
},
LinePoint {
pos: render_p3(pos + na::Vector3::x() * -half),
color: render_color_vec4(color),
},
LinePoint {
pos: render_p3(pos + na::Vector3::y() * half),
color: render_color_vec4(color),
},
LinePoint {
pos: render_p3(pos + na::Vector3::y() * -half),
color: render_color_vec4(color),
},
LinePoint {
pos: render_p3(pos + na::Vector3::z() * half),
color: render_color_vec4(color),
},
LinePoint {
pos: render_p3(pos + na::Vector3::z() * -half),
color: render_color_vec4(color),
},
],
);
PointMarker {
containers: self.containers.clone(),
id: new_id,
}
}
pub fn ray_markers(
&self,
transform: na::Projective3<f32>,
pos_direction_colors: impl Iterator<
Item = (na::Point3<f32>, na::Vector3<f32>, na::Vector4<f32>),
>,
) -> RayMarkers {
struct | {
pos: na::Point3<f32>,
dir: na::Vector3<f32>,
color: na::Vector4<f32>,
index: u8,
}
impl Iterator for PositionsIter {
type Item = LinePoint;
fn next(&mut self) -> Option<LinePoint> {
match self.index {
0 => {
self.index = 1;
Some(LinePoint {
pos: render_p3(self.pos),
color: render_color_vec4(self.color),
})
}
1 => {
self.index = 2;
Some(LinePoint {
pos: render_p3(self.pos + self.dir),
color: render_color_vec4(na::Vector4::new(
self.color.x,
self.color.y,
self.color.z,
0.0,
)),
})
}
_ => None,
}
}
}
let new_id = self.containers.borrow_mut().new_container(
transform,
pos_direction_colors
.flat_map(|(pos, dir, color)| PositionsIter {
pos,
dir,
color,
index: 0,
}).collect(),
);
RayMarkers {
containers: self.containers.clone(),
id: new_id,
}
}
pub fn aabb_marker(
&self,
transform: na::Projective3<f32>,
aabb: ncollide3d::bounding_volume::aabb::AABB<f32>,
color: na::Vector4<f32>,
) -> AabbMarker {
let a = aabb.mins();
let b = aabb.maxs();
let new_id = self.containers.borrow_mut().new_container(
transform,
vec![
LinePoint {
pos: render_p3([a.x, a.y, a.z].into()),
color: render_color_vec4(color),
},
LinePoint {
pos: render_p3([b.x, a.y, a.z].into()),
color: render_color_vec4(color),
},
LinePoint {
pos: render_p3([a.x, a.y, a.z].into()),
color: render_color_vec4(color),
},
LinePoint {
pos: render_p3([a.x, b.y, a.z].into()),
color: render_color_vec4(color),
},
LinePoint {
pos: render_p3([a.x, a.y, a.z].into()),
color: render_color_vec4(color),
},
LinePoint {
pos: render_p3([a.x, a.y, b.z].into()),
color: render_color_vec4(color),
},
LinePoint {
pos: render_p3([a.x, b.y, b.z].into()),
color: render_color_vec4(color),
},
LinePoint {
pos: render_p3([b.x, b.y, b.z].into()),
color: render_color_vec4(color),
},
LinePoint {
pos: render_p3([b.x, a.y, b.z].into()),
color: render_color_vec4(color),
},
LinePoint {
pos: render_p3([b.x, b.y, b.z].into()),
color: render_color_vec4(color),
},
LinePoint {
pos: render_p3([b.x, b.y, a.z].into()),
color: render_color_vec4(color),
},
LinePoint {
pos: render_p3([b.x, b.y, b.z].into()),
color: render_color_vec4(color),
},
LinePoint {
pos: render_p3([a.x, b.y, a.z].into()),
color: render_color_vec4(color),
},
LinePoint {
pos: render_p3([b.x, b.y, a.z].into()),
color: render_color_vec4(color),
},
LinePoint {
pos: render_p3([a.x, b.y, a.z].into()),
color: render_color_vec4(color),
},
LinePoint {
pos: render_p3([a.x, b.y, b.z].into()),
color: render_color_vec4(color),
},
LinePoint {
pos: render_p3([a.x, a.y, b.z].into()),
color: render_color_vec4(color),
},
LinePoint {
pos: render_p3([a.x, b.y, b.z].into()),
color: render_color_vec4(color),
},
LinePoint {
pos: render_p3([a.x, a.y, b.z].into()),
color: render_color_vec4(color),
},
LinePoint {
pos: render_p3([b.x, a.y, b.z].into()),
color: render_color_vec4(color),
},
LinePoint {
pos: render_p3([b.x, a.y, a.z].into()),
color: render_color_vec4(color),
},
LinePoint {
pos: render_p3([b.x, b.y, a.z].into()),
color: render_color_vec4(color),
},
LinePoint {
pos: render_p3([b.x, a.y, a.z].into()),
color: render_color_vec4(color),
},
LinePoint {
pos: render_p3([b.x, a.y, b.z].into()),
color: render_color_vec4(color),
},
],
);
AabbMarker {
containers: self.containers.clone(),
id: new_id,
}
}
pub fn rect_marker(
&self,
transform: na::Projective3<f32>,
size: na::Vector2<f32>,
color: na::Vector4<f32>,
) -> RectMarker {
RectMarker::new(self.containers.clone(), transform, size, color)
}
pub fn grid_marker(
&self,
transform: na::Projective3<f32>,
spacing: f32,
count: i32,
color: na::Vector4<f32>,
) -> GridMarker {
let mut lines = Vec::with_capacity((count * 2 + 4) as usize);
let mut half_count = count / 2;
if half_count == 0 {
half_count = 1;
}
for x in -half_count..=half_count {
let start = na::Point3::new(x as f32 * spacing, -half_count as f32 * spacing, 0.0);
let end = na::Point3::new(x as f32 * spacing, half_count as f32 * spacing, 0.0);
lines.push(LinePoint {
pos: render_p3(start),
color: render_color_vec4(color),
});
lines.push(LinePoint {
pos: render_p3(end),
color: render_color_vec4(color),
});
}
for y in -half_count..=half_count {
let start = na::Point3::new(-half_count as f32 * spacing, y as f32 * spacing, 0.0);
let end = na::Point3::new(half_count as f32 * spacing, y as f32 * spacing, 0.0);
lines.push(LinePoint {
pos: render_p3(start),
color: render_color_vec4(color),
});
lines.push(LinePoint {
pos: render_p3(end),
color: render_color_vec4(color),
});
}
let new_id = self.containers.borrow_mut().new_container(transform, lines);
GridMarker {
containers: self.containers.clone(),
id: new_id,
}
}
}
pub struct AabbMarker {
containers: Rc<RefCell<SharedDebugLines>>,
pub id: i32,
}
impl AabbMarker {
pub fn update_transform(&self, transform: na::Projective3<f32>) {
if let Some(data) = self.containers.borrow_mut().get_container_mut(self.id) {
data.transform = transform;
}
}
}
impl Drop for AabbMarker {
fn drop(&mut self) {
self.containers.borrow_mut().remove_container(self.id);
}
}
pub struct GridMarker {
containers: Rc<RefCell<SharedDebugLines>>,
pub id: i32,
}
impl GridMarker {
pub fn update_transform(&self, transform: na::Projective3<f32>) {
if let Some(data) = self.containers.borrow_mut().get_container_mut(self.id) {
data.transform = transform;
}
}
}
impl Drop for GridMarker {
fn drop(&mut self) {
self.containers.borrow_mut().remove_container(self.id);
}
}
pub struct RectMarker {
containers: Rc<RefCell<SharedDebugLines>>,
pub id: i32,
}
impl RectMarker {
fn new(
containers: Rc<RefCell<SharedDebugLines>>,
transform: na::Projective3<f32>,
size: na::Vector2<f32>,
color: na::Vector4<f32>,
) -> RectMarker {
let id = containers
.borrow_mut()
.new_container(transform, Vec::with_capacity(8));
let marker = RectMarker { id, containers };
marker.update_lines(size, color);
marker
}
fn update_lines(&self, size: na::Vector2<f32>, color: na::Vector4<f32>) {
if let Some(data) = self.containers.borrow_mut().get_container_mut(self.id) {
let lines = &mut data.data;
lines.clear();
// pos ----- A
// | |
// B --------C
let pos = na::Point3::new(0.0, 0.0, 0.0);
let c = pos + na::Vector3::new(size.x, size.y, 0.0);
let a = na::Point3::new(c.x, 0.0, 0.0);
let b = na::Point3::new(0.0, c.y, 0.0);
lines.push(LinePoint {
pos: render_p3(pos),
color: render_color_vec4(color),
});
lines.push(LinePoint {
pos: render_p3(a),
color: render_color_vec4(color),
});
lines.push(LinePoint {
pos: render_p3(a),
color: render_color_vec4(color),
});
lines.push(LinePoint {
pos: render_p3(c),
color: render_color_vec4(color),
});
lines.push(LinePoint {
pos: render_p3(c),
color: render_color_vec4(color),
});
lines.push(LinePoint {
pos: render_p3(b),
color: render_color_vec4(color),
});
lines.push(LinePoint {
pos: render_p3(pos),
color: render_color_vec4(color),
});
lines.push(LinePoint {
pos: render_p3(b),
color: render_color_vec4(color),
});
}
}
pub fn update_transform(&self, transform: na::Projective3<f32>) {
if let Some(data) = self.containers.borrow_mut().get_container_mut(self.id) {
data.transform = transform;
}
}
pub fn update_size_and_color(&self, size: na::Vector2<f32>, color: na::Vector4<f32>) {
self.update_lines(size, color);
}
}
impl Drop for RectMarker {
fn drop(&mut self) {
self.containers.borrow_mut().remove_container(self.id);
}
}
pub struct RayMarkers {
containers: Rc<RefCell<SharedDebugLines>>,
id: i32,
}
impl RayMarkers {
pub fn update_ray_pos_and_dir(&self, pos: na::Point3<f32>, direction: na::Vector3<f32>) {
let end = pos + direction;
if let Some(data) = self.containers.borrow_mut().get_container_mut(self.id) {
data.data[0].pos = render_p3(pos);
data.data[1].pos = render_p3(end);
}
}
pub fn update_transform(&self, transform: na::Projective3<f32>) {
if let Some(data) = self.containers.borrow_mut().get_container_mut(self.id) {
data.transform = transform;
}
}
}
impl Drop for RayMarkers {
fn drop(&mut self) {
self.containers.borrow_mut().remove_container(self.id);
}
}
pub struct PointMarker {
containers: Rc<RefCell<SharedDebugLines>>,
id: i32,
}
impl PointMarker {
pub fn update_position(&self, pos: na::Point3<f32>) {
if let Some(data) = self.containers.borrow_mut().get_container_mut(self.id) {
data.transform = na::convert(na::Isometry3::from_parts(
na::Translation3::from(pos.coords),
na::UnitQuaternion::identity(),
));
}
}
}
impl Drop for PointMarker {
fn drop(&mut self) {
self.containers.borrow_mut().remove_container(self.id);
}
}
fn render_p3(v: na::Point3<f32>) -> data::f32_f32_f32 {
data::f32_f32_f32::new(v.x, v.y, v.z)
}
fn render_color_vec4(v: na::Vector4<f32>) -> data::u2_u10_u10_u10_rev_float {
(v.x, v.y, v.z, v.w).into()
}
| PositionsIter |
CastingOverlay.ts | import { State } from "../Store";
import { useSelector, useDispatch } from "react-redux";
import { useEffect } from "react";
import { CasterOverlayState, loadCastingOverlay } from "../reducer/CasterOverlay";
export const castingOverlayLoadedSelector = (state: State): boolean => state.ui.loadedEntities.castingOverlay;
export const castingOverlaySelector = (state: State): CasterOverlayState | null => state.entities.castingOverlay;
export function useCasterOverlay(auth?: string): CasterOverlayState | null {
const castingOverlay = useSelector(castingOverlaySelector);
const loaded = useSelector(castingOverlayLoadedSelector);
const dispatch = useDispatch();
useEffect(
() => {
if (!loaded) {
dispatch(loadCastingOverlay(auth)); | },
[ auth, loaded ]
);
return castingOverlay;
} | } |
gen_version.py | #!/usr/bin/env python3
#
# Copyright 2015 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Generate version string for NotoColorEmoji.
This parses the color emoji template file and updates the lines
containing version string info, writing a new file.
The nameID 5 field in the emoji font should reflect the commit/date
of the repo it was built from. This will build a string of the following
format:
Version 1.39;GOOG;noto-emoji:20170220:a8a215d2e889'
This is intended to indicate that it was built by Google from noto-emoji
at commit a8a215d2e889 and date 20170220 (since dates are a bit easier
to locate in time than commit hashes).
For building with external data we don't include the commit id as we
might be using different resoruces. Instead the version string is:
Version 1.39;GOOG;noto-emoji:20170518;BETA <msg>
Here the date is the current date, and the message after 'BETA ' is
provided using the '-b' flag. There's no commit hash. This also
bypasses some checks about the state of the repo.
The relase number should have 2 or 3 minor digits. Right now we've been
using 2 but at the next major relase we probably want to use 3. This
supports both. It will bump the version number if none is provided,
maintaining the minor digit length.
"""
import argparse
import datetime
import re
from nototools import tool_utils
# These are not very lenient, we expect to be applied to the noto color
# emoji template ttx file which matches these. Why then require the
# input argument, you ask? Um... testing?
_nameid_re = re.compile(r'\s*<namerecord nameID="5"')
_version_re = re.compile(r'\s*Version\s(\d+.\d{2,3})')
_headrev_re = re.compile(r'\s*<fontRevision value="(\d+.\d{2,3})"/>')
def _get_existing_version(lines):
"""Scan lines for all existing version numbers, and ensure they match.
Return the matched version number string."""
version = None
def check_version(new_version):
if version is not None and new_version != version:
raise Exception(
'version %s and namerecord version %s do not match' % (
version, new_version))
return new_version
saw_nameid = False
for line in lines:
if saw_nameid:
saw_nameid = False
m = _version_re.match(line)
if not m:
raise Exception('could not match line "%s" in namerecord' % line)
version = check_version(m.group(1))
elif _nameid_re.match(line):
saw_nameid = True
else:
m = _headrev_re.match(line)
if m:
version = check_version(m.group(1))
return version
def _version_to_mm(version):
majs, mins = version.split('.')
minor_len = len(mins)
return int(majs), int(mins), minor_len
def _mm_to_version(major, minor, minor_len):
|
def _version_compare(lhs, rhs):
lmaj, lmin, llen = _version_to_mm(lhs)
rmaj, rmin, rlen = _version_to_mm(rhs)
# if major versions differ, we don't care about the minor length, else
# they should be the same
if lmaj != rmaj:
return lmaj - rmaj
if llen != rlen:
raise Exception('minor version lengths differ: "%s" and "%s"' % (lhs, rhs))
return lmin - rmin
def _version_bump(version):
major, minor, minor_len = _version_to_mm(version)
minor = (minor + 1) % (10 ** minor_len)
if minor == 0:
raise Exception('cannot bump version "%s", requires new major' % version)
return _mm_to_version(major, minor, minor_len)
def _get_repo_version_str(beta):
"""See above for description of this string."""
if beta is not None:
date_str = datetime.date.today().strftime('%Y%m%d')
return 'GOOG;noto-emoji:%s;BETA %s' % (date_str, beta)
p = tool_utils.resolve_path('[emoji]')
commit, date, _ = tool_utils.git_head_commit(p)
if not tool_utils.git_check_remote_commit(p, commit):
raise Exception('emoji not on upstream master branch')
date_re = re.compile(r'(\d{4})-(\d{2})-(\d{2})')
m = date_re.match(date)
if not m:
raise Exception('could not match "%s" with "%s"' % (date, date_re.pattern))
ymd = ''.join(m.groups())
return 'GOOG;noto-emoji:%s:%s' % (ymd, commit[:12])
def _replace_existing_version(lines, version, version_str):
"""Update lines with new version strings in appropriate places."""
saw_nameid = False
for i in range(len(lines)):
line = lines[i]
if saw_nameid:
saw_nameid = False
# preserve indentation
lead_ws = len(line) - len(line.lstrip())
lines[i] = line[:lead_ws] + version_str + '\n'
elif _nameid_re.match(line):
saw_nameid = True
elif _headrev_re.match(line):
lead_ws = len(line) - len(line.lstrip())
lines[i] = line[:lead_ws] + '<fontRevision value="%s"/>\n' % version
def update_version(srcfile, dstfile, version, beta):
"""Update version in srcfile and write to dstfile. If version is None,
bumps the current version, else version must be greater than the
current verison."""
with open(srcfile, 'r') as f:
lines = f.readlines()
current_version = _get_existing_version(lines)
if not version:
version = _version_bump(current_version)
elif version and _version_compare(version, current_version) <= 0:
raise Exception('new version %s is <= current version %s' % (
version, current_version))
version_str = 'Version %s;%s' % (version, _get_repo_version_str(beta))
_replace_existing_version(lines, version, version_str)
with open(dstfile, 'w') as f:
for line in lines:
f.write(line)
def main():
parser = argparse.ArgumentParser()
parser.add_argument(
'-v', '--version', help='version number, default bumps the current '
'version', metavar='ver')
parser.add_argument(
'-s', '--src', help='ttx file with name and head tables',
metavar='file', required=True)
parser.add_argument(
'-d', '--dst', help='name of edited ttx file to write',
metavar='file', required=True)
parser.add_argument(
'-b', '--beta', help='beta tag if font is built using external resources')
args = parser.parse_args()
update_version(args.src, args.dst, args.version, args.beta)
if __name__ == '__main__':
main()
| fmt = '%%d.%%0%dd' % minor_len
return fmt % (major, minor) |
ifelse.go | package main
import "fmt"
func main() {
var number = 5
if number += 4; 10 > number {
number += 3
fmt.Print(number)
} else if 10 < number {
number -= 2
fmt.Print(number)
} | fmt.Println(number) //此时是main函数的作用域
fmt.Printf("%p\n",&number)
if number := 3; number < 3 {
fmt.Println(number) //此时是if作用域内的number
fmt.Printf("%p\n",&number)
}else if number :=4; number!=4 {
fmt.Println(number) //此时是if作用域内的number
fmt.Printf("%p\n",&number)
}else{
fmt.Println(number) //此时是最近if重写的number[配对if else]
fmt.Printf("%p\n",&number)
}
fmt.Println(number)//此时是main函数的作用域
} | fmt.Println() |
main.rs | /*
why use unsafe
- Are allowed to ignore the borrowing rules by having both immutable and mutable pointers or multiple mutable pointers to the same location
- Aren’t guaranteed to point to valid memory
- Are allowed to be null
- Don’t implement any automatic cleanup
mostly used for
- interact with code written in another language
- custom memory allocation
*/
unsafe fn dangerous() {
println!("Unsafe function");
}
use std::ptr::slice_from_raw_parts_mut;
use std::slice;
fn split_at_mut(slice: &mut [i32], mid: usize) -> (&mut [i32], &mut [i32]) {
let len = slice.len();
let ptr = slice.as_mut_ptr();
assert!(mid <= len);
unsafe {
(
slice::from_raw_parts_mut(ptr, mid),
slice::from_raw_parts_mut(ptr.add(mid), len - mid)
)
}
}
// use C variables
extern "C" {
fn abs(input: i32) -> i32;
}
// create C connector
#[no_mangle]
pub extern "C" fn call_from_c() {
println!("Just called a Rust function from C!");
}
// static constants can modify using unsafe
static HELLO_WORLD: &str = "Hello, world!";
static mut COUNTER: u32 = 0;
fn add_to_count(inc: u32) {
unsafe {
COUNTER += inc;
}
}
// unsafe trait and implementation
unsafe trait Foo {}
unsafe impl Foo for i32 {}
fn main() {
| let mut num = 3;
// unsafe constants
let r1 = &num as *const i32;
// unsafe mutable variables
let r2 = &mut num as *mut i32;
let address = 0x012345usize;
let r = address as *const i32;
unsafe {
println!("r1 is: {}", *r1);
println!("r2 is: {}", *r2);
// cannot print memory address
// println!("r is: {}", *r);
}
// run unsafe function
unsafe {
dangerous()
}
// create and reference for unsafe vector
let mut v = vec![1, 2, 3, 4, 5];
let r = &mut v[..];
// split unsafe vector into tuple
let (a, b) = r.split_at_mut(3);
assert_eq!(a, &mut [1, 2, 3]);
assert_eq!(b, &mut [4, 5]);
// create and reference for unsafe blank memory
let address2 = 0x012345usize;
let r = address as *mut i32;
// cut memory put into slice
let slice: &[i32] = unsafe { slice::from_raw_parts_mut(r, 10000) };
// connect to C application binary interface (ABI)
unsafe {
println!("Absolute value of -3 according to C: {}", abs(-3));
}
call_from_c();
// static constants can modify using unsafe
add_to_count(3);
unsafe {
println!("COUNTER: {}", COUNTER);
}
}
|
|
invoicerisk.py | try:
from urllib.parse import quote_plus
except ImportError:
from urllib import quote_plus
import processout
import json
from processout.networking.request import Request
from processout.networking.response import Response
# The content of this file was automatically generated
class InvoiceRisk(object):
def __init__(self, client, prefill = None):
self._client = client
self._score = None |
@property
def score(self):
"""Get score"""
return self._score
@score.setter
def score(self, val):
"""Set score
Keyword argument:
val -- New score value"""
self._score = val
return self
@property
def is_legit(self):
"""Get is_legit"""
return self._is_legit
@is_legit.setter
def is_legit(self, val):
"""Set is_legit
Keyword argument:
val -- New is_legit value"""
self._is_legit = val
return self
def fill_with_data(self, data):
"""Fill the current object with the new values pulled from data
Keyword argument:
data -- The data from which to pull the new values"""
if "score" in data.keys():
self.score = data["score"]
if "is_legit" in data.keys():
self.is_legit = data["is_legit"]
return self
def to_json(self):
return {
"score": self.score,
"is_legit": self.is_legit,
} | self._is_legit = None
if prefill != None:
self.fill_with_data(prefill)
|
docker.go | package main
import (
"fmt"
"os"
"github.com/Sirupsen/logrus"
"github.com/docker/docker/api/client"
"github.com/docker/docker/autogen/dockerversion"
"github.com/docker/docker/cli"
flag "github.com/docker/docker/pkg/mflag"
"github.com/docker/docker/pkg/reexec"
"github.com/docker/docker/pkg/term"
"github.com/docker/docker/utils"
)
func main() {
if reexec.Init() {
return
}
// Set terminal emulation based on platform as required.
stdin, stdout, stderr := term.StdStreams()
logrus.SetOutput(stderr)
flag.Merge(flag.CommandLine, clientFlags.FlagSet, commonFlags.FlagSet)
flag.Usage = func() {
fmt.Fprint(os.Stdout, "Usage: docker [OPTIONS] COMMAND [arg...]\n"+daemonUsage+" docker [ --help | -v | --version ]\n\n")
fmt.Fprint(os.Stdout, "A self-sufficient runtime for containers.\n\nOptions:\n")
flag.CommandLine.SetOutput(os.Stdout)
flag.PrintDefaults()
help := "\nCommands:\n"
for _, cmd := range dockerCommands {
help += fmt.Sprintf(" %-10.10s%s\n", cmd.name, cmd.description)
}
help += "\nRun 'docker COMMAND --help' for more information on a command."
fmt.Fprintf(os.Stdout, "%s\n", help)
}
flag.Parse()
if *flVersion {
showVersion()
return
}
if *flHelp {
// if global flag --help is present, regardless of what other options and commands there are,
// just print the usage.
flag.Usage()
return
}
// TODO: remove once `-d` is retired
handleGlobalDaemonFlag()
clientCli := client.NewDockerCli(stdin, stdout, stderr, clientFlags)
c := cli.New(clientCli, daemonCli)
if err := c.Run(flag.Args()...); err != nil {
if sterr, ok := err.(cli.StatusError); ok {
if sterr.Status != "" {
fmt.Fprintln(os.Stderr, sterr.Status)
os.Exit(1)
}
os.Exit(sterr.StatusCode)
}
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
}
func showVersion() | {
if utils.ExperimentalBuild() {
fmt.Printf("Docker version %s, build %s, experimental\n", dockerversion.VERSION, dockerversion.GITCOMMIT)
} else {
fmt.Printf("Docker version %s, build %s\n", dockerversion.VERSION, dockerversion.GITCOMMIT)
}
} |
|
index.js | import { route } from 'navi'
import React from 'react'
import { css } from 'styled-components/macro'
import Card from 'components/card'
import { colors } from 'theme'
function Landing(props) {
return (
<div>
<Card
css={css`
color: ${colors.text};
margin: 1rem;
padding: 1rem;
`}>
<h1
css={css`
font-size: 1.3rem;
font-weight: 900;
margin-top: 0.5rem;
margin-bottom: 0.5rem;
`}>
VOUCH.CHAT
</h1>
<p>The Slow Social Network</p>
</Card>
</div>
) |
export default route({
title: 'Home',
view: <Landing />,
}) | } |
0005_node.py | # Generated by Django 2.2.2 on 2019-07-18 13:26
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('catalog', '0004_auto_20190718_1315'),
]
operations = [
migrations.CreateModel(
name='Node',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ('identifier', models.CharField(max_length=20, unique=True)),
],
),
] | |
alpaca.min.js | !function(e,t){var n=!0;e&&"undefined"!=typeof e.umd&&(n=e.umd),n&&"object"==typeof exports?module.exports=t(require("jquery"),require("handlebars"),require("bootstrap")):n&&"function"==typeof define&&define.amd?define("alpaca",["jquery","handlebars","bootstrap"],t):e.Alpaca=t(e.jQuery,e.Handlebars,e.Bootstrap)}(this,function($,Handlebars,Bootstrap){return this.HandlebarsPrecompiled=this.HandlebarsPrecompiled||{},this.HandlebarsPrecompiled["web-display"]=this.HandlebarsPrecompiled["web-display"]||{},this.HandlebarsPrecompiled["web-display"]["container-array-item"]=Handlebars.template({1:function(e,t,n,i,a){return""},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a){var r,o,l,s='<script type="text/x-handlebars-template">\n\n <div>\n ';return o=null!=(o=n.itemField||(null!=t?t.itemField:t))?o:n.helperMissing,l={name:"itemField",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a},r="function"==typeof o?o.call(null!=t?t:{},l):o,n.itemField||(r=n.blockHelperMissing.call(t,r,l)),null!=r&&(s+=r),s+"\n </div>\n\n</script>\n"},useData:!0}),this.HandlebarsPrecompiled["web-display"]["container-array"]=Handlebars.template({1:function(e,t,n,i,a){var r,o,l,s="\n ";return o=null!=(o=n.item||(null!=t?t.item:t))?o:n.helperMissing,l={name:"item",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a},r="function"==typeof o?o.call(null!=t?t:{},l):o,n.item||(r=n.blockHelperMissing.call(t,r,l)),null!=r&&(s+=r),s+"\n\n"},2:function(e,t,n,i,a){return""},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a){var r;return'<script type="text/x-handlebars-template">\n\n <div>\n\n'+(null!=(r=n.each.call(null!=t?t:{},null!=t?t.items:t,{name:"each",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?r:"")+"\n </div>\n\n</script>"},useData:!0}),this.HandlebarsPrecompiled["web-display"]["container-object-item"]=Handlebars.template({1:function(e,t,n,i,a){return""},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a){var r,o,l,s='<script type="text/x-handlebars-template">\n\n <div>\n ';return o=null!=(o=n.itemField||(null!=t?t.itemField:t))?o:n.helperMissing,l={name:"itemField",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a},r="function"==typeof o?o.call(null!=t?t:{},l):o,n.itemField||(r=n.blockHelperMissing.call(t,r,l)),null!=r&&(s+=r),s+"\n </div>\n\n</script>\n"},useData:!0}),this.HandlebarsPrecompiled["web-display"]["container-object"]=Handlebars.template({1:function(e,t,n,i,a){var r,o,l,s="\n ";return o=null!=(o=n.item||(null!=t?t.item:t))?o:n.helperMissing,l={name:"item",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a},r="function"==typeof o?o.call(null!=t?t:{},l):o,n.item||(r=n.blockHelperMissing.call(t,r,l)),null!=r&&(s+=r),s+"\n\n"},2:function(e,t,n,i,a){return""},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a){var r;return'<script type="text/x-handlebars-template">\n\n <div>\n\n'+(null!=(r=n.each.call(null!=t?t:{},null!=t?t.items:t,{name:"each",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?r:"")+"\n </div>\n\n</script>"},useData:!0}),this.HandlebarsPrecompiled["web-display"]["container-table-item"]=Handlebars.template({1:function(e,t,n,i,a){return""},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a){var r;return'<script type="text/x-handlebars-template">\n\n <tr>\n '+(null!=(r=(n.itemField||t&&t.itemField||n.helperMissing).call(null!=t?t:{},"td",{name:"itemField",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?r:"")+"\n </tr>\n\n\n</script>\n"},useData:!0}),this.HandlebarsPrecompiled["web-display"]["container-table"]=Handlebars.template({1:function(e,t,n,i,a){return""},3:function(e,t,n,i,a){var r;return" <th>"+e.escapeExpression(e.lambda(null!=(r=null!=t?t.value:t)?r.title:r,t))+"</th>\n"},5:function(e,t,n,i,a){var r;return"\n "+(null!=(r=(n.item||t&&t.item||n.helperMissing).call(null!=t?t:{},"tr",{name:"item",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?r:"")+"\n\n"},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a){var r,o,l,s=null!=t?t:{},u=n.helperMissing,c='<script type="text/x-handlebars-template">\n\n <div>\n\n ';return o=null!=(o=n.arrayToolbar||(null!=t?t.arrayToolbar:t))?o:u,l={name:"arrayToolbar",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a},r="function"==typeof o?o.call(s,l):o,n.arrayToolbar||(r=n.blockHelperMissing.call(t,r,l)),null!=r&&(c+=r),c+"\n\n <table>\n\n <!-- table headers -->\n <thead>\n <tr>\n"+(null!=(r=(n.eachProperty||t&&t.eachProperty||u).call(s,null!=(r=null!=(r=null!=t?t.schema:t)?r.items:r)?r.properties:r,{name:"eachProperty",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a}))?r:"")+" </tr>\n </thead>\n\n <!-- table body -->\n <tbody>\n"+(null!=(r=n.each.call(s,null!=t?t.items:t,{name:"each",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a}))?r:"")+" </tbody>\n\n </table>\n\n </div>\n\n</script>"},useData:!0}),this.HandlebarsPrecompiled["web-display"]["container-tablerow-item"]=Handlebars.template({1:function(e,t,n,i,a){return""},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a){var r,o,l,s='<script type="text/x-handlebars-template">\n\n <td>\n ';return o=null!=(o=n.itemField||(null!=t?t.itemField:t))?o:n.helperMissing,l={name:"itemField",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a},r="function"==typeof o?o.call(null!=t?t:{},l):o,n.itemField||(r=n.blockHelperMissing.call(t,r,l)),null!=r&&(s+=r),s+"\n </td>\n\n</script>\n"},useData:!0}),this.HandlebarsPrecompiled["web-display"]["container-tablerow"]=Handlebars.template({1:function(e,t,n,i,a){var r,o,l,s=" ";return o=null!=(o=n.item||(null!=t?t.item:t))?o:n.helperMissing,l={name:"item",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a},r="function"==typeof o?o.call(null!=t?t:{},l):o,n.item||(r=n.blockHelperMissing.call(t,r,l)),null!=r&&(s+=r),s+"\n"},2:function(e,t,n,i,a){return""},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a){var r;return'<script type="text/x-handlebars-template">\n\n <div class="alpaca-merge-up">\n\n'+(null!=(r=n.each.call(null!=t?t:{},null!=t?t.items:t,{name:"each",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?r:"")+"\n </div>\n\n</script>"},useData:!0}),this.HandlebarsPrecompiled["web-display"].container=Handlebars.template({1:function(e,t,n,i,a){var r;return' <legend class="'+(null!=(r=n["if"].call(null!=t?t:{},null!=(r=null!=t?t.options:t)?r.labelClass:r,{name:"if",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a}))?r:"")+' alpaca-container-label">'+(null!=(r=e.lambda(null!=(r=null!=t?t.options:t)?r.label:r,t))?r:"")+"</legend>\n"},2:function(e,t,n,i,a){var r;return e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.labelClass:r,t))},4:function(e,t,n,i,a){var r;return null!=(r=n.each.call(null!=t?t:{},null!=(r=null!=t?t.options:t)?r.helpers:r,{name:"each",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a}))?r:""},5:function(e,t,n,i,a){var r;return' <p class="alpaca-helper '+(null!=(r=n["if"].call(null!=t?t:{},null!=(r=null!=t?t.options:t)?r.helperClass:r,{name:"if",hash:{},fn:e.program(6,a,0),inverse:e.noop,data:a}))?r:"")+'">\n <i class="alpaca-icon-helper"></i>\n '+(null!=(r=e.lambda(t,t))?r:"")+"\n </p>\n"},6:function(e,t,n,i,a){var r;return e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.helperClass:r,t))},8:function(e,t,n,i,a){return""},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a){var r,o,l,s=null!=t?t:{},u='<script type="text/x-handlebars-template">\n\n <div>\n\n'+(null!=(r=n["if"].call(s,null!=(r=null!=t?t.options:t)?r.label:r,{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?r:"")+"\n"+(null!=(r=n["if"].call(s,null!=(r=null!=t?t.options:t)?r.helpers:r,{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a}))?r:"")+"\n ";return o=null!=(o=n.container||(null!=t?t.container:t))?o:n.helperMissing,l={name:"container",hash:{},fn:e.program(8,a,0),inverse:e.noop,data:a},r="function"==typeof o?o.call(s,l):o,n.container||(r=n.blockHelperMissing.call(t,r,l)),null!=r&&(u+=r),u+"\n\n </div>\n\n</script>"},useData:!0}),this.HandlebarsPrecompiled["web-display"]["control-any"]=Handlebars.template({compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a){var r;return'<script type="text/x-handlebars-template">\n\n <div>'+(null!=(r=(n.str||t&&t.str||n.helperMissing).call(null!=t?t:{},null!=t?t.data:t,{name:"str",hash:{},data:a}))?r:"")+"</div>\n\n</script>"},useData:!0}),this.HandlebarsPrecompiled["web-display"]["control-checkbox"]=Handlebars.template({compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a){var r;return'<script type="text/x-handlebars-template">\n\n <div>'+(null!=(r=(n.str||t&&t.str||n.helperMissing).call(null!=t?t:{},null!=t?t.data:t,{name:"str",hash:{},data:a}))?r:"")+"</div>\n\n</script>"},useData:!0}),this.HandlebarsPrecompiled["web-display"]["control-hidden"]=Handlebars.template({compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a){return'<script type="text/x-handlebars-template">\n\n</script>'},useData:!0}),this.HandlebarsPrecompiled["web-display"]["control-image"]=Handlebars.template({compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a){var r,o=null!=t?t:{},l=n.helperMissing,s="function",u=e.escapeExpression;return'<script type="text/x-handlebars-template">\n\n <div class="alpaca-image-display">\n <img id="'+u((r=null!=(r=n.id||(null!=t?t.id:t))?r:l,typeof r===s?r.call(o,{name:"id",hash:{},data:a}):r))+'-image" src="'+u((r=null!=(r=n.data||(null!=t?t.data:t))?r:l,typeof r===s?r.call(o,{name:"data",hash:{},data:a}):r))+'">\n </div>\n\n</script>'},useData:!0}),this.HandlebarsPrecompiled["web-display"]["control-password"]=Handlebars.template({1:function(e,t,n,i,a){return""},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a){var r;return'<script type="text/x-handlebars-template">\n\n <div>'+(null!=(r=(n.disguise||t&&t.disguise||n.helperMissing).call(null!=t?t:{},null!=t?t.data:t,"•",{name:"disguise",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?r:"")+"</div>\n\n</script>"},useData:!0}),this.HandlebarsPrecompiled["web-display"]["control-radio"]=Handlebars.template({1:function(e,t,n,i,a,r,o){var l;return null!=(l=(n.compare||t&&t.compare||n.helperMissing).call(null!=t?t:{},null!=t?t.value:t,null!=o[1]?o[1].data:o[1],{name:"compare",hash:{},fn:e.program(2,a,0,r,o),inverse:e.noop,data:a}))?l:""},2:function(e,t,n,i,a){var r,o;return" "+(null!=(o=null!=(o=n.text||(null!=t?t.text:t))?o:n.helperMissing,r="function"==typeof o?o.call(null!=t?t:{},{name:"text",hash:{},data:a}):o)?r:"")+"\n"},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a,r,o){var l;return'<script type="text/x-handlebars-template">\n\n <div>\n'+(null!=(l=n.each.call(null!=t?t:{},null!=t?t.selectOptions:t,{name:"each",hash:{},fn:e.program(1,a,0,r,o),inverse:e.noop,data:a}))?l:"")+" </div>\n\n</script>\n"},useData:!0,useDepths:!0}),this.HandlebarsPrecompiled["web-display"]["control-select"]=Handlebars.template({1:function(e,t,n,i,a,r,o){var l;return null!=(l=(n.compare||t&&t.compare||n.helperMissing).call(null!=t?t:{},null!=t?t.value:t,null!=o[1]?o[1].data:o[1],{name:"compare",hash:{},fn:e.program(2,a,0,r,o),inverse:e.noop,data:a}))?l:""},2:function(e,t,n,i,a){var r,o;return" "+(null!=(o=null!=(o=n.text||(null!=t?t.text:t))?o:n.helperMissing,r="function"==typeof o?o.call(null!=t?t:{},{name:"text",hash:{},data:a}):o)?r:"")+"\n"},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a,r,o){var l;return'<script type="text/x-handlebars-template">\n\n <div>\n'+(null!=(l=n.each.call(null!=t?t:{},null!=t?t.selectOptions:t,{name:"each",hash:{},fn:e.program(1,a,0,r,o),inverse:e.noop,data:a}))?l:"")+" </div>\n\n</script>\n"},useData:!0,useDepths:!0}),this.HandlebarsPrecompiled["web-display"]["control-text"]=Handlebars.template({compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a){var r,o;return'<script type="text/x-handlebars-template">\n\n <div>'+(null!=(o=null!=(o=n.data||(null!=t?t.data:t))?o:n.helperMissing,r="function"==typeof o?o.call(null!=t?t:{},{name:"data",hash:{},data:a}):o)?r:"")+"</div>\n\n</script>"},useData:!0}),this.HandlebarsPrecompiled["web-display"]["control-textarea"]=Handlebars.template({compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a){var r,o;return'<script type="text/x-handlebars-template">\n\n <p>\n '+(null!=(o=null!=(o=n.data||(null!=t?t.data:t))?o:n.helperMissing,r="function"==typeof o?o.call(null!=t?t:{},{name:"data",hash:{},data:a}):o)?r:"")+"\n </p>\n\n</script>"},useData:!0}),this.HandlebarsPrecompiled["web-display"]["control-url"]=Handlebars.template({1:function(e,t,n,i,a){var r;return'target="'+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.anchorTarget:r,t))+'"'},3:function(e,t,n,i,a){var r;return e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.anchorTitle:r,t))},5:function(e,t,n,i,a){var r;return e.escapeExpression((r=null!=(r=n.data||(null!=t?t.data:t))?r:n.helperMissing,"function"==typeof r?r.call(null!=t?t:{},{name:"data",hash:{},data:a}):r))},7:function(e,t,n,i,a){var r;return" "+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.anchorTitle:r,t))+"\n"},9:function(e,t,n,i,a){var r;return" "+e.escapeExpression((r=null!=(r=n.data||(null!=t?t.data:t))?r:n.helperMissing,"function"==typeof r?r.call(null!=t?t:{},{name:"data",hash:{},data:a}):r))+"\n"},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a){var r,o,l=null!=t?t:{};return'<script type="text/x-handlebars-template">\n\n <div class="alpaca-control-url-anchor-wrapper">\n <a href="'+e.escapeExpression((o=null!=(o=n.data||(null!=t?t.data:t))?o:n.helperMissing,"function"==typeof o?o.call(l,{name:"data",hash:{},data:a}):o))+'" '+(null!=(r=n["if"].call(l,null!=(r=null!=t?t.options:t)?r.anchorTarget:r,{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?r:"")+' title="'+(null!=(r=n["if"].call(l,null!=(r=null!=t?t.options:t)?r.anchorTitle:r,{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.program(5,a,0),data:a}))?r:"")+'">\n'+(null!=(r=n["if"].call(l,null!=(r=null!=t?t.options:t)?r.anchorTitle:r,{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.program(9,a,0),data:a}))?r:"")+" </a>\n </div>\n\n</script>"},useData:!0}),this.HandlebarsPrecompiled["web-display"].control=Handlebars.template({1:function(e,t,n,i,a){var r,o,l=null!=t?t:{};return' <label class="'+(null!=(r=n["if"].call(l,null!=(r=null!=t?t.options:t)?r.labelClass:r,{name:"if",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a}))?r:"")+' alpaca-control-label" for="'+e.escapeExpression((o=null!=(o=n.id||(null!=t?t.id:t))?o:n.helperMissing,"function"==typeof o?o.call(l,{name:"id",hash:{},data:a}):o))+'">'+(null!=(r=e.lambda(null!=(r=null!=t?t.options:t)?r.label:r,t))?r:"")+"</label>\n"},2:function(e,t,n,i,a){var r;return e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.labelClass:r,t))},4:function(e,t,n,i,a){return""},6:function(e,t,n,i,a){var r;return null!=(r=n.each.call(null!=t?t:{},null!=(r=null!=t?t.options:t)?r.helpers:r,{name:"each",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a}))?r:""},7:function(e,t,n,i,a){var r;return' <p class="'+(null!=(r=n["if"].call(null!=t?t:{},null!=(r=null!=t?t.options:t)?r.helperClass:r,{name:"if",hash:{},fn:e.program(8,a,0),inverse:e.noop,data:a}))?r:"")+'">\n <i class="info-sign"></i>\n '+(null!=(r=e.lambda(t,t))?r:"")+"\n </p>\n"},8:function(e,t,n,i,a){var r;return e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.helperClass:r,t))},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a){var r,o,l,s=null!=t?t:{},u='<script type="text/x-handlebars-template">\n\n <div>\n\n'+(null!=(r=n["if"].call(s,null!=(r=null!=t?t.options:t)?r.label:r,{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?r:"")+"\n ";return o=null!=(o=n.control||(null!=t?t.control:t))?o:n.helperMissing,l={name:"control",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a},r="function"==typeof o?o.call(s,l):o,n.control||(r=n.blockHelperMissing.call(t,r,l)),null!=r&&(u+=r),u+"\n\n"+(null!=(r=n["if"].call(s,null!=(r=null!=t?t.options:t)?r.helpers:r,{name:"if",hash:{},fn:e.program(6,a,0),inverse:e.noop,data:a}))?r:"")+"\n </div>\n\n</script>\n"},useData:!0}),this.HandlebarsPrecompiled["web-display"].form=Handlebars.template({1:function(e,t,n,i,a){return""},3:function(e,t,n,i,a){var r;return null!=(r=n.each.call(null!=t?t:{},null!=(r=null!=t?t.options:t)?r.buttons:r,{name:"each",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a}))?r:""},4:function(e,t,n,i,a){var r,o,l=null!=t?t:{},s=n.helperMissing,u="function",c=e.escapeExpression;return' <button data-key="'+c((o=null!=(o=n.key||a&&a.key)?o:s,typeof o===u?o.call(l,{name:"key",hash:{},data:a}):o))+'" '+(null!=(r=(n.compare||t&&t.compare||s).call(l,null!=t?t.type:t,"submit",{name:"compare",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a}))?r:"")+" "+(null!=(r=(n.compare||t&&t.compare||s).call(l,null!=t?t.type:t,"reset",{name:"compare",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a}))?r:"")+' class="alpaca-form-button alpaca-form-button-'+c((o=null!=(o=n.key||a&&a.key)?o:s,typeof o===u?o.call(l,{name:"key",hash:{},data:a}):o))+" "+c((o=null!=(o=n.styles||(null!=t?t.styles:t))?o:s,typeof o===u?o.call(l,{name:"styles",hash:{},data:a}):o))+'" '+(null!=(r=n.each.call(l,null!=t?t.value:t,{name:"each",hash:{},fn:e.program(9,a,0),inverse:e.noop,data:a}))?r:"")+" "+(null!=(r=n.each.call(l,null!=t?t.attributes:t,{name:"each",hash:{},fn:e.program(11,a,0),inverse:e.noop,data:a}))?r:"")+">"+(null!=(o=null!=(o=n.value||(null!=t?t.value:t))?o:s,r=typeof o===u?o.call(l,{name:"value",hash:{},data:a}):o)?r:"")+"</button>\n"},5:function(e,t,n,i,a){return'type="submit"'},7:function(e,t,n,i,a){return'type="reset"'},9:function(e,t,n,i,a){var r,o=e.escapeExpression;return o((r=null!=(r=n.key||a&&a.key)?r:n.helperMissing,"function"==typeof r?r.call(null!=t?t:{},{name:"key",hash:{},data:a}):r))+'="'+o(e.lambda(t,t))+'"'},11:function(e,t,n,i,a){var r,o=e.escapeExpression;return" "+o((r=null!=(r=n.key||a&&a.key)?r:n.helperMissing,"function"==typeof r?r.call(null!=t?t:{},{name:"key",hash:{},data:a}):r))+'="'+o(e.lambda(t,t))+'"'},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a){var r,o,l,s=null!=t?t:{},u='<script type="text/x-handlebars-template">\n\n <form role="form">\n\n ';return o=null!=(o=n.formItems||(null!=t?t.formItems:t))?o:n.helperMissing,l={name:"formItems",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a},r="function"==typeof o?o.call(s,l):o,n.formItems||(r=n.blockHelperMissing.call(t,r,l)),null!=r&&(u+=r),u+'\n\n <div class="alpaca-form-buttons-container">\n'+(null!=(r=n["if"].call(s,null!=(r=null!=t?t.options:t)?r.buttons:r,{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a}))?r:"")+" </div>\n\n </form>\n\n</script>"},useData:!0}),this.HandlebarsPrecompiled["web-edit"]=this.HandlebarsPrecompiled["web-edit"]||{},this.HandlebarsPrecompiled["web-edit"]["container-array-actionbar"]=Handlebars.template({1:function(e,t,n,i,a,r,o){var l,s,u=e.escapeExpression,c=null!=t?t:{};return' <button class="alpaca-array-actionbar-action '+u(e.lambda(null!=(l=null!=(l=null!=o[1]?o[1].view:o[1])?l.styles:l)?l.smallButton:l,t))+'" data-alpaca-array-actionbar-action="'+u((s=null!=(s=n.action||(null!=t?t.action:t))?s:n.helperMissing,"function"==typeof s?s.call(c,{name:"action",hash:{},data:a}):s))+'">\n'+(null!=(l=n["if"].call(c,null!=t?t.iconClass:t,{name:"if",hash:{},fn:e.program(2,a,0,r,o),inverse:e.noop,data:a}))?l:"")+" "+(null!=(l=n["if"].call(c,null!=t?t.label:t,{name:"if",hash:{},fn:e.program(4,a,0,r,o),inverse:e.noop,data:a}))?l:"")+"\n </button>\n"},2:function(e,t,n,i,a){return' <i class="'+e.escapeExpression(e.lambda(null!=t?t.iconClass:t,t))+'"></i>\n'},4:function(e,t,n,i,a){var r,o;return null!=(o=null!=(o=n.label||(null!=t?t.label:t))?o:n.helperMissing,r="function"==typeof o?o.call(null!=t?t:{},{name:"label",hash:{},data:a}):o)?r:""},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a,r,o){var l,s,u=null!=t?t:{},c=n.helperMissing,d="function",p=e.escapeExpression;return'<script type="text/x-handlebars-template">\n\n <div class="alpaca-array-actionbar alpaca-array-actionbar-'+p((s=null!=(s=n.actionbarStyle||(null!=t?t.actionbarStyle:t))?s:c,typeof s===d?s.call(u,{name:"actionbarStyle",hash:{},data:a}):s))+' btn-group" data-alpaca-array-actionbar-parent-field-id="'+p((s=null!=(s=n.parentFieldId||(null!=t?t.parentFieldId:t))?s:c,typeof s===d?s.call(u,{name:"parentFieldId",hash:{},data:a}):s))+'" data-alpaca-array-actionbar-field-id="'+p((s=null!=(s=n.fieldId||(null!=t?t.fieldId:t))?s:c,typeof s===d?s.call(u,{name:"fieldId",hash:{},data:a}):s))+'" data-alpaca-array-actionbar-item-index="'+p((s=null!=(s=n.itemIndex||(null!=t?t.itemIndex:t))?s:c,typeof s===d?s.call(u,{name:"itemIndex",hash:{},data:a}):s))+'">\n'+(null!=(l=n.each.call(u,null!=t?t.actions:t,{name:"each",hash:{},fn:e.program(1,a,0,r,o),inverse:e.noop,data:a}))?l:"")+" </div>\n\n</script>"},useData:!0,useDepths:!0}),this.HandlebarsPrecompiled["web-edit"]["container-array-item"]=Handlebars.template({1:function(e,t,n,i,a){var r,o,l,s=null!=t?t:{},u=n.helperMissing,c="function",d=n.blockHelperMissing,p=' <div class="pull-left">\n ';return o=null!=(o=n.arrayActionbar||(null!=t?t.arrayActionbar:t))?o:u,l={name:"arrayActionbar",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a},r=typeof o===c?o.call(s,l):o,n.arrayActionbar||(r=d.call(t,r,l)),null!=r&&(p+=r),p+='\n </div>\n <div class="pull-right">\n ',o=null!=(o=n.itemField||(null!=t?t.itemField:t))?o:u,l={name:"itemField",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a},r=typeof o===c?o.call(s,l):o,n.itemField||(r=d.call(t,r,l)),null!=r&&(p+=r),p+'\n </div>\n <div class="clear"></div>\n'},2:function(e,t,n,i,a){return""},4:function(e,t,n,i,a){var r;return null!=(r=(n.compare||t&&t.compare||n.helperMissing).call(null!=t?t:{},null!=t?t.actionbarStyle:t,"right",{name:"compare",hash:{},fn:e.program(5,a,0),inverse:e.program(7,a,0),data:a}))?r:""},5:function(e,t,n,i,a){var r,o,l,s=null!=t?t:{},u=n.helperMissing,c="function",d=n.blockHelperMissing,p=' <div class="pull-left">\n ';return o=null!=(o=n.itemField||(null!=t?t.itemField:t))?o:u,l={name:"itemField",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a},r=typeof o===c?o.call(s,l):o,n.itemField||(r=d.call(t,r,l)),null!=r&&(p+=r),p+='\n </div>\n <div class="pull-right">\n ',o=null!=(o=n.arrayActionbar||(null!=t?t.arrayActionbar:t))?o:u,l={name:"arrayActionbar",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a},r=typeof o===c?o.call(s,l):o,n.arrayActionbar||(r=d.call(t,r,l)),null!=r&&(p+=r),p+'\n </div>\n <div class="alpaca-clear"></div>\n'},7:function(e,t,n,i,a){var r,o,l,s=null!=t?t:{},u=n.helperMissing,c=" <div>\n\n"+(null!=(r=(n.compare||t&&t.compare||u).call(s,null!=t?t.actionbarStyle:t,"top",{name:"compare",hash:{},fn:e.program(8,a,0),inverse:e.noop,data:a}))?r:"")+"\n ";return o=null!=(o=n.itemField||(null!=t?t.itemField:t))?o:u,l={name:"itemField",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a},r="function"==typeof o?o.call(s,l):o,n.itemField||(r=n.blockHelperMissing.call(t,r,l)),null!=r&&(c+=r),c+"\n\n"+(null!=(r=(n.compare||t&&t.compare||u).call(s,null!=t?t.actionbarStyle:t,"bottom",{name:"compare",hash:{},fn:e.program(8,a,0),inverse:e.noop,data:a}))?r:"")+"\n </div>\n"},8:function(e,t,n,i,a){var r,o,l,s=" ";return o=null!=(o=n.arrayActionbar||(null!=t?t.arrayActionbar:t))?o:n.helperMissing,l={name:"arrayActionbar",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a},r="function"==typeof o?o.call(null!=t?t:{},l):o,n.arrayActionbar||(r=n.blockHelperMissing.call(t,r,l)),null!=r&&(s+=r),s+"\n"},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a){var r;return'<script type="text/x-handlebars-template">\n\n <div>\n'+(null!=(r=(n.compare||t&&t.compare||n.helperMissing).call(null!=t?t:{},null!=t?t.actionbarStyle:t,"left",{name:"compare",hash:{},fn:e.program(1,a,0),inverse:e.program(4,a,0),data:a}))?r:"")+" </div>\n\n</script>\n"},useData:!0}),this.HandlebarsPrecompiled["web-edit"]["container-array-toolbar"]=Handlebars.template({1:function(e,t,n,i,a){return" btn-group"},3:function(e,t,n,i,a,r,o){var l,s=null!=t?t:{},u=n.helperMissing;return"\n"+(null!=(l=(n.compare||t&&t.compare||u).call(s,null!=o[1]?o[1].toolbarStyle:o[1],"link",{name:"compare",hash:{},fn:e.program(4,a,0,r,o),inverse:e.noop,data:a}))?l:"")+"\n"+(null!=(l=(n.compare||t&&t.compare||u).call(s,null!=o[1]?o[1].toolbarStyle:o[1],"button",{name:"compare",hash:{},fn:e.program(6,a,0,r,o),inverse:e.noop,data:a}))?l:"")+"\n"},4:function(e,t,n,i,a){var r,o,l=null!=t?t:{},s=n.helperMissing,u="function";return' <a href="#" class="alpaca-array-toolbar-action" data-alpaca-array-toolbar-action="'+e.escapeExpression((o=null!=(o=n.action||(null!=t?t.action:t))?o:s,typeof o===u?o.call(l,{name:"action",hash:{},data:a}):o))+'">'+(null!=(o=null!=(o=n.label||(null!=t?t.label:t))?o:s,r=typeof o===u?o.call(l,{name:"label",hash:{},data:a}):o)?r:"")+"</a>\n"},6:function(e,t,n,i,a,r,o){var l,s,u=e.escapeExpression,c=null!=t?t:{};return' <button class="alpaca-array-toolbar-action '+u(e.lambda(null!=(l=null!=(l=null!=o[1]?o[1].view:o[1])?l.styles:l)?l.smallButton:l,t))+'" data-alpaca-array-toolbar-action="'+u((s=null!=(s=n.action||(null!=t?t.action:t))?s:n.helperMissing,"function"==typeof s?s.call(c,{name:"action",hash:{},data:a}):s))+'">\n'+(null!=(l=n["if"].call(c,null!=t?t.iconClass:t,{name:"if",hash:{},fn:e.program(7,a,0,r,o),inverse:e.noop,data:a}))?l:"")+" "+(null!=(l=n["if"].call(c,null!=t?t.label:t,{name:"if",hash:{},fn:e.program(9,a,0,r,o),inverse:e.noop,data:a}))?l:"")+"\n </button>\n"},7:function(e,t,n,i,a){var r;return' <i class="'+e.escapeExpression((r=null!=(r=n.iconClass||(null!=t?t.iconClass:t))?r:n.helperMissing,"function"==typeof r?r.call(null!=t?t:{},{name:"iconClass",hash:{},data:a}):r))+'"></i>\n'},9:function(e,t,n,i,a){var r,o;return null!=(o=null!=(o=n.label||(null!=t?t.label:t))?o:n.helperMissing,r="function"==typeof o?o.call(null!=t?t:{},{name:"label",hash:{},data:a}):o)?r:""},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a,r,o){var l,s,u=null!=t?t:{},c=n.helperMissing;return'<script type="text/x-handlebars-template">\n\n <div class="alpaca-array-toolbar" data-alpaca-array-toolbar-field-id="'+e.escapeExpression((s=null!=(s=n.id||(null!=t?t.id:t))?s:c,"function"==typeof s?s.call(u,{name:"id",hash:{},data:a}):s))+'" '+(null!=(l=(n.compare||t&&t.compare||c).call(u,null!=t?t.toolbarStyle:t,"button",{name:"compare",hash:{},fn:e.program(1,a,0,r,o),inverse:e.noop,data:a}))?l:"")+">\n\n"+(null!=(l=n.each.call(u,null!=t?t.actions:t,{name:"each",hash:{},fn:e.program(3,a,0,r,o),inverse:e.noop,data:a}))?l:"")+"\n </div>\n\n</script>"},useData:!0,useDepths:!0}),this.HandlebarsPrecompiled["web-edit"]["container-array"]=Handlebars.template({1:function(e,t,n,i,a){return""},3:function(e,t,n,i,a){var r,o,l,s="\n ";return o=null!=(o=n.item||(null!=t?t.item:t))?o:n.helperMissing,l={name:"item",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a},r="function"==typeof o?o.call(null!=t?t:{},l):o,n.item||(r=n.blockHelperMissing.call(t,r,l)),null!=r&&(s+=r),s+"\n\n"},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a){var r,o,l,s=null!=t?t:{},u='<script type="text/x-handlebars-template">\n\n <div>\n\n ';return o=null!=(o=n.arrayToolbar||(null!=t?t.arrayToolbar:t))?o:n.helperMissing,l={name:"arrayToolbar",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a},r="function"==typeof o?o.call(s,l):o,n.arrayToolbar||(r=n.blockHelperMissing.call(t,r,l)),null!=r&&(u+=r),u+"\n\n"+(null!=(r=n.each.call(s,null!=t?t.items:t,{name:"each",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a}))?r:"")+"\n </div>\n\n</script>\n"},useData:!0}),this.HandlebarsPrecompiled["web-edit"]["container-object-item"]=Handlebars.template({1:function(e,t,n,i,a){return""},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a){var r,o,l,s='<script type="text/x-handlebars-template">\n\n <div>\n\n ';return o=null!=(o=n.itemField||(null!=t?t.itemField:t))?o:n.helperMissing,l={name:"itemField",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a},r="function"==typeof o?o.call(null!=t?t:{},l):o,n.itemField||(r=n.blockHelperMissing.call(t,r,l)),null!=r&&(s+=r),s+"\n\n </div>\n\n</script>\n"},useData:!0}),this.HandlebarsPrecompiled["web-edit"]["container-object"]=Handlebars.template({1:function(e,t,n,i,a){var r,o,l,s="\n ";return o=null!=(o=n.item||(null!=t?t.item:t))?o:n.helperMissing,l={name:"item",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a},r="function"==typeof o?o.call(null!=t?t:{},l):o,n.item||(r=n.blockHelperMissing.call(t,r,l)),null!=r&&(s+=r),s+"\n\n"},2:function(e,t,n,i,a){return""},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a){var r;return'<script type="text/x-handlebars-template">\n\n <div>\n\n'+(null!=(r=n.each.call(null!=t?t:{},null!=t?t.items:t,{name:"each",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?r:"")+"\n </div>\n\n</script>"},useData:!0}),this.HandlebarsPrecompiled["web-edit"]["container-table-item"]=Handlebars.template({1:function(e,t,n,i,a){return""},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a){var r;return'<script type="text/x-handlebars-template">\n\n <tr>\n '+(null!=(r=(n.itemField||t&&t.itemField||n.helperMissing).call(null!=t?t:{},"td",{name:"itemField",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?r:"")+"\n </tr>\n\n</script>\n"},useData:!0}),this.HandlebarsPrecompiled["web-edit"]["container-table"]=Handlebars.template({1:function(e,t,n,i,a){return""},3:function(e,t,n,i,a){return' <!-- hidden column storing sort order -->\n <th class="alpaca-table-reorder-index-header"></th>\n <!-- draggable -->\n <th class="alpaca-table-reorder-draggable-header"></th>\n'},5:function(e,t,n,i,a){var r,o,l=null!=t?t:{},s=n.helperMissing,u="function";return' <th data-header-id="'+e.escapeExpression((o=null!=(o=n.id||(null!=t?t.id:t))?o:s,typeof o===u?o.call(l,{name:"id",hash:{},data:a}):o))+'" '+(null!=(r=n["if"].call(l,null!=t?t.hidden:t,{name:"if",hash:{},fn:e.program(6,a,0),inverse:e.noop,data:a}))?r:"")+">"+(null!=(o=null!=(o=n.title||(null!=t?t.title:t))?o:s,r=typeof o===u?o.call(l,{name:"title",hash:{},data:a}):o)?r:"")+"</th>\n"},6:function(e,t,n,i,a){return'class="alpaca-table-column-hidden"'},8:function(e,t,n,i,a){return" <th>Actions</th>\n"},10:function(e,t,n,i,a){var r;return"\n "+(null!=(r=(n.item||t&&t.item||n.helperMissing).call(null!=t?t:{},"tr",{name:"item",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?r:"")+"\n\n"},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a){var r,o,l,s=null!=t?t:{},u='<script type="text/x-handlebars-template">\n\n <div>\n\n ';return o=null!=(o=n.arrayToolbar||(null!=t?t.arrayToolbar:t))?o:n.helperMissing,l={name:"arrayToolbar",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a},r="function"==typeof o?o.call(s,l):o,n.arrayToolbar||(r=n.blockHelperMissing.call(t,r,l)),null!=r&&(u+=r),u+"\n\n <table>\n\n <!-- table headers -->\n <thead>\n <tr>\n\n"+(null!=(r=n["if"].call(s,null!=(r=null!=t?t.options:t)?r.dragRows:r,{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a}))?r:"")+"\n"+(null!=(r=n.each.call(s,null!=t?t.headers:t,{name:"each",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a}))?r:"")+"\n"+(null!=(r=n["if"].call(s,null!=(r=null!=t?t.options:t)?r.showActionsColumn:r,{name:"if",hash:{},fn:e.program(8,a,0),inverse:e.noop,data:a}))?r:"")+" </tr>\n </thead>\n\n <!-- table body -->\n <tbody>\n"+(null!=(r=n.each.call(s,null!=t?t.items:t,{
name:"each",hash:{},fn:e.program(10,a,0),inverse:e.noop,data:a}))?r:"")+" </tbody>\n\n </table>\n\n </div>\n\n</script>"},useData:!0}),this.HandlebarsPrecompiled["web-edit"]["container-tablerow-item"]=Handlebars.template({1:function(e,t,n,i,a){return""},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a){var r,o,l,s='<script type="text/x-handlebars-template">\n\n <td>\n ';return o=null!=(o=n.itemField||(null!=t?t.itemField:t))?o:n.helperMissing,l={name:"itemField",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a},r="function"==typeof o?o.call(null!=t?t:{},l):o,n.itemField||(r=n.blockHelperMissing.call(t,r,l)),null!=r&&(s+=r),s+"\n </td>\n\n</script>\n"},useData:!0}),this.HandlebarsPrecompiled["web-edit"]["container-tablerow"]=Handlebars.template({1:function(e,t,n,i,a){return'\n <!-- hidden sort order column -->\n <div class="alpaca-table-reorder-index-cell"></div>\n\n <!-- reorder draggable -->\n <div class="alpaca-table-reorder-draggable-cell">\n <i class="glyphicon glyphicon-oldmenu-hamburger"></i>\n </div>\n'},3:function(e,t,n,i,a){var r;return null!=(r=n["if"].call(null!=t?t:{},null!=t?t.hidden:t,{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.program(6,a,0),data:a}))?r:""},4:function(e,t,n,i,a){return""},6:function(e,t,n,i,a){var r,o,l,s=" ";return o=null!=(o=n.item||(null!=t?t.item:t))?o:n.helperMissing,l={name:"item",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a},r="function"==typeof o?o.call(null!=t?t:{},l):o,n.item||(r=n.blockHelperMissing.call(t,r,l)),null!=r&&(s+=r),s+"\n"},8:function(e,t,n,i,a){var r,o,l,s=' <div class="alpaca-merge-up">\n ';return o=null!=(o=n.arrayActionbar||(null!=t?t.arrayActionbar:t))?o:n.helperMissing,l={name:"arrayActionbar",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a},r="function"==typeof o?o.call(null!=t?t:{},l):o,n.arrayActionbar||(r=n.blockHelperMissing.call(t,r,l)),null!=r&&(s+=r),s+"\n </div>\n"},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a){var r,o=null!=t?t:{};return'<script type="text/x-handlebars-template">\n\n <div class="alpaca-merge-up">\n\n <!-- drag cell -->\n'+(null!=(r=n["if"].call(o,null!=(r=null!=t?t.options:t)?r.dragRows:r,{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?r:"")+"\n"+(null!=(r=n.each.call(o,null!=t?t.items:t,{name:"each",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a}))?r:"")+"\n <!-- actions cell -->\n"+(null!=(r=n["if"].call(o,null!=(r=null!=t?t.options:t)?r.showActionsColumn:r,{name:"if",hash:{},fn:e.program(8,a,0),inverse:e.noop,data:a}))?r:"")+"\n </div>\n\n</script>"},useData:!0}),this.HandlebarsPrecompiled["web-edit"].container=Handlebars.template({1:function(e,t,n,i,a){var r;return' <legend class="'+(null!=(r=n["if"].call(null!=t?t:{},null!=(r=null!=t?t.options:t)?r.labelClass:r,{name:"if",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a}))?r:"")+' alpaca-container-label">'+(null!=(r=e.lambda(null!=(r=null!=t?t.options:t)?r.label:r,t))?r:"")+"</legend>\n"},2:function(e,t,n,i,a){var r;return e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.labelClass:r,t))},4:function(e,t,n,i,a){var r;return null!=(r=n.each.call(null!=t?t:{},null!=(r=null!=t?t.options:t)?r.helpers:r,{name:"each",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a}))?r:""},5:function(e,t,n,i,a){var r;return' <p class="alpaca-helper '+(null!=(r=n["if"].call(null!=t?t:{},null!=(r=null!=t?t.options:t)?r.helperClass:r,{name:"if",hash:{},fn:e.program(6,a,0),inverse:e.noop,data:a}))?r:"")+'">\n <i class="alpaca-icon-helper"></i>\n '+(null!=(r=e.lambda(t,t))?r:"")+"\n </p>\n"},6:function(e,t,n,i,a){var r;return e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.helperClass:r,t))},8:function(e,t,n,i,a){return""},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a){var r,o,l,s=null!=t?t:{},u='<script type="text/x-handlebars-template">\n\n <div>\n\n'+(null!=(r=n["if"].call(s,null!=(r=null!=t?t.options:t)?r.label:r,{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?r:"")+"\n"+(null!=(r=n["if"].call(s,null!=(r=null!=t?t.options:t)?r.helpers:r,{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a}))?r:"")+"\n ";return o=null!=(o=n.container||(null!=t?t.container:t))?o:n.helperMissing,l={name:"container",hash:{},fn:e.program(8,a,0),inverse:e.noop,data:a},r="function"==typeof o?o.call(s,l):o,n.container||(r=n.blockHelperMissing.call(t,r,l)),null!=r&&(u+=r),u+"\n\n </div>\n\n</script>"},useData:!0}),this.HandlebarsPrecompiled["web-edit"]["control-any"]=Handlebars.template({1:function(e,t,n,i,a){return'readonly="readonly"'},3:function(e,t,n,i,a){var r;return'name="'+e.escapeExpression((r=null!=(r=n.name||(null!=t?t.name:t))?r:n.helperMissing,"function"==typeof r?r.call(null!=t?t:{},{name:"name",hash:{},data:a}):r))+'"'},5:function(e,t,n,i,a){var r,o=e.escapeExpression;return"data-"+o((r=null!=(r=n.key||a&&a.key)?r:n.helperMissing,"function"==typeof r?r.call(null!=t?t:{},{name:"key",hash:{},data:a}):r))+'="'+o(e.lambda(t,t))+'"'},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a){var r,o,l=null!=t?t:{};return'<script type="text/x-handlebars-template">\n\n <input type="text" id="'+e.escapeExpression((o=null!=(o=n.id||(null!=t?t.id:t))?o:n.helperMissing,"function"==typeof o?o.call(l,{name:"id",hash:{},data:a}):o))+'" size="40" '+(null!=(r=n["if"].call(l,null!=(r=null!=t?t.options:t)?r.readonly:r,{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?r:"")+" "+(null!=(r=n["if"].call(l,null!=t?t.name:t,{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a}))?r:"")+" "+(null!=(r=n.each.call(l,null!=(r=null!=t?t.options:t)?r.data:r,{name:"each",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a}))?r:"")+"/>\n\n</script>"},useData:!0}),this.HandlebarsPrecompiled["web-edit"]["control-checkbox"]=Handlebars.template({1:function(e,t,n,i,a,r,o){var l;return"\n"+(null!=(l=n.each.call(null!=t?t:{},null!=t?t.checkboxOptions:t,{name:"each",hash:{},fn:e.program(2,a,0,r,o),inverse:e.noop,data:a}))?l:"")+"\n"},2:function(e,t,n,i,a,r,o){var l,s,u=null!=t?t:{},c=n.helperMissing,d="function",p=e.escapeExpression;return'\n <div>\n\n <label>\n\n <input type="checkbox" data-checkbox-index="'+p((s=null!=(s=n.index||a&&a.index)?s:c,typeof s===d?s.call(u,{name:"index",hash:{},data:a}):s))+'" data-checkbox-value="'+p((s=null!=(s=n.value||(null!=t?t.value:t))?s:c,typeof s===d?s.call(u,{name:"value",hash:{},data:a}):s))+'" '+(null!=(l=n["if"].call(u,null!=(l=null!=o[1]?o[1].options:o[1])?l.readonly:l,{name:"if",hash:{},fn:e.program(3,a,0,r,o),inverse:e.noop,data:a}))?l:"")+" "+(null!=(l=n["if"].call(u,null!=t?t.name:t,{name:"if",hash:{},fn:e.program(5,a,0,r,o),inverse:e.noop,data:a}))?l:"")+" "+(null!=(l=n.each.call(u,null!=(l=null!=o[1]?o[1].options:o[1])?l.data:l,{name:"each",hash:{},fn:e.program(7,a,0,r,o),inverse:e.noop,data:a}))?l:"")+"/>\n "+(null!=(s=null!=(s=n.text||(null!=t?t.text:t))?s:c,l=typeof s===d?s.call(u,{name:"text",hash:{},data:a}):s)?l:"")+"\n\n </label>\n </div>\n\n"},3:function(e,t,n,i,a){return'readonly="readonly"'},5:function(e,t,n,i,a){var r;return'name="'+e.escapeExpression((r=null!=(r=n.name||(null!=t?t.name:t))?r:n.helperMissing,"function"==typeof r?r.call(null!=t?t:{},{name:"name",hash:{},data:a}):r))+'"'},7:function(e,t,n,i,a){var r,o=null!=t?t:{},l=n.helperMissing,s="function",u=e.escapeExpression;return"data-"+u((r=null!=(r=n.key||a&&a.key)?r:l,typeof r===s?r.call(o,{name:"key",hash:{},data:a}):r))+'="'+u((r=null!=(r=n.value||(null!=t?t.value:t))?r:l,typeof r===s?r.call(o,{name:"value",hash:{},data:a}):r))+'"'},9:function(e,t,n,i,a){var r,o=null!=t?t:{};return'\n <div>\n\n <label>\n\n <input type="checkbox" '+(null!=(r=n["if"].call(o,null!=(r=null!=t?t.options:t)?r.readonly:r,{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a}))?r:"")+" "+(null!=(r=n["if"].call(o,null!=t?t.name:t,{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a}))?r:"")+" "+(null!=(r=n.each.call(o,null!=(r=null!=t?t.options:t)?r.data:r,{name:"each",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a}))?r:"")+"/>\n\n "+(null!=(r=e.lambda(null!=(r=null!=t?t.options:t)?r.rightLabel:r,t))?r:"")+"\n </label>\n\n </div>\n\n"},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a,r,o){var l;return'<script type="text/x-handlebars-template">\n\n'+(null!=(l=n["if"].call(null!=t?t:{},null!=(l=null!=t?t.options:t)?l.multiple:l,{name:"if",hash:{},fn:e.program(1,a,0,r,o),inverse:e.program(9,a,0,r,o),data:a}))?l:"")+"\n</script>\n"},useData:!0,useDepths:!0}),this.HandlebarsPrecompiled["web-edit"]["control-ckeditor"]=Handlebars.template({compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a){var r;return'<script type="text/x-handlebars-template">\n\n <textarea id="'+e.escapeExpression((r=null!=(r=n.id||(null!=t?t.id:t))?r:n.helperMissing,"function"==typeof r?r.call(null!=t?t:{},{name:"id",hash:{},data:a}):r))+'" cols="80" rows="10">\n </textarea>\n\n</script>'},useData:!0}),this.HandlebarsPrecompiled["web-edit"]["control-editor"]=Handlebars.template({compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a){var r;return'<script type="text/x-handlebars-template">\n\n <div id="'+e.escapeExpression((r=null!=(r=n.id||(null!=t?t.id:t))?r:n.helperMissing,"function"==typeof r?r.call(null!=t?t:{},{name:"id",hash:{},data:a}):r))+'" class="control-field-editor-el"></div>\n\n</script>'},useData:!0}),this.HandlebarsPrecompiled["web-edit"]["control-file"]=Handlebars.template({1:function(e,t,n,i,a){var r;return'size="'+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.size:r,t))+'"'},3:function(e,t,n,i,a){return'readonly="readonly"'},5:function(e,t,n,i,a){var r;return'name="'+e.escapeExpression((r=null!=(r=n.name||(null!=t?t.name:t))?r:n.helperMissing,"function"==typeof r?r.call(null!=t?t:{},{name:"name",hash:{},data:a}):r))+'"'},7:function(e,t,n,i,a){var r,o=e.escapeExpression;return"data-"+o((r=null!=(r=n.key||a&&a.key)?r:n.helperMissing,"function"==typeof r?r.call(null!=t?t:{},{name:"key",hash:{},data:a}):r))+'="'+o(e.lambda(t,t))+'"'},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a){var r,o,l=null!=t?t:{};return'<script type="text/x-handlebars-template">\n\n <input type="file" id="'+e.escapeExpression((o=null!=(o=n.id||(null!=t?t.id:t))?o:n.helperMissing,"function"==typeof o?o.call(l,{name:"id",hash:{},data:a}):o))+'" '+(null!=(r=n["if"].call(l,null!=(r=null!=t?t.options:t)?r.size:r,{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?r:"")+" "+(null!=(r=n["if"].call(l,null!=(r=null!=t?t.options:t)?r.readonly:r,{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a}))?r:"")+" "+(null!=(r=n["if"].call(l,null!=t?t.name:t,{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a}))?r:"")+" "+(null!=(r=n.each.call(l,null!=(r=null!=t?t.options:t)?r.data:r,{name:"each",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a}))?r:"")+"/>\n</script>"},useData:!0}),this.HandlebarsPrecompiled["web-edit"]["control-hidden"]=Handlebars.template({1:function(e,t,n,i,a){var r;return'name="'+e.escapeExpression((r=null!=(r=n.name||(null!=t?t.name:t))?r:n.helperMissing,"function"==typeof r?r.call(null!=t?t:{},{name:"name",hash:{},data:a}):r))+'"'},3:function(e,t,n,i,a){var r,o=e.escapeExpression;return"data-"+o((r=null!=(r=n.key||a&&a.key)?r:n.helperMissing,"function"==typeof r?r.call(null!=t?t:{},{name:"key",hash:{},data:a}):r))+'="'+o(e.lambda(t,t))+'"'},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a){var r,o,l=null!=t?t:{};return'<script type="text/x-handlebars-template">\n\n <input type="hidden" id="'+e.escapeExpression((o=null!=(o=n.id||(null!=t?t.id:t))?o:n.helperMissing,"function"==typeof o?o.call(l,{name:"id",hash:{},data:a}):o))+'" '+(null!=(r=n["if"].call(l,null!=t?t.name:t,{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?r:"")+" "+(null!=(r=n.each.call(l,null!=(r=null!=t?t.options:t)?r.data:r,{name:"each",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a}))?r:"")+"/>\n\n</script>"},useData:!0}),this.HandlebarsPrecompiled["web-edit"]["control-image"]=Handlebars.template({1:function(e,t,n,i,a){var r;return'placeholder="'+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.placeholder:r,t))+'"'},3:function(e,t,n,i,a){var r;return'size="'+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.size:r,t))+'"'},5:function(e,t,n,i,a){return'readonly="readonly"'},7:function(e,t,n,i,a){var r;return'name="'+e.escapeExpression((r=null!=(r=n.name||(null!=t?t.name:t))?r:n.helperMissing,"function"==typeof r?r.call(null!=t?t:{},{name:"name",hash:{},data:a}):r))+'"'},9:function(e,t,n,i,a){var r,o=e.escapeExpression;return"data-"+o((r=null!=(r=n.key||a&&a.key)?r:n.helperMissing,"function"==typeof r?r.call(null!=t?t:{},{name:"key",hash:{},data:a}):r))+'="'+o(e.lambda(t,t))+'"'},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a){var r,o,l=null!=t?t:{},s=n.helperMissing,u="function",c=e.escapeExpression;return'<script type="text/x-handlebars-template">\n\n <input type="text" id="'+c((o=null!=(o=n.id||(null!=t?t.id:t))?o:s,typeof o===u?o.call(l,{name:"id",hash:{},data:a}):o))+'" '+(null!=(r=n["if"].call(l,null!=(r=null!=t?t.options:t)?r.placeholder:r,{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?r:"")+" "+(null!=(r=n["if"].call(l,null!=(r=null!=t?t.options:t)?r.size:r,{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a}))?r:"")+" "+(null!=(r=n["if"].call(l,null!=(r=null!=t?t.options:t)?r.readonly:r,{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a}))?r:"")+" "+(null!=(r=n["if"].call(l,null!=t?t.name:t,{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a}))?r:"")+" "+(null!=(r=n.each.call(l,null!=(r=null!=t?t.options:t)?r.data:r,{name:"each",hash:{},fn:e.program(9,a,0),inverse:e.noop,data:a}))?r:"")+'/>\n\n <div class="alpaca-image-display">\n <h5>Preview</h5>\n <img id="'+c((o=null!=(o=n.id||(null!=t?t.id:t))?o:s,typeof o===u?o.call(l,{name:"id",hash:{},data:a}):o))+'-image" src="'+c((o=null!=(o=n.data||(null!=t?t.data:t))?o:s,typeof o===u?o.call(l,{name:"data",hash:{},data:a}):o))+'">\n </div>\n\n</script>'},useData:!0}),this.HandlebarsPrecompiled["web-edit"]["control-optiontree"]=Handlebars.template({1:function(e,t,n,i,a){var r;return'placeholder="'+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.placeholder:r,t))+'"'},3:function(e,t,n,i,a){var r;return'size="'+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.size:r,t))+'"'},5:function(e,t,n,i,a){return'readonly="readonly"'},7:function(e,t,n,i,a){var r;return'name="'+e.escapeExpression((r=null!=(r=n.name||(null!=t?t.name:t))?r:n.helperMissing,"function"==typeof r?r.call(null!=t?t:{},{name:"name",hash:{},data:a}):r))+'"'},9:function(e,t,n,i,a){var r,o=e.escapeExpression;return"data-"+o((r=null!=(r=n.key||a&&a.key)?r:n.helperMissing,"function"==typeof r?r.call(null!=t?t:{},{name:"key",hash:{},data:a}):r))+'="'+o(e.lambda(t,t))+'"'},11:function(e,t,n,i,a){var r,o=e.escapeExpression;return o((r=null!=(r=n.key||a&&a.key)?r:n.helperMissing,"function"==typeof r?r.call(null!=t?t:{},{name:"key",hash:{},data:a}):r))+'="'+o(e.lambda(t,t))+'"'},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a){var r,o,l=null!=t?t:{},s=n.helperMissing,u="function",c=e.escapeExpression;return'<script type="text/x-handlebars-template">\n\n <div class="optiontree"></div>\n\n <input type="'+c((o=null!=(o=n.inputType||(null!=t?t.inputType:t))?o:s,typeof o===u?o.call(l,{name:"inputType",hash:{},data:a}):o))+'" id="'+c((o=null!=(o=n.id||(null!=t?t.id:t))?o:s,typeof o===u?o.call(l,{name:"id",hash:{},data:a}):o))+'" '+(null!=(r=n["if"].call(l,null!=(r=null!=t?t.options:t)?r.placeholder:r,{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?r:"")+" "+(null!=(r=n["if"].call(l,null!=(r=null!=t?t.options:t)?r.size:r,{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a}))?r:"")+" "+(null!=(r=n["if"].call(l,null!=(r=null!=t?t.options:t)?r.readonly:r,{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a}))?r:"")+" "+(null!=(r=n["if"].call(l,null!=t?t.name:t,{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a}))?r:"")+" "+(null!=(r=n.each.call(l,null!=(r=null!=t?t.options:t)?r.data:r,{name:"each",hash:{},fn:e.program(9,a,0),inverse:e.noop,data:a}))?r:"")+" "+(null!=(r=n.each.call(l,null!=(r=null!=t?t.options:t)?r.attributes:r,{name:"each",hash:{},fn:e.program(11,a,0),inverse:e.noop,data:a}))?r:"")+"/>\n\n</script>"},useData:!0}),this.HandlebarsPrecompiled["web-edit"]["control-password"]=Handlebars.template({1:function(e,t,n,i,a){var r;return'placeholder="'+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.placeholder:r,t))+'"'},3:function(e,t,n,i,a){var r;return'size="'+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.size:r,t))+'"'},5:function(e,t,n,i,a){return'readonly="readonly"'},7:function(e,t,n,i,a){var r;return'name="'+e.escapeExpression((r=null!=(r=n.name||(null!=t?t.name:t))?r:n.helperMissing,"function"==typeof r?r.call(null!=t?t:{},{name:"name",hash:{},data:a}):r))+'"'},9:function(e,t,n,i,a){var r,o=e.escapeExpression;return"data-"+o((r=null!=(r=n.key||a&&a.key)?r:n.helperMissing,"function"==typeof r?r.call(null!=t?t:{},{name:"key",hash:{},data:a}):r))+'="'+o(e.lambda(t,t))+'"'},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a){var r,o,l=null!=t?t:{};return'<script type="text/x-handlebars-template">\n\n <input type="password" id="'+e.escapeExpression((o=null!=(o=n.id||(null!=t?t.id:t))?o:n.helperMissing,"function"==typeof o?o.call(l,{name:"id",hash:{},data:a}):o))+'" '+(null!=(r=n["if"].call(l,null!=(r=null!=t?t.options:t)?r.placeholder:r,{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?r:"")+" "+(null!=(r=n["if"].call(l,null!=(r=null!=t?t.options:t)?r.size:r,{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a}))?r:"")+" "+(null!=(r=n["if"].call(l,null!=(r=null!=t?t.options:t)?r.readonly:r,{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a}))?r:"")+" "+(null!=(r=n["if"].call(l,null!=t?t.name:t,{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a}))?r:"")+" "+(null!=(r=n.each.call(l,null!=(r=null!=t?t.options:t)?r.data:r,{name:"each",hash:{},fn:e.program(9,a,0),inverse:e.noop,data:a}))?r:"")+"/>\n\n</script>"},useData:!0}),this.HandlebarsPrecompiled["web-edit"]["control-radio"]=Handlebars.template({1:function(e,t,n,i,a){return""},3:function(e,t,n,i,a){var r,o,l=null!=t?t:{};return' <div class="radio">\n <label>\n <input type="radio" '+(null!=(r=n["if"].call(l,null!=(r=null!=t?t.options:t)?r.readonly:r,{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a}))?r:"")+' name="'+e.escapeExpression((o=null!=(o=n.name||(null!=t?t.name:t))?o:n.helperMissing,"function"==typeof o?o.call(l,{name:"name",hash:{},data:a}):o))+'" value=""/>'+(null!=(r=e.lambda(null!=(r=null!=t?t.options:t)?r.noneLabel:r,t))?r:"")+"\n </label>\n </div>\n"},4:function(e,t,n,i,a){return'readonly="readonly"'},6:function(e,t,n,i,a,r,o){var l,s,u=null!=t?t:{},c=e.escapeExpression,d=n.helperMissing,p="function";return' <div class="radio">\n <label>\n <input type="radio" '+(null!=(l=n["if"].call(u,null!=(l=null!=o[1]?o[1].options:o[1])?l.readonly:l,{name:"if",hash:{},fn:e.program(4,a,0,r,o),inverse:e.noop,data:a}))?l:"")+' name="'+c(e.lambda(null!=o[1]?o[1].name:o[1],t))+'" value="'+c((s=null!=(s=n.value||(null!=t?t.value:t))?s:d,typeof s===p?s.call(u,{name:"value",hash:{},data:a}):s))+'" '+(null!=(l=(n.compare||t&&t.compare||d).call(u,null!=t?t.value:t,null!=o[1]?o[1].data:o[1],{name:"compare",hash:{},fn:e.program(7,a,0,r,o),inverse:e.noop,data:a}))?l:"")+"/>"+(null!=(s=null!=(s=n.text||(null!=t?t.text:t))?s:d,l=typeof s===p?s.call(u,{name:"text",hash:{},data:a}):s)?l:"")+"\n </label>\n </div>\n"},7:function(e,t,n,i,a){return'checked="checked"'},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a,r,o){var l,s=null!=t?t:{};return'<script type="text/x-handlebars-template">\n\n'+(null!=(l=n["if"].call(s,null!=(l=null!=t?t.options:t)?l.hideNone:l,{name:"if",hash:{},fn:e.program(1,a,0,r,o),inverse:e.program(3,a,0,r,o),data:a}))?l:"")+"\n"+(null!=(l=n.each.call(s,null!=t?t.selectOptions:t,{name:"each",hash:{},fn:e.program(6,a,0,r,o),inverse:e.noop,data:a}))?l:"")+"\n</script>"},useData:!0,useDepths:!0}),this.HandlebarsPrecompiled["web-edit"]["control-select"]=Handlebars.template({1:function(e,t,n,i,a){return'readonly="readonly"'},3:function(e,t,n,i,a){return'multiple="multiple"'},5:function(e,t,n,i,a){var r;return'size="'+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.size:r,t))+'"'},7:function(e,t,n,i,a){var r;return'name="'+e.escapeExpression((r=null!=(r=n.name||(null!=t?t.name:t))?r:n.helperMissing,"function"==typeof r?r.call(null!=t?t:{},{name:"name",hash:{},data:a}):r))+'"'},9:function(e,t,n,i,a,r,o){var l,s=null!=t?t:{};return"\n"+(null!=(l=n["if"].call(s,null!=(l=null!=t?t.options:t)?l.hideNone:l,{name:"if",hash:{},fn:e.program(10,a,0,r,o),inverse:e.program(12,a,0,r,o),data:a}))?l:"")+"\n"+(null!=(l=n.each.call(s,null!=t?t.selectOptions:t,{name:"each",hash:{},fn:e.program(14,a,0,r,o),inverse:e.noop,data:a}))?l:"")+"\n"},10:function(e,t,n,i,a){return""},12:function(e,t,n,i,a){var r;return' <option value="">'+(null!=(r=e.lambda(null!=(r=null!=t?t.options:t)?r.noneLabel:r,t))?r:"")+"</option>\n"},14:function(e,t,n,i,a,r,o){var l,s,u=null!=t?t:{},c=n.helperMissing,d="function";return' <option value="'+(null!=(s=null!=(s=n.value||(null!=t?t.value:t))?s:c,l=typeof s===d?s.call(u,{name:"value",hash:{},data:a}):s)?l:"")+'" '+(null!=(l=n.each.call(u,null!=o[1]?o[1].data:o[1],{name:"each",hash:{},fn:e.program(15,a,0,r,o),inverse:e.noop,data:a}))?l:"")+">"+e.escapeExpression((s=null!=(s=n.text||(null!=t?t.text:t))?s:c,typeof s===d?s.call(u,{name:"text",hash:{},data:a}):s))+"</option>\n"},15:function(e,t,n,i,a,r,o){var l;return null!=(l=(n.compare||t&&t.compare||n.helperMissing).call(null!=t?t:{},null!=t?t.value:t,null!=o[2]?o[2].value:o[2],{name:"compare",hash:{},fn:e.program(16,a,0,r,o),inverse:e.noop,data:a}))?l:""},16:function(e,t,n,i,a){return'selected="selected"'},18:function(e,t,n,i,a,r,o){var l,s=null!=t?t:{};return"\n"+(null!=(l=n["if"].call(s,null!=(l=null!=t?t.options:t)?l.hideNone:l,{name:"if",hash:{},fn:e.program(10,a,0,r,o),inverse:e.program(12,a,0,r,o),data:a}))?l:"")+"\n"+(null!=(l=n.each.call(s,null!=t?t.selectOptions:t,{name:"each",hash:{},fn:e.program(19,a,0,r,o),inverse:e.noop,data:a}))?l:"")+"\n"},19:function(e,t,n,i,a,r,o){var l,s,u=null!=t?t:{},c=n.helperMissing,d="function";return' <option value="'+(null!=(s=null!=(s=n.value||(null!=t?t.value:t))?s:c,l=typeof s===d?s.call(u,{name:"value",hash:{},data:a}):s)?l:"")+'" '+(null!=(l=(n.compare||t&&t.compare||c).call(u,null!=t?t.value:t,null!=o[1]?o[1].data:o[1],{name:"compare",hash:{},fn:e.program(16,a,0,r,o),inverse:e.noop,data:a}))?l:"")+">"+e.escapeExpression((s=null!=(s=n.text||(null!=t?t.text:t))?s:c,typeof s===d?s.call(u,{name:"text",hash:{},data:a}):s))+"</option>\n"},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a,r,o){var l,s,u=null!=t?t:{};return'<script type="text/x-handlebars-template">\n\n <select id="'+e.escapeExpression((s=null!=(s=n.id||(null!=t?t.id:t))?s:n.helperMissing,"function"==typeof s?s.call(u,{name:"id",hash:{},data:a}):s))+'" '+(null!=(l=n["if"].call(u,null!=(l=null!=t?t.options:t)?l.readonly:l,{name:"if",hash:{},fn:e.program(1,a,0,r,o),inverse:e.noop,data:a}))?l:"")+" "+(null!=(l=n["if"].call(u,null!=(l=null!=t?t.options:t)?l.multiple:l,{name:"if",hash:{},fn:e.program(3,a,0,r,o),inverse:e.noop,data:a}))?l:"")+" "+(null!=(l=n["if"].call(u,null!=(l=null!=t?t.options:t)?l.size:l,{name:"if",hash:{},fn:e.program(5,a,0,r,o),inverse:e.noop,data:a}))?l:"")+" "+(null!=(l=n["if"].call(u,null!=t?t.name:t,{name:"if",hash:{},fn:e.program(7,a,0,r,o),inverse:e.noop,data:a}))?l:"")+">\n\n"+(null!=(l=n["if"].call(u,null!=(l=null!=t?t.options:t)?l.multiple:l,{name:"if",hash:{},fn:e.program(9,a,0,r,o),inverse:e.program(18,a,0,r,o),data:a}))?l:"")+"\n </select>\n\n</script>"},useData:!0,useDepths:!0}),this.HandlebarsPrecompiled["web-edit"]["control-text"]=Handlebars.template({1:function(e,t,n,i,a){var r;return'placeholder="'+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.placeholder:r,t))+'"'},3:function(e,t,n,i,a){var r;return'size="'+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.size:r,t))+'"'},5:function(e,t,n,i,a){return'readonly="readonly"'},7:function(e,t,n,i,a){var r;return'name="'+e.escapeExpression((r=null!=(r=n.name||(null!=t?t.name:t))?r:n.helperMissing,"function"==typeof r?r.call(null!=t?t:{},{name:"name",hash:{},data:a}):r))+'"'},9:function(e,t,n,i,a){var r,o=e.escapeExpression;return"data-"+o((r=null!=(r=n.key||a&&a.key)?r:n.helperMissing,"function"==typeof r?r.call(null!=t?t:{},{name:"key",hash:{},data:a}):r))+'="'+o(e.lambda(t,t))+'"'},11:function(e,t,n,i,a){var r,o=e.escapeExpression;return o((r=null!=(r=n.key||a&&a.key)?r:n.helperMissing,"function"==typeof r?r.call(null!=t?t:{},{name:"key",hash:{},data:a}):r))+'="'+o(e.lambda(t,t))+'"'},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a){var r,o,l=null!=t?t:{},s=n.helperMissing,u="function",c=e.escapeExpression;return'<script type="text/x-handlebars-template">\n\n <input type="'+c((o=null!=(o=n.inputType||(null!=t?t.inputType:t))?o:s,typeof o===u?o.call(l,{name:"inputType",hash:{},data:a}):o))+'" id="'+c((o=null!=(o=n.id||(null!=t?t.id:t))?o:s,typeof o===u?o.call(l,{name:"id",hash:{},data:a}):o))+'" '+(null!=(r=n["if"].call(l,null!=(r=null!=t?t.options:t)?r.placeholder:r,{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?r:"")+" "+(null!=(r=n["if"].call(l,null!=(r=null!=t?t.options:t)?r.size:r,{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a}))?r:"")+" "+(null!=(r=n["if"].call(l,null!=(r=null!=t?t.options:t)?r.readonly:r,{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a}))?r:"")+" "+(null!=(r=n["if"].call(l,null!=t?t.name:t,{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a}))?r:"")+" "+(null!=(r=n.each.call(l,null!=(r=null!=t?t.options:t)?r.data:r,{name:"each",hash:{},fn:e.program(9,a,0),inverse:e.noop,data:a}))?r:"")+" "+(null!=(r=n.each.call(l,null!=(r=null!=t?t.options:t)?r.attributes:r,{name:"each",hash:{},fn:e.program(11,a,0),inverse:e.noop,data:a}))?r:"")+"/>\n\n</script>"},useData:!0}),this.HandlebarsPrecompiled["web-edit"]["control-textarea"]=Handlebars.template({1:function(e,t,n,i,a){var r;return'placeholder="'+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.placeholder:r,t))+'"'},3:function(e,t,n,i,a){var r;return'rows="'+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.rows:r,t))+'"'},5:function(e,t,n,i,a){var r;return'cols="'+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.cols:r,t))+'"'},7:function(e,t,n,i,a){return'readonly="readonly"'},9:function(e,t,n,i,a){var r;return'name="'+e.escapeExpression((r=null!=(r=n.name||(null!=t?t.name:t))?r:n.helperMissing,"function"==typeof r?r.call(null!=t?t:{},{name:"name",hash:{},data:a}):r))+'"'},11:function(e,t,n,i,a){var r,o,l=null!=t?t:{},s=n.helperMissing,u="function";return"data-"+e.escapeExpression((o=null!=(o=n.fieldId||(null!=t?t.fieldId:t))?o:s,typeof o===u?o.call(l,{name:"fieldId",hash:{},data:a}):o))+'="'+(null!=(o=null!=(o=n.value||(null!=t?t.value:t))?o:s,r=typeof o===u?o.call(l,{name:"value",hash:{},data:a}):o)?r:"")+'"'},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a){var r,o,l=null!=t?t:{};return'<script type="text/x-handlebars-template">\n\n <textarea id="'+e.escapeExpression((o=null!=(o=n.id||(null!=t?t.id:t))?o:n.helperMissing,"function"==typeof o?o.call(l,{name:"id",hash:{},data:a}):o))+'" '+(null!=(r=n["if"].call(l,null!=(r=null!=t?t.options:t)?r.placeholder:r,{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?r:"")+" "+(null!=(r=n["if"].call(l,null!=(r=null!=t?t.options:t)?r.rows:r,{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a}))?r:"")+" "+(null!=(r=n["if"].call(l,null!=(r=null!=t?t.options:t)?r.cols:r,{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a}))?r:"")+" "+(null!=(r=n["if"].call(l,null!=(r=null!=t?t.options:t)?r.readonly:r,{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a}))?r:"")+" "+(null!=(r=n["if"].call(l,null!=t?t.name:t,{name:"if",hash:{},fn:e.program(9,a,0),inverse:e.noop,data:a}))?r:"")+" "+(null!=(r=n.each.call(l,null!=(r=null!=t?t.options:t)?r.data:r,{name:"each",hash:{},fn:e.program(11,a,0),inverse:e.noop,data:a}))?r:"")+"/>\n\n</script>"},useData:!0}),this.HandlebarsPrecompiled["web-edit"]["control-url"]=Handlebars.template({1:function(e,t,n,i,a){var r;return'placeholder="'+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.placeholder:r,t))+'"'},3:function(e,t,n,i,a){var r;return'size="'+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.size:r,t))+'"'},5:function(e,t,n,i,a){return'readonly="readonly"'},7:function(e,t,n,i,a){var r;return'name="'+e.escapeExpression((r=null!=(r=n.name||(null!=t?t.name:t))?r:n.helperMissing,"function"==typeof r?r.call(null!=t?t:{},{name:"name",hash:{},data:a}):r))+'"'},9:function(e,t,n,i,a){var r,o=e.escapeExpression;return"data-"+o((r=null!=(r=n.key||a&&a.key)?r:n.helperMissing,"function"==typeof r?r.call(null!=t?t:{},{name:"key",hash:{},data:a}):r))+'="'+o(e.lambda(t,t))+'"'},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a){var r,o,l=null!=t?t:{};return'<script type="text/x-handlebars-template">\n\n <input type="text" id="'+e.escapeExpression((o=null!=(o=n.id||(null!=t?t.id:t))?o:n.helperMissing,"function"==typeof o?o.call(l,{name:"id",hash:{},data:a}):o))+'" '+(null!=(r=n["if"].call(l,null!=(r=null!=t?t.options:t)?r.placeholder:r,{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?r:"")+" "+(null!=(r=n["if"].call(l,null!=(r=null!=t?t.options:t)?r.size:r,{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a}))?r:"")+" "+(null!=(r=n["if"].call(l,null!=(r=null!=t?t.options:t)?r.readonly:r,{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a}))?r:"")+" "+(null!=(r=n["if"].call(l,null!=t?t.name:t,{name:"if",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a}))?r:"")+" "+(null!=(r=n.each.call(l,null!=(r=null!=t?t.options:t)?r.data:r,{name:"each",hash:{},fn:e.program(9,a,0),inverse:e.noop,data:a}))?r:"")+"/>\n\n</script>"},useData:!0}),this.HandlebarsPrecompiled["web-edit"].control=Handlebars.template({1:function(e,t,n,i,a){var r,o,l=null!=t?t:{};return' <label class="'+(null!=(r=n["if"].call(l,null!=(r=null!=t?t.options:t)?r.labelClass:r,{name:"if",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a}))?r:"")+' alpaca-control-label" for="'+e.escapeExpression((o=null!=(o=n.id||(null!=t?t.id:t))?o:n.helperMissing,"function"==typeof o?o.call(l,{name:"id",hash:{},data:a}):o))+'">'+(null!=(r=e.lambda(null!=(r=null!=t?t.options:t)?r.label:r,t))?r:"")+"</label>\n"},2:function(e,t,n,i,a){var r;return e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.labelClass:r,t))},4:function(e,t,n,i,a){return""},6:function(e,t,n,i,a){var r;return null!=(r=n.each.call(null!=t?t:{},null!=(r=null!=t?t.options:t)?r.helpers:r,{name:"each",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a}))?r:""},7:function(e,t,n,i,a){var r;return' <p class="'+(null!=(r=n["if"].call(null!=t?t:{},null!=(r=null!=t?t.options:t)?r.helperClass:r,{name:"if",hash:{},fn:e.program(8,a,0),inverse:e.noop,data:a}))?r:"")+'">\n <i class="info-sign"></i>\n '+(null!=(r=e.lambda(t,t))?r:"")+"\n </p>\n"},8:function(e,t,n,i,a){var r;return e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.helperClass:r,t))},10:function(e,t,n,i,a){var r;return null!=(r=n["if"].call(null!=t?t:{},null!=(r=null!=t?t.options:t)?r.buttons:r,{name:"if",hash:{},fn:e.program(11,a,0),inverse:e.noop,data:a}))?r:""},11:function(e,t,n,i,a){
var r;return' <div class="alpaca-control-buttons-container">\n'+(null!=(r=n.each.call(null!=t?t:{},null!=(r=null!=t?t.options:t)?r.buttons:r,{name:"each",hash:{},fn:e.program(12,a,0),inverse:e.noop,data:a}))?r:"")+" </div>\n"},12:function(e,t,n,i,a){var r,o,l=null!=t?t:{},s=n.helperMissing,u="function",c=e.escapeExpression;return' <button data-key="'+c((o=null!=(o=n.key||a&&a.key)?o:s,typeof o===u?o.call(l,{name:"key",hash:{},data:a}):o))+'" type="'+c((o=null!=(o=n.type||(null!=t?t.type:t))?o:s,typeof o===u?o.call(l,{name:"type",hash:{},data:a}):o))+'" class="alpaca-control-button alpaca-control-button-'+c((o=null!=(o=n.key||a&&a.key)?o:s,typeof o===u?o.call(l,{name:"key",hash:{},data:a}):o))+" "+c((o=null!=(o=n.styles||(null!=t?t.styles:t))?o:s,typeof o===u?o.call(l,{name:"styles",hash:{},data:a}):o))+'" '+(null!=(r=n.each.call(l,null!=t?t.value:t,{name:"each",hash:{},fn:e.program(13,a,0),inverse:e.noop,data:a}))?r:"")+">"+(null!=(o=null!=(o=n.value||(null!=t?t.value:t))?o:s,r=typeof o===u?o.call(l,{name:"value",hash:{},data:a}):o)?r:"")+"</button>\n"},13:function(e,t,n,i,a){var r,o=null!=t?t:{},l=n.helperMissing,s="function",u=e.escapeExpression;return u((r=null!=(r=n.key||a&&a.key)?r:l,typeof r===s?r.call(o,{name:"key",hash:{},data:a}):r))+'="'+u((r=null!=(r=n.value||(null!=t?t.value:t))?r:l,typeof r===s?r.call(o,{name:"value",hash:{},data:a}):r))+'" '},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a){var r,o,l,s=null!=t?t:{},u='<script type="text/x-handlebars-template">\n\n <div>\n\n'+(null!=(r=n["if"].call(s,null!=(r=null!=t?t.options:t)?r.label:r,{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?r:"")+"\n ";return o=null!=(o=n.control||(null!=t?t.control:t))?o:n.helperMissing,l={name:"control",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a},r="function"==typeof o?o.call(s,l):o,n.control||(r=n.blockHelperMissing.call(t,r,l)),null!=r&&(u+=r),u+"\n\n"+(null!=(r=n["if"].call(s,null!=(r=null!=t?t.options:t)?r.helpers:r,{name:"if",hash:{},fn:e.program(6,a,0),inverse:e.noop,data:a}))?r:"")+"\n"+(null!=(r=n["if"].call(s,null!=(r=null!=t?t.options:t)?r.renderButtons:r,{name:"if",hash:{},fn:e.program(10,a,0),inverse:e.noop,data:a}))?r:"")+"\n </div>\n\n</script>"},useData:!0}),this.HandlebarsPrecompiled["web-edit"].form=Handlebars.template({1:function(e,t,n,i,a){return""},3:function(e,t,n,i,a){var r;return null!=(r=n.each.call(null!=t?t:{},null!=(r=null!=t?t.options:t)?r.buttons:r,{name:"each",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a}))?r:""},4:function(e,t,n,i,a){var r,o,l=null!=t?t:{},s=n.helperMissing,u="function",c=e.escapeExpression;return' <button data-key="'+c((o=null!=(o=n.key||a&&a.key)?o:s,typeof o===u?o.call(l,{name:"key",hash:{},data:a}):o))+'" type="'+c((o=null!=(o=n.type||(null!=t?t.type:t))?o:s,typeof o===u?o.call(l,{name:"type",hash:{},data:a}):o))+'" '+(null!=(r=n["if"].call(l,null!=t?t.id:t,{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a}))?r:"")+' class="alpaca-form-button alpaca-form-button-'+c((o=null!=(o=n.key||a&&a.key)?o:s,typeof o===u?o.call(l,{name:"key",hash:{},data:a}):o))+" "+c((o=null!=(o=n.styles||(null!=t?t.styles:t))?o:s,typeof o===u?o.call(l,{name:"styles",hash:{},data:a}):o))+'" '+(null!=(r=n.each.call(l,null!=t?t.value:t,{name:"each",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a}))?r:"")+" "+(null!=(r=n.each.call(l,null!=t?t.attributes:t,{name:"each",hash:{},fn:e.program(9,a,0),inverse:e.noop,data:a}))?r:"")+">"+(null!=(o=null!=(o=n.value||(null!=t?t.value:t))?o:s,r=typeof o===u?o.call(l,{name:"value",hash:{},data:a}):o)?r:"")+"</button>\n"},5:function(e,t,n,i,a){var r;return'id="'+e.escapeExpression((r=null!=(r=n.id||(null!=t?t.id:t))?r:n.helperMissing,"function"==typeof r?r.call(null!=t?t:{},{name:"id",hash:{},data:a}):r))+'"'},7:function(e,t,n,i,a){var r,o=e.escapeExpression;return o((r=null!=(r=n.key||a&&a.key)?r:n.helperMissing,"function"==typeof r?r.call(null!=t?t:{},{name:"key",hash:{},data:a}):r))+'="'+o(e.lambda(t,t))+'"'},9:function(e,t,n,i,a){var r,o=e.escapeExpression;return" "+o((r=null!=(r=n.key||a&&a.key)?r:n.helperMissing,"function"==typeof r?r.call(null!=t?t:{},{name:"key",hash:{},data:a}):r))+'="'+o(e.lambda(t,t))+'"'},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a){var r,o,l,s=null!=t?t:{},u='<script type="text/x-handlebars-template">\n\n <form role="form">\n\n ';return o=null!=(o=n.formItems||(null!=t?t.formItems:t))?o:n.helperMissing,l={name:"formItems",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a},r="function"==typeof o?o.call(s,l):o,n.formItems||(r=n.blockHelperMissing.call(t,r,l)),null!=r&&(u+=r),u+'\n\n <div class="alpaca-form-buttons-container">\n'+(null!=(r=n["if"].call(s,null!=(r=null!=t?t.options:t)?r.buttons:r,{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a}))?r:"")+" </div>\n\n </form>\n\n</script>"},useData:!0}),this.HandlebarsPrecompiled["web-edit"].message=Handlebars.template({compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a){var r,o,l=null!=t?t:{},s=n.helperMissing,u="function";return'<script type="text/x-handlebars-template">\n\n <div class="alpaca-message alpaca-message-'+(null!=(o=null!=(o=n.id||(null!=t?t.id:t))?o:s,r=typeof o===u?o.call(l,{name:"id",hash:{},data:a}):o)?r:"")+'">\n '+(null!=(o=null!=(o=n.message||(null!=t?t.message:t))?o:s,r=typeof o===u?o.call(l,{name:"message",hash:{},data:a}):o)?r:"")+"\n </div>\n\n</script>"},useData:!0}),this.HandlebarsPrecompiled["web-edit"].wizard=Handlebars.template({1:function(e,t,n,i,a){var r;return' <div class="alpaca-wizard-nav">\n <nav class="navbar navbar-default" role="navigation">\n <div class="container-fluid alpaca-wizard-back">\n <ul class="nav navbar-nav">\n'+(null!=(r=n.each.call(null!=t?t:{},null!=t?t.steps:t,{name:"each",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a}))?r:"")+" </ul>\n </div>\n </nav>\n </div>\n"},2:function(e,t,n,i,a){var r,o,l=null!=t?t:{},s=n.helperMissing,u="function";return' <li data-alpaca-wizard-step-index="'+e.escapeExpression((o=null!=(o=n.index||a&&a.index)?o:s,typeof o===u?o.call(l,{name:"index",hash:{},data:a}):o))+'">\n <div class="holder">\n <div class="title">'+(null!=(o=null!=(o=n.title||(null!=t?t.title:t))?o:s,r=typeof o===u?o.call(l,{name:"title",hash:{},data:a}):o)?r:"")+'</div>\n <div class="description">'+(null!=(o=null!=(o=n.description||(null!=t?t.description:t))?o:s,r=typeof o===u?o.call(l,{name:"description",hash:{},data:a}):o)?r:"")+'</div>\n </div>\n <div class="chevron"></div>\n </li>\n'},4:function(e,t,n,i,a){return' <div class="alpaca-wizard-progress-bar">\n <div class="progress">\n <div class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 60%;">\n </div>\n </div>\n </div>\n'},6:function(e,t,n,i,a){var r,o;return" <h3>"+(null!=(o=null!=(o=n.wizardTitle||(null!=t?t.wizardTitle:t))?o:n.helperMissing,r="function"==typeof o?o.call(null!=t?t:{},{name:"wizardTitle",hash:{},data:a}):o)?r:"")+"</h3>\n"},8:function(e,t,n,i,a){var r,o;return" <h4>"+(null!=(o=null!=(o=n.wizardDescription||(null!=t?t.wizardDescription:t))?o:n.helperMissing,r="function"==typeof o?o.call(null!=t?t:{},{name:"wizardDescription",hash:{},data:a}):o)?r:"")+"</h4>\n"},10:function(e,t,n,i,a,r,o){var l;return null!=(l=(n.compare||t&&t.compare||n.helperMissing).call(null!=t?t:{},null!=t?t.align:t,"left",{name:"compare",hash:{},fn:e.program(11,a,0,r,o),inverse:e.noop,data:a}))?l:""},11:function(e,t,n,i,a,r,o){var l,s,u=null!=t?t:{},c=n.helperMissing,d="function",p=e.escapeExpression;return' <button type="'+p((s=null!=(s=n.type||(null!=t?t.type:t))?s:c,typeof s===d?s.call(u,{name:"type",hash:{},data:a}):s))+'" '+(null!=(l=n["if"].call(u,null!=t?t.id:t,{name:"if",hash:{},fn:e.program(12,a,0,r,o),inverse:e.noop,data:a}))?l:"")+' class="'+p(e.lambda(null!=(l=null!=(l=null!=o[1]?o[1].view:o[1])?l.styles:l)?l.button:l,t))+'" data-alpaca-wizard-button-key="'+p((s=null!=(s=n.key||a&&a.key)?s:c,typeof s===d?s.call(u,{name:"key",hash:{},data:a}):s))+'" '+(null!=(l=n.each.call(u,null!=t?t.attributes:t,{name:"each",hash:{},fn:e.program(14,a,0,r,o),inverse:e.noop,data:a}))?l:"")+">"+(null!=(s=null!=(s=n.title||(null!=t?t.title:t))?s:c,l=typeof s===d?s.call(u,{name:"title",hash:{},data:a}):s)?l:"")+"</button>\n"},12:function(e,t,n,i,a){var r;return'id="'+e.escapeExpression((r=null!=(r=n.id||(null!=t?t.id:t))?r:n.helperMissing,"function"==typeof r?r.call(null!=t?t:{},{name:"id",hash:{},data:a}):r))+'"'},14:function(e,t,n,i,a){var r,o=e.escapeExpression;return" "+o((r=null!=(r=n.key||a&&a.key)?r:n.helperMissing,"function"==typeof r?r.call(null!=t?t:{},{name:"key",hash:{},data:a}):r))+'="'+o(e.lambda(t,t))+'"'},16:function(e,t,n,i,a,r,o){var l;return null!=(l=(n.compare||t&&t.compare||n.helperMissing).call(null!=t?t:{},null!=t?t.align:t,"right",{name:"compare",hash:{},fn:e.program(11,a,0,r,o),inverse:e.noop,data:a}))?l:""},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a,r,o){var l,s=null!=t?t:{};return'<script type="text/x-handlebars-template">\n\n <div class="alpaca-wizard">\n\n <!-- nav bar -->\n'+(null!=(l=n["if"].call(s,null!=t?t.showSteps:t,{name:"if",hash:{},fn:e.program(1,a,0,r,o),inverse:e.noop,data:a}))?l:"")+"\n <!-- wizard progress bar -->\n"+(null!=(l=n["if"].call(s,null!=t?t.showProgressBar:t,{name:"if",hash:{},fn:e.program(4,a,0,r,o),inverse:e.noop,data:a}))?l:"")+"\n"+(null!=(l=n["if"].call(s,null!=t?t.wizardTitle:t,{name:"if",hash:{},fn:e.program(6,a,0,r,o),inverse:e.noop,data:a}))?l:"")+(null!=(l=n["if"].call(s,null!=t?t.wizardDescription:t,{name:"if",hash:{},fn:e.program(8,a,0,r,o),inverse:e.noop,data:a}))?l:"")+'\n <!-- wizard steps -->\n <div class="alpaca-wizard-steps">\n\n </div>\n\n <!-- wizard buttons -->\n <div class="alpaca-wizard-buttons">\n\n <div class="pull-left">\n'+(null!=(l=n.each.call(s,null!=t?t.buttons:t,{name:"each",hash:{},fn:e.program(10,a,0,r,o),inverse:e.noop,data:a}))?l:"")+' </div>\n\n <div class="pull-right">\n'+(null!=(l=n.each.call(s,null!=t?t.buttons:t,{name:"each",hash:{},fn:e.program(16,a,0,r,o),inverse:e.noop,data:a}))?l:"")+' </div>\n\n <div style="clear:both"></div>\n\n </div>\n\n </div>\n\n</script>'},useData:!0,useDepths:!0}),this.HandlebarsPrecompiled["bootstrap-display"]=this.HandlebarsPrecompiled["bootstrap-display"]||{},this.HandlebarsPrecompiled["bootstrap-display"].container=Handlebars.template({1:function(e,t,n,i,a){var r,o=null!=t?t:{};return' <legend class="'+(null!=(r=n["if"].call(o,null!=(r=null!=t?t.options:t)?r.labelClass:r,{name:"if",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a}))?r:"")+'alpaca-container-label">\n\n'+(null!=(r=n["if"].call(o,null!=(r=null!=t?t.options:t)?r.collapsible:r,{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a}))?r:"")+"\n "+(null!=(r=e.lambda(null!=(r=null!=t?t.options:t)?r.label:r,t))?r:"")+"\n\n"+(null!=(r=n["if"].call(o,null!=(r=null!=t?t.options:t)?r.collapsible:r,{name:"if",hash:{},fn:e.program(6,a,0),inverse:e.noop,data:a}))?r:"")+"\n </legend>\n"},2:function(e,t,n,i,a){var r;return e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.labelClass:r,t))+" "},4:function(e,t,n,i,a){return' <span data-toggle="collapse">\n'},6:function(e,t,n,i,a){return" </span>\n"},8:function(e,t,n,i,a){var r;return null!=(r=n.each.call(null!=t?t:{},null!=(r=null!=t?t.options:t)?r.helpers:r,{name:"each",hash:{},fn:e.program(9,a,0),inverse:e.noop,data:a}))?r:""},9:function(e,t,n,i,a){var r;return' <p class="alpaca-helper help-block '+(null!=(r=n["if"].call(null!=t?t:{},null!=(r=null!=t?t.options:t)?r.helperClass:r,{name:"if",hash:{},fn:e.program(10,a,0),inverse:e.noop,data:a}))?r:"")+'">\n <i class="alpaca-icon-16 glyphicon glyphicon-info-sign"></i>\n '+(null!=(r=e.lambda(t,t))?r:"")+"\n </p>\n"},10:function(e,t,n,i,a){var r;return e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.helperClass:r,t))},12:function(e,t,n,i,a){return""},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a){var r,o,l,s=null!=t?t:{},u='<script type="text/x-handlebars-template">\n\n <div>\n\n'+(null!=(r=n["if"].call(s,null!=(r=null!=t?t.options:t)?r.label:r,{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?r:"")+"\n"+(null!=(r=n["if"].call(s,null!=(r=null!=t?t.options:t)?r.helpers:r,{name:"if",hash:{},fn:e.program(8,a,0),inverse:e.noop,data:a}))?r:"")+"\n ";return o=null!=(o=n.container||(null!=t?t.container:t))?o:n.helperMissing,l={name:"container",hash:{},fn:e.program(12,a,0),inverse:e.noop,data:a},r="function"==typeof o?o.call(s,l):o,n.container||(r=n.blockHelperMissing.call(t,r,l)),null!=r&&(u+=r),u+"\n\n </div>\n\n</script>\n"},useData:!0}),this.HandlebarsPrecompiled["bootstrap-display"]["control-radio"]=Handlebars.template({1:function(e,t,n,i,a,r,o){var l;return null!=(l=(n.compare||t&&t.compare||n.helperMissing).call(null!=t?t:{},null!=t?t.value:t,null!=o[1]?o[1].data:o[1],{name:"compare",hash:{},fn:e.program(2,a,0,r,o),inverse:e.noop,data:a}))?l:""},2:function(e,t,n,i,a){var r,o;return" "+(null!=(o=null!=(o=n.text||(null!=t?t.text:t))?o:n.helperMissing,r="function"==typeof o?o.call(null!=t?t:{},{name:"text",hash:{},data:a}):o)?r:"")+"\n"},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a,r,o){var l;return'<script type="text/x-handlebars-template">\n\n <div>\n'+(null!=(l=n.each.call(null!=t?t:{},null!=t?t.selectOptions:t,{name:"each",hash:{},fn:e.program(1,a,0,r,o),inverse:e.noop,data:a}))?l:"")+" </div>\n\n</script>\n"},useData:!0,useDepths:!0}),this.HandlebarsPrecompiled["bootstrap-display"]["control-select"]=Handlebars.template({1:function(e,t,n,i,a,r,o){var l;return null!=(l=(n.compare||t&&t.compare||n.helperMissing).call(null!=t?t:{},null!=t?t.value:t,null!=o[1]?o[1].data:o[1],{name:"compare",hash:{},fn:e.program(2,a,0,r,o),inverse:e.noop,data:a}))?l:""},2:function(e,t,n,i,a){var r,o;return" "+(null!=(o=null!=(o=n.text||(null!=t?t.text:t))?o:n.helperMissing,r="function"==typeof o?o.call(null!=t?t:{},{name:"text",hash:{},data:a}):o)?r:"")+"\n"},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a,r,o){var l;return'<script type="text/x-handlebars-template">\n\n <div>\n'+(null!=(l=n.each.call(null!=t?t:{},null!=t?t.selectOptions:t,{name:"each",hash:{},fn:e.program(1,a,0,r,o),inverse:e.noop,data:a}))?l:"")+" </div>\n\n</script>\n"},useData:!0,useDepths:!0}),this.HandlebarsPrecompiled["bootstrap-display"]["control-upload-partial-download"]=Handlebars.template({1:function(e,t,n,i,a){var r,o=e.lambda,l=e.escapeExpression;return' <td></td>\n <td class="name">\n <span>'+l(o(null!=(r=null!=t?t.file:t)?r.name:r,t))+'</span>\n </td>\n <td class="size">\n <span>'+l(o(null!=(r=null!=t?t.file:t)?r.size:r,t))+'</span>\n </td>\n <td class="error" colspan="2">\n Error:\n '+l(o(null!=(r=null!=t?t.file:t)?r.error:r,t))+"\n </td>\n"},3:function(e,t,n,i,a){var r,o=e.lambda,l=e.escapeExpression;return' <td class="preview">\n'+(null!=(r=n["if"].call(null!=t?t:{},null!=(r=null!=t?t.file:t)?r.thumbnailUrl:r,{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a}))?r:"")+' </td>\n <td class="name">\n <a href="'+l(o(null!=(r=null!=t?t.file:t)?r.url:r,t))+'" title="'+l(o(null!=(r=null!=t?t.file:t)?r.name:r,t))+'" data-gallery="'+l(o(null!=(r=null!=t?t.file:t)?r.thumbnailUrl:r,t))+'gallery" download="'+l(o(null!=(r=null!=t?t.file:t)?r.name:r,t))+'">'+l(o(null!=(r=null!=t?t.file:t)?r.name:r,t))+'</a>\n </td>\n <td class="size"><span>'+l(o(null!=(r=null!=t?t.file:t)?r.size:r,t))+'</span></td>\n <td colspan="2"></td>\n'},4:function(e,t,n,i,a){var r,o=e.lambda,l=e.escapeExpression;return' <a href="'+l(o(null!=(r=null!=t?t.file:t)?r.url:r,t))+'" title="'+l(o(null!=(r=null!=t?t.file:t)?r.name:r,t))+'" data-gallery="gallery" download="'+l(o(null!=(r=null!=t?t.file:t)?r.name:r,t))+'">\n <img src="'+l(o(null!=(r=null!=t?t.file:t)?r.thumbnailUrl:r,t))+'">\n </a>\n'},6:function(e,t,n,i,a,r,o){var l;return null!=(l=n.each.call(null!=t?t:{},null!=t?t.buttons:t,{name:"each",hash:{},fn:e.program(7,a,0,r,o),inverse:e.noop,data:a}))?l:""},7:function(e,t,n,i,a,r,o){var l;return null!=(l=n["if"].call(null!=t?t:{},null!=t?t.isDelete:t,{name:"if",hash:{},fn:e.program(8,a,0,r,o),inverse:e.program(10,a,0,r,o),data:a}))?l:""},8:function(e,t,n,i,a,r,o){var l,s=e.escapeExpression;return' <button class="delete btn btn-danger" data-file-index="'+s(e.lambda(null!=o[1]?o[1].fileIndex:o[1],t))+'" data-button-key="'+s((l=null!=(l=n.key||(null!=t?t.key:t))?l:n.helperMissing,"function"==typeof l?l.call(null!=t?t:{},{name:"key",hash:{},data:a}):l))+'">\n <i class="glyphicon glyphicon-trash glyphicon-white"></i>\n </button>\n'},10:function(e,t,n,i,a,r,o){var l,s,u=null!=t?t:{},c=n.helperMissing,d="function",p=e.escapeExpression;return' <button class="'+p((s=null!=(s=n.key||(null!=t?t.key:t))?s:c,typeof s===d?s.call(u,{name:"key",hash:{},data:a}):s))+" btn "+p((s=null!=(s=n.buttonClass||(null!=t?t.buttonClass:t))?s:c,typeof s===d?s.call(u,{name:"buttonClass",hash:{},data:a}):s))+'" data-file-index="'+p(e.lambda(null!=o[1]?o[1].fileIndex:o[1],t))+'" data-button-key="'+p((s=null!=(s=n.key||(null!=t?t.key:t))?s:c,typeof s===d?s.call(u,{name:"key",hash:{},data:a}):s))+'">\n'+(null!=(l=n["if"].call(u,null!=t?t.iconClass:t,{name:"if",hash:{},fn:e.program(11,a,0,r,o),inverse:e.noop,data:a}))?l:"")+(null!=(l=n["if"].call(u,null!=t?t.label:t,{name:"if",hash:{},fn:e.program(13,a,0,r,o),inverse:e.noop,data:a}))?l:"")+" </button>\n"},11:function(e,t,n,i,a){var r;return' <i class="'+e.escapeExpression((r=null!=(r=n.iconClass||(null!=t?t.iconClass:t))?r:n.helperMissing,"function"==typeof r?r.call(null!=t?t:{},{name:"iconClass",hash:{},data:a}):r))+'"></i>\n'},13:function(e,t,n,i,a){var r;return" "+e.escapeExpression((r=null!=(r=n.label||(null!=t?t.label:t))?r:n.helperMissing,"function"==typeof r?r.call(null!=t?t:{},{name:"label",hash:{},data:a}):r))+"\n"},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a,r,o){var l,s=null!=t?t:{};return'<script type="text/x-handlebars-template">\n\n <tr class="template-download">\n'+(null!=(l=n["if"].call(s,null!=(l=null!=t?t.file:t)?l.error:l,{name:"if",hash:{},fn:e.program(1,a,0,r,o),inverse:e.program(3,a,0,r,o),data:a}))?l:"")+" <td>\n"+(null!=(l=n["if"].call(s,null!=t?t.buttons:t,{name:"if",hash:{},fn:e.program(6,a,0,r,o),inverse:e.noop,data:a}))?l:"")+" </td>\n </tr>\n\n</script>"},useData:!0,useDepths:!0}),this.HandlebarsPrecompiled["bootstrap-display"]["control-upload-partial-upload"]=Handlebars.template({1:function(e,t,n,i,a){return' <td class="preview">\n <span class="fade"></span>\n </td>\n'},3:function(e,t,n,i,a){return" <td></td>\n"},5:function(e,t,n,i,a){var r;return' <td class="error" colspan="2"><span class="label label-important">Error</span> '+e.escapeExpression(e.lambda(null!=(r=null!=t?t.file:t)?r.error:r,t))+"</td>\n"},7:function(e,t,n,i,a){var r;return null!=(r=n["if"].call(null!=t?t:{},null!=(r=null!=t?t.file:t)?r.valid:r,{name:"if",hash:{},fn:e.program(8,a,0),inverse:e.program(15,a,0),data:a}))?r:""},8:function(e,t,n,i,a){var r,o=null!=t?t:{};return(null!=(r=(n.compare||t&&t.compare||n.helperMissing).call(o,a&&a.index,0,{name:"compare",hash:{},fn:e.program(9,a,0),inverse:e.noop,data:a}))?r:"")+' <td class="start">\n'+(null!=(r=n["if"].call(o,null!=(r=null!=t?t.options:t)?r.autoUpload:r,{name:"if",hash:{},fn:e.program(11,a,0),inverse:e.program(13,a,0),data:a}))?r:"")+" </td>\n"},9:function(e,t,n,i,a){return' <td>\n <div class="progress progress-success progress-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0">\n <div class="progress-bar" style="width:0%;"></div>\n </div>\n </td>\n'},11:function(e,t,n,i,a){return""},13:function(e,t,n,i,a){return' <button class="btn btn-primary"> \\\n <i class="glyphicon glyphicon-upload glyphicon-white"></i>\n <span>Start</span>\n </button>\n'},15:function(e,t,n,i,a){var r;return' <td></td>\n <td class="cancel">\n'+(null!=(r=(n.compare||t&&t.compare||n.helperMissing).call(null!=t?t:{},a&&a.index,0,{name:"compare",hash:{},fn:e.program(16,a,0),inverse:e.noop,data:a}))?r:"")+" </td>\n"},16:function(e,t,n,i,a){return' <button class="btn btn-warning">\n <i class="glyphicon glyphicon-ban-circle glyphicon-white"></i>\n <span>Cancel</span>\n </button>\n'},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a){var r,o=null!=t?t:{},l=e.lambda,s=e.escapeExpression;return'<script type="text/x-handlebars-template">\n\n <tr class="template-upload">\n\n'+(null!=(r=n["if"].call(o,null!=(r=null!=t?t.options:t)?r.showUploadPreview:r,{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a}))?r:"")+'\n <td class="name"><span>'+s(l(null!=(r=null!=t?t.file:t)?r.name:r,t))+'</span></td>\n <td class="size"><span>'+s(l(null!=(r=null!=t?t.file:t)?r.size:r,t))+"</span></td>\n\n"+(null!=(r=n["if"].call(o,null!=(r=null!=t?t.file:t)?r.error:r,{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.program(7,a,0),data:a}))?r:"")+" <td></td>\n </tr>\n\n</script>"},useData:!0}),this.HandlebarsPrecompiled["bootstrap-display"]["control-upload"]=Handlebars.template({1:function(e,t,n,i,a){var r;return e.escapeExpression((r=null!=(r=n.cssClasses||(null!=t?t.cssClasses:t))?r:n.helperMissing,"function"==typeof r?r.call(null!=t?t:{},{name:"cssClasses",hash:{},data:a}):r))},3:function(e,t,n,i,a){var r;return" <thead>\n <tr>\n"+(null!=(r=n["if"].call(null!=t?t:{},null!=(r=null!=t?t.options:t)?r.showUploadPreview:r,{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.program(6,a,0),data:a}))?r:"")+' <td>Name</td>\n <td>Size</td>\n <td colspan="2"></td><!-- error or start or progress indicator -->\n <td>Actions</td>\n </tr>\n </thead>\n'},4:function(e,t,n,i,a){return" <td>Thumbnail</td>\n"},6:function(e,t,n,i,a){return" <td></td>\n"},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a){var r,o,l=null!=t?t:{},s=e.escapeExpression,u=n.helperMissing,c="function";return'<script type="text/x-handlebars-template">\n\n <div class="alpaca-fileupload-container '+(null!=(r=n["if"].call(l,null!=t?t.cssClasses:t,{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?r:"")+'">\n <div class="container-fluid">\n <div class="row alpaca-fileupload-chooserow">\n <div class="col-md-12">\n <div class="btn-group">\n <span class="'+s(e.lambda(null!=(r=null!=(r=null!=t?t.view:t)?r.styles:r)?r.button:r,t))+' fileinput-button">\n <i class="glyphicon glyphicon-upload"></i>\n <span class="fileupload-add-button">'+s((o=null!=(o=n.chooseButtonLabel||(null!=t?t.chooseButtonLabel:t))?o:u,typeof o===c?o.call(l,{name:"chooseButtonLabel",hash:{},data:a}):o))+'</span>\n <input class="alpaca-fileupload-input" type="file" name="'+s((o=null!=(o=n.name||(null!=t?t.name:t))?o:u,typeof o===c?o.call(l,{name:"name",hash:{},data:a}):o))+'_files">\n <input class="alpaca-fileupload-input-hidden" type="hidden" name="'+s((o=null!=(o=n.name||(null!=t?t.name:t))?o:u,typeof o===c?o.call(l,{name:"name",hash:{},data:a}):o))+'_files_hidden">\n </span>\n </div>\n </div>\n </div>\n <div class="row alpaca-fileupload-well">\n <div class="col-md-12 fileupload-active-zone">\n <table class="table table-striped">\n'+(null!=(r=n["if"].call(l,null!=(r=null!=t?t.options:t)?r.showHeaders:r,{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a}))?r:"")+' <tbody class="files">\n </tbody>\n </table>\n <p align="center" class="dropzone-message">'+s((o=null!=(o=n.dropZoneMessage||(null!=t?t.dropZoneMessage:t))?o:u,typeof o===c?o.call(l,{name:"dropZoneMessage",hash:{},data:a}):o))+'</p>\n </div>\n </div>\n <div class="row">\n <div class="col-md-12">\n <div id="progress" class="progress">\n <div class="progress-bar progress-bar-success"></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n</script>'},useData:!0}),this.HandlebarsPrecompiled["bootstrap-display"].control=Handlebars.template({1:function(e,t,n,i,a){var r,o,l=null!=t?t:{};return' <label class="'+(null!=(r=n["if"].call(l,null!=(r=null!=t?t.options:t)?r.labelClass:r,{name:"if",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a}))?r:"")+' control-label alpaca-control-label" for="'+e.escapeExpression((o=null!=(o=n.id||(null!=t?t.id:t))?o:n.helperMissing,"function"==typeof o?o.call(l,{name:"id",hash:{},data:a}):o))+'">'+(null!=(r=e.lambda(null!=(r=null!=t?t.options:t)?r.label:r,t))?r:"")+"</label>\n"},2:function(e,t,n,i,a){var r;return e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.labelClass:r,t))},4:function(e,t,n,i,a){return""},6:function(e,t,n,i,a){var r;return null!=(r=n.each.call(null!=t?t:{},null!=(r=null!=t?t.options:t)?r.helpers:r,{name:"each",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a}))?r:""},7:function(e,t,n,i,a){var r;return' <p class="help-block '+(null!=(r=n["if"].call(null!=t?t:{},null!=(r=null!=t?t.options:t)?r.helperClass:r,{name:"if",hash:{},fn:e.program(8,a,0),inverse:e.noop,data:a}))?r:"")+'">\n <i class="glyphicon glyphicon-info-sign"></i>\n '+(null!=(r=e.lambda(t,t))?r:"")+"\n </p>\n"},8:function(e,t,n,i,a){var r;return e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.helperClass:r,t))},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a){var r,o,l,s=null!=t?t:{},u='<script type="text/x-handlebars-template">\n\n <div class="form-group">\n\n'+(null!=(r=n["if"].call(s,null!=(r=null!=t?t.options:t)?r.label:r,{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?r:"")+"\n ";return o=null!=(o=n.control||(null!=t?t.control:t))?o:n.helperMissing,l={name:"control",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a},r="function"==typeof o?o.call(s,l):o,n.control||(r=n.blockHelperMissing.call(t,r,l)),null!=r&&(u+=r),u+"\n\n"+(null!=(r=n["if"].call(s,null!=(r=null!=t?t.options:t)?r.helpers:r,{name:"if",hash:{},fn:e.program(6,a,0),inverse:e.noop,data:a}))?r:"")+"\n </div>\n\n</script>"},useData:!0}),this.HandlebarsPrecompiled["bootstrap-display"].message=Handlebars.template({compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a){var r,o;return'<script type="text/x-handlebars-template">\n\n <div class="help-block">\n <i class="glyphicon glyphicon-exclamation-sign"></i> '+(null!=(o=null!=(o=n.message||(null!=t?t.message:t))?o:n.helperMissing,r="function"==typeof o?o.call(null!=t?t:{},{name:"message",hash:{},data:a}):o)?r:"")+"\n </div>\n\n</script>"},useData:!0}),this.HandlebarsPrecompiled["bootstrap-edit"]=this.HandlebarsPrecompiled["bootstrap-edit"]||{},this.HandlebarsPrecompiled["bootstrap-edit"]["container-grid"]=Handlebars.template({1:function(e,t,n,i,a){return" btn-group"},3:function(e,t,n,i,a,r,o){var l,s=null!=t?t:{},u=n.helperMissing;return"\n"+(null!=(l=(n.compare||t&&t.compare||u).call(s,null!=(l=null!=o[1]?o[1].options:o[1])?l.toolbarStyle:l,"link",{name:"compare",hash:{},fn:e.program(4,a,0,r,o),inverse:e.noop,data:a}))?l:"")+"\n"+(null!=(l=(n.compare||t&&t.compare||u).call(s,null!=(l=null!=o[1]?o[1].options:o[1])?l.toolbarStyle:l,"button",{name:"compare",hash:{},fn:e.program(6,a,0,r,o),inverse:e.noop,data:a}))?l:"")+"\n"},4:function(e,t,n,i,a){var r=e.lambda,o=e.escapeExpression;return' <a href="#" class="alpaca-array-toolbar-action" data-array-toolbar-action="'+o(r(null!=t?t.action:t,t))+'">'+o(r(null!=t?t.label:t,t))+"</a>\n"},6:function(e,t,n,i,a,r,o){var l,s,u=e.escapeExpression,c=null!=t?t:{};return' <button class="alpaca-array-toolbar-action '+u(e.lambda(null!=(l=null!=(l=null!=o[1]?o[1].view:o[1])?l.styles:l)?l.button:l,t))+'" data-array-toolbar-action="'+u((s=null!=(s=n.action||(null!=t?t.action:t))?s:n.helperMissing,"function"==typeof s?s.call(c,{name:"action",hash:{},data:a}):s))+'">\n'+(null!=(l=n["if"].call(c,null!=t?t.iconClass:t,{name:"if",hash:{},fn:e.program(7,a,0,r,o),inverse:e.noop,data:a}))?l:"")+" "+(null!=(l=n["if"].call(c,null!=t?t.label:t,{name:"if",hash:{},fn:e.program(9,a,0,r,o),inverse:e.noop,data:a}))?l:"")+"\n </button>\n"},7:function(e,t,n,i,a){var r;return' <i class="'+e.escapeExpression((r=null!=(r=n.iconClass||(null!=t?t.iconClass:t))?r:n.helperMissing,"function"==typeof r?r.call(null!=t?t:{},{name:"iconClass",hash:{},data:a}):r))+'"></i>\n'},9:function(e,t,n,i,a){var r,o;return null!=(o=null!=(o=n.label||(null!=t?t.label:t))?o:n.helperMissing,r="function"==typeof o?o.call(null!=t?t:{},{name:"label",hash:{},data:a}):o)?r:""},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a,r,o){var l,s=null!=t?t:{};return'<script type="text/x-handlebars-template">\n\n <div>\n\n <div class="alpaca-array-toolbar" '+(null!=(l=(n.compare||t&&t.compare||n.helperMissing).call(s,null!=(l=null!=t?t.options:t)?l.toolbarStyle:l,"button",{name:"compare",hash:{},fn:e.program(1,a,0,r,o),inverse:e.noop,data:a}))?l:"")+">\n\n"+(null!=(l=n.each.call(s,null!=t?t.arrayToolbarActions:t,{name:"each",hash:{},fn:e.program(3,a,0,r,o),inverse:e.noop,data:a}))?l:"")+'\n </div>\n\n <div class="alpaca-container-grid-holder"></div>\n\n </div>\n\n</script>'},useData:!0,useDepths:!0}),this.HandlebarsPrecompiled["bootstrap-edit"]["container-table"]=Handlebars.template({1:function(e,t,n,i,a){return""},3:function(e,t,n,i,a){return' <!-- hidden column storing sort order -->\n <th class="alpaca-table-reorder-index-header"></th>\n <!-- draggable -->\n <th class="alpaca-table-reorder-draggable-header"></th>\n'},5:function(e,t,n,i,a){var r,o,l=null!=t?t:{},s=n.helperMissing,u="function";return' <th data-header-id="'+e.escapeExpression((o=null!=(o=n.id||(null!=t?t.id:t))?o:s,typeof o===u?o.call(l,{name:"id",hash:{},data:a}):o))+'" '+(null!=(r=n["if"].call(l,null!=t?t.hidden:t,{name:"if",hash:{},fn:e.program(6,a,0),inverse:e.noop,data:a}))?r:"")+">"+(null!=(o=null!=(o=n.title||(null!=t?t.title:t))?o:s,r=typeof o===u?o.call(l,{name:"title",hash:{},data:a}):o)?r:"")+"</th>\n"},6:function(e,t,n,i,a){return'class="alpaca-table-column-hidden"'},8:function(e,t,n,i,a){return" <th>Actions</th>\n";
},10:function(e,t,n,i,a){var r;return"\n "+(null!=(r=(n.item||t&&t.item||n.helperMissing).call(null!=t?t:{},"tr",{name:"item",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?r:"")+"\n\n"},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a){var r,o,l,s=null!=t?t:{},u='<script type="text/x-handlebars-template">\n\n <div class="table-responsive">\n\n ';return o=null!=(o=n.arrayToolbar||(null!=t?t.arrayToolbar:t))?o:n.helperMissing,l={name:"arrayToolbar",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a},r="function"==typeof o?o.call(s,l):o,n.arrayToolbar||(r=n.blockHelperMissing.call(t,r,l)),null!=r&&(u+=r),u+"\n\n <table>\n\n <!-- table headers -->\n <thead>\n <tr>\n\n"+(null!=(r=n["if"].call(s,null!=(r=null!=t?t.options:t)?r.dragRows:r,{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a}))?r:"")+"\n"+(null!=(r=n.each.call(s,null!=t?t.headers:t,{name:"each",hash:{},fn:e.program(5,a,0),inverse:e.noop,data:a}))?r:"")+"\n"+(null!=(r=n["if"].call(s,null!=(r=null!=t?t.options:t)?r.showActionsColumn:r,{name:"if",hash:{},fn:e.program(8,a,0),inverse:e.noop,data:a}))?r:"")+" </tr>\n </thead>\n\n <!-- table body -->\n <tbody>\n"+(null!=(r=n.each.call(s,null!=t?t.items:t,{name:"each",hash:{},fn:e.program(10,a,0),inverse:e.noop,data:a}))?r:"")+" </tbody>\n\n </table>\n\n </div>\n\n</script>"},useData:!0}),this.HandlebarsPrecompiled["bootstrap-edit"].container=Handlebars.template({1:function(e,t,n,i,a){var r,o=null!=t?t:{};return' <legend class="'+(null!=(r=n["if"].call(o,null!=(r=null!=t?t.options:t)?r.labelClass:r,{name:"if",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a}))?r:"")+'alpaca-container-label">\n\n'+(null!=(r=n["if"].call(o,null!=(r=null!=t?t.options:t)?r.collapsible:r,{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a}))?r:"")+"\n "+(null!=(r=e.lambda(null!=(r=null!=t?t.options:t)?r.label:r,t))?r:"")+"\n\n"+(null!=(r=n["if"].call(o,null!=(r=null!=t?t.options:t)?r.collapsible:r,{name:"if",hash:{},fn:e.program(6,a,0),inverse:e.noop,data:a}))?r:"")+"\n </legend>\n"},2:function(e,t,n,i,a){var r;return e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.labelClass:r,t))+" "},4:function(e,t,n,i,a){return' <span data-toggle="collapse">\n'},6:function(e,t,n,i,a){return" </span>\n"},8:function(e,t,n,i,a){var r;return null!=(r=n.each.call(null!=t?t:{},null!=(r=null!=t?t.options:t)?r.helpers:r,{name:"each",hash:{},fn:e.program(9,a,0),inverse:e.noop,data:a}))?r:""},9:function(e,t,n,i,a){var r;return' <p class="alpaca-helper help-block '+(null!=(r=n["if"].call(null!=t?t:{},null!=(r=null!=t?t.options:t)?r.helperClass:r,{name:"if",hash:{},fn:e.program(10,a,0),inverse:e.noop,data:a}))?r:"")+'">\n <i class="alpaca-icon-16 glyphicon glyphicon-info-sign"></i>\n '+(null!=(r=e.lambda(t,t))?r:"")+"\n </p>\n"},10:function(e,t,n,i,a){var r;return e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.helperClass:r,t))},12:function(e,t,n,i,a){return""},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a){var r,o,l,s=null!=t?t:{},u='<script type="text/x-handlebars-template">\n\n <div>\n\n'+(null!=(r=n["if"].call(s,null!=(r=null!=t?t.options:t)?r.label:r,{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?r:"")+"\n"+(null!=(r=n["if"].call(s,null!=(r=null!=t?t.options:t)?r.helpers:r,{name:"if",hash:{},fn:e.program(8,a,0),inverse:e.noop,data:a}))?r:"")+"\n ";return o=null!=(o=n.container||(null!=t?t.container:t))?o:n.helperMissing,l={name:"container",hash:{},fn:e.program(12,a,0),inverse:e.noop,data:a},r="function"==typeof o?o.call(s,l):o,n.container||(r=n.blockHelperMissing.call(t,r,l)),null!=r&&(u+=r),u+"\n\n </div>\n\n</script>\n"},useData:!0}),this.HandlebarsPrecompiled["bootstrap-edit"]["control-upload-partial-download"]=Handlebars.template({1:function(e,t,n,i,a){var r,o=e.lambda,l=e.escapeExpression;return' <td></td>\n <td class="name">\n <span>'+l(o(null!=(r=null!=t?t.file:t)?r.name:r,t))+'</span>\n </td>\n <td class="size">\n <span>'+l(o(null!=(r=null!=t?t.file:t)?r.size:r,t))+'</span>\n </td>\n <td class="error" colspan="2">\n Error:\n '+l(o(null!=(r=null!=t?t.file:t)?r.error:r,t))+"\n </td>\n"},3:function(e,t,n,i,a){var r,o=e.lambda,l=e.escapeExpression;return' <td class="preview">\n'+(null!=(r=n["if"].call(null!=t?t:{},null!=(r=null!=t?t.file:t)?r.thumbnailUrl:r,{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a}))?r:"")+' </td>\n <td class="name">\n <a href="'+l(o(null!=(r=null!=t?t.file:t)?r.url:r,t))+'" title="'+l(o(null!=(r=null!=t?t.file:t)?r.name:r,t))+'" data-gallery="'+l(o(null!=(r=null!=t?t.file:t)?r.thumbnailUrl:r,t))+'gallery" download="'+l(o(null!=(r=null!=t?t.file:t)?r.name:r,t))+'">'+l(o(null!=(r=null!=t?t.file:t)?r.name:r,t))+'</a>\n </td>\n <td class="size"><span>'+l(o(null!=(r=null!=t?t.file:t)?r.size:r,t))+'</span></td>\n <td colspan="2"></td>\n'},4:function(e,t,n,i,a){var r,o=e.lambda,l=e.escapeExpression;return' <a href="'+l(o(null!=(r=null!=t?t.file:t)?r.url:r,t))+'" title="'+l(o(null!=(r=null!=t?t.file:t)?r.name:r,t))+'" data-gallery="gallery" download="'+l(o(null!=(r=null!=t?t.file:t)?r.name:r,t))+'">\n <img src="'+l(o(null!=(r=null!=t?t.file:t)?r.thumbnailUrl:r,t))+'">\n </a>\n'},6:function(e,t,n,i,a,r,o){var l;return null!=(l=n.each.call(null!=t?t:{},null!=t?t.buttons:t,{name:"each",hash:{},fn:e.program(7,a,0,r,o),inverse:e.noop,data:a}))?l:""},7:function(e,t,n,i,a,r,o){var l;return null!=(l=n["if"].call(null!=t?t:{},null!=t?t.isDelete:t,{name:"if",hash:{},fn:e.program(8,a,0,r,o),inverse:e.program(10,a,0,r,o),data:a}))?l:""},8:function(e,t,n,i,a,r,o){var l,s=e.escapeExpression;return' <button class="delete btn btn-danger" data-file-index="'+s(e.lambda(null!=o[1]?o[1].fileIndex:o[1],t))+'" data-button-key="'+s((l=null!=(l=n.key||(null!=t?t.key:t))?l:n.helperMissing,"function"==typeof l?l.call(null!=t?t:{},{name:"key",hash:{},data:a}):l))+'">\n <i class="glyphicon glyphicon-trash glyphicon-white"></i>\n </button>\n'},10:function(e,t,n,i,a,r,o){var l,s,u=null!=t?t:{},c=n.helperMissing,d="function",p=e.escapeExpression;return' <button class="'+p((s=null!=(s=n.key||(null!=t?t.key:t))?s:c,typeof s===d?s.call(u,{name:"key",hash:{},data:a}):s))+" btn "+p((s=null!=(s=n.buttonClass||(null!=t?t.buttonClass:t))?s:c,typeof s===d?s.call(u,{name:"buttonClass",hash:{},data:a}):s))+'" data-file-index="'+p(e.lambda(null!=o[1]?o[1].fileIndex:o[1],t))+'" data-button-key="'+p((s=null!=(s=n.key||(null!=t?t.key:t))?s:c,typeof s===d?s.call(u,{name:"key",hash:{},data:a}):s))+'">\n'+(null!=(l=n["if"].call(u,null!=t?t.iconClass:t,{name:"if",hash:{},fn:e.program(11,a,0,r,o),inverse:e.noop,data:a}))?l:"")+(null!=(l=n["if"].call(u,null!=t?t.label:t,{name:"if",hash:{},fn:e.program(13,a,0,r,o),inverse:e.noop,data:a}))?l:"")+" </button>\n"},11:function(e,t,n,i,a){var r;return' <i class="'+e.escapeExpression((r=null!=(r=n.iconClass||(null!=t?t.iconClass:t))?r:n.helperMissing,"function"==typeof r?r.call(null!=t?t:{},{name:"iconClass",hash:{},data:a}):r))+'"></i>\n'},13:function(e,t,n,i,a){var r;return" "+e.escapeExpression((r=null!=(r=n.label||(null!=t?t.label:t))?r:n.helperMissing,"function"==typeof r?r.call(null!=t?t:{},{name:"label",hash:{},data:a}):r))+"\n"},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a,r,o){var l,s=null!=t?t:{};return'<script type="text/x-handlebars-template">\n\n <tr class="template-download">\n'+(null!=(l=n["if"].call(s,null!=(l=null!=t?t.file:t)?l.error:l,{name:"if",hash:{},fn:e.program(1,a,0,r,o),inverse:e.program(3,a,0,r,o),data:a}))?l:"")+" <td>\n"+(null!=(l=n["if"].call(s,null!=t?t.buttons:t,{name:"if",hash:{},fn:e.program(6,a,0,r,o),inverse:e.noop,data:a}))?l:"")+" </td>\n </tr>\n\n</script>"},useData:!0,useDepths:!0}),this.HandlebarsPrecompiled["bootstrap-edit"]["control-upload-partial-upload"]=Handlebars.template({1:function(e,t,n,i,a){return' <td class="preview">\n <span class="fade"></span>\n </td>\n'},3:function(e,t,n,i,a){return" <td></td>\n"},5:function(e,t,n,i,a){var r;return' <td class="error" colspan="2"><span class="label label-important">Error</span> '+e.escapeExpression(e.lambda(null!=(r=null!=t?t.file:t)?r.error:r,t))+"</td>\n"},7:function(e,t,n,i,a){var r;return null!=(r=n["if"].call(null!=t?t:{},null!=(r=null!=t?t.file:t)?r.valid:r,{name:"if",hash:{},fn:e.program(8,a,0),inverse:e.program(15,a,0),data:a}))?r:""},8:function(e,t,n,i,a){var r,o=null!=t?t:{};return(null!=(r=(n.compare||t&&t.compare||n.helperMissing).call(o,a&&a.index,0,{name:"compare",hash:{},fn:e.program(9,a,0),inverse:e.noop,data:a}))?r:"")+' <td class="start">\n'+(null!=(r=n["if"].call(o,null!=(r=null!=t?t.options:t)?r.autoUpload:r,{name:"if",hash:{},fn:e.program(11,a,0),inverse:e.program(13,a,0),data:a}))?r:"")+" </td>\n"},9:function(e,t,n,i,a){return' <td>\n <div class="progress progress-success progress-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0">\n <div class="progress-bar" style="width:0%;"></div>\n </div>\n </td>\n'},11:function(e,t,n,i,a){return""},13:function(e,t,n,i,a){return' <button class="btn btn-primary"> \\\n <i class="glyphicon glyphicon-upload glyphicon-white"></i>\n <span>Start</span>\n </button>\n'},15:function(e,t,n,i,a){var r;return' <td></td>\n <td class="cancel">\n'+(null!=(r=(n.compare||t&&t.compare||n.helperMissing).call(null!=t?t:{},a&&a.index,0,{name:"compare",hash:{},fn:e.program(16,a,0),inverse:e.noop,data:a}))?r:"")+" </td>\n"},16:function(e,t,n,i,a){return' <button class="btn btn-warning">\n <i class="glyphicon glyphicon-ban-circle glyphicon-white"></i>\n <span>Cancel</span>\n </button>\n'},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a){var r,o=null!=t?t:{},l=e.lambda,s=e.escapeExpression;return'<script type="text/x-handlebars-template">\n\n <tr class="template-upload">\n\n'+(null!=(r=n["if"].call(o,null!=(r=null!=t?t.options:t)?r.showUploadPreview:r,{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a}))?r:"")+'\n <td class="name"><span>'+s(l(null!=(r=null!=t?t.file:t)?r.name:r,t))+'</span></td>\n <td class="size"><span>'+s(l(null!=(r=null!=t?t.file:t)?r.size:r,t))+"</span></td>\n\n"+(null!=(r=n["if"].call(o,null!=(r=null!=t?t.file:t)?r.error:r,{name:"if",hash:{},fn:e.program(5,a,0),inverse:e.program(7,a,0),data:a}))?r:"")+" <td></td>\n </tr>\n\n</script>"},useData:!0}),this.HandlebarsPrecompiled["bootstrap-edit"]["control-upload"]=Handlebars.template({1:function(e,t,n,i,a){var r;return e.escapeExpression((r=null!=(r=n.cssClasses||(null!=t?t.cssClasses:t))?r:n.helperMissing,"function"==typeof r?r.call(null!=t?t:{},{name:"cssClasses",hash:{},data:a}):r))},3:function(e,t,n,i,a){var r;return" <thead>\n <tr>\n"+(null!=(r=n["if"].call(null!=t?t:{},null!=(r=null!=t?t.options:t)?r.showUploadPreview:r,{name:"if",hash:{},fn:e.program(4,a,0),inverse:e.program(6,a,0),data:a}))?r:"")+' <td>Name</td>\n <td>Size</td>\n <td colspan="2"></td><!-- error or start or progress indicator -->\n <td>Actions</td>\n </tr>\n </thead>\n'},4:function(e,t,n,i,a){return" <td>Thumbnail</td>\n"},6:function(e,t,n,i,a){return" <td></td>\n"},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a){var r,o,l=null!=t?t:{},s=e.escapeExpression,u=n.helperMissing,c="function";return'<script type="text/x-handlebars-template">\n\n <div class="alpaca-fileupload-container '+(null!=(r=n["if"].call(l,null!=t?t.cssClasses:t,{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?r:"")+'">\n <div class="container-fluid">\n <div class="row alpaca-fileupload-chooserow">\n <div class="col-md-12">\n <div class="btn-group">\n <span class="'+s(e.lambda(null!=(r=null!=(r=null!=t?t.view:t)?r.styles:r)?r.button:r,t))+' fileinput-button">\n <i class="glyphicon glyphicon-upload"></i>\n <span class="fileupload-add-button">'+s((o=null!=(o=n.chooseButtonLabel||(null!=t?t.chooseButtonLabel:t))?o:u,typeof o===c?o.call(l,{name:"chooseButtonLabel",hash:{},data:a}):o))+'</span>\n <input class="alpaca-fileupload-input" type="file" name="'+s((o=null!=(o=n.name||(null!=t?t.name:t))?o:u,typeof o===c?o.call(l,{name:"name",hash:{},data:a}):o))+'_files">\n <input class="alpaca-fileupload-input-hidden" type="hidden" name="'+s((o=null!=(o=n.name||(null!=t?t.name:t))?o:u,typeof o===c?o.call(l,{name:"name",hash:{},data:a}):o))+'_files_hidden">\n </span>\n </div>\n </div>\n </div>\n <div class="row alpaca-fileupload-well">\n <div class="col-md-12 fileupload-active-zone">\n <table class="table table-striped">\n'+(null!=(r=n["if"].call(l,null!=(r=null!=t?t.options:t)?r.showHeaders:r,{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a}))?r:"")+' <tbody class="files">\n </tbody>\n </table>\n <p align="center" class="dropzone-message">'+s((o=null!=(o=n.dropZoneMessage||(null!=t?t.dropZoneMessage:t))?o:u,typeof o===c?o.call(l,{name:"dropZoneMessage",hash:{},data:a}):o))+'</p>\n </div>\n </div>\n <div class="row">\n <div class="col-md-12">\n <div id="progress" class="progress">\n <div class="progress-bar progress-bar-success"></div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n</script>'},useData:!0}),this.HandlebarsPrecompiled["bootstrap-edit"].control=Handlebars.template({1:function(e,t,n,i,a){var r,o,l=null!=t?t:{};return' <label class="'+(null!=(r=n["if"].call(l,null!=(r=null!=t?t.options:t)?r.labelClass:r,{name:"if",hash:{},fn:e.program(2,a,0),inverse:e.noop,data:a}))?r:"")+' control-label alpaca-control-label" for="'+e.escapeExpression((o=null!=(o=n.id||(null!=t?t.id:t))?o:n.helperMissing,"function"==typeof o?o.call(l,{name:"id",hash:{},data:a}):o))+'">'+(null!=(r=e.lambda(null!=(r=null!=t?t.options:t)?r.label:r,t))?r:"")+"</label>\n"},2:function(e,t,n,i,a){var r;return e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.labelClass:r,t))},4:function(e,t,n,i,a){return""},6:function(e,t,n,i,a){var r;return null!=(r=n.each.call(null!=t?t:{},null!=(r=null!=t?t.options:t)?r.helpers:r,{name:"each",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a}))?r:""},7:function(e,t,n,i,a){var r;return' <p class="help-block '+(null!=(r=n["if"].call(null!=t?t:{},null!=(r=null!=t?t.options:t)?r.helperClass:r,{name:"if",hash:{},fn:e.program(8,a,0),inverse:e.noop,data:a}))?r:"")+'">\n <i class="glyphicon glyphicon-info-sign"></i>\n '+(null!=(r=e.lambda(t,t))?r:"")+"\n </p>\n"},8:function(e,t,n,i,a){var r;return e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.helperClass:r,t))},10:function(e,t,n,i,a){var r;return null!=(r=n["if"].call(null!=t?t:{},null!=(r=null!=t?t.options:t)?r.buttons:r,{name:"if",hash:{},fn:e.program(11,a,0),inverse:e.noop,data:a}))?r:""},11:function(e,t,n,i,a){var r;return' <div class="alpaca-control-buttons-container">\n'+(null!=(r=n.each.call(null!=t?t:{},null!=(r=null!=t?t.options:t)?r.buttons:r,{name:"each",hash:{},fn:e.program(12,a,0),inverse:e.noop,data:a}))?r:"")+" </div>\n"},12:function(e,t,n,i,a){var r,o,l=null!=t?t:{},s=n.helperMissing,u="function",c=e.escapeExpression;return' <button data-key="'+c((o=null!=(o=n.key||a&&a.key)?o:s,typeof o===u?o.call(l,{name:"key",hash:{},data:a}):o))+'" type="'+c((o=null!=(o=n.type||(null!=t?t.type:t))?o:s,typeof o===u?o.call(l,{name:"type",hash:{},data:a}):o))+'" class="alpaca-control-button alpaca-control-button-'+c((o=null!=(o=n.key||a&&a.key)?o:s,typeof o===u?o.call(l,{name:"key",hash:{},data:a}):o))+" "+c((o=null!=(o=n.styles||(null!=t?t.styles:t))?o:s,typeof o===u?o.call(l,{name:"styles",hash:{},data:a}):o))+'" '+(null!=(r=n.each.call(l,null!=t?t.value:t,{name:"each",hash:{},fn:e.program(13,a,0),inverse:e.noop,data:a}))?r:"")+">"+(null!=(o=null!=(o=n.value||(null!=t?t.value:t))?o:s,r=typeof o===u?o.call(l,{name:"value",hash:{},data:a}):o)?r:"")+"</button>\n"},13:function(e,t,n,i,a){var r,o=null!=t?t:{},l=n.helperMissing,s="function",u=e.escapeExpression;return u((r=null!=(r=n.key||a&&a.key)?r:l,typeof r===s?r.call(o,{name:"key",hash:{},data:a}):r))+'="'+u((r=null!=(r=n.value||(null!=t?t.value:t))?r:l,typeof r===s?r.call(o,{name:"value",hash:{},data:a}):r))+'" '},compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a){var r,o,l,s=null!=t?t:{},u='<script type="text/x-handlebars-template">\n\n <div class="form-group">\n\n'+(null!=(r=n["if"].call(s,null!=(r=null!=t?t.options:t)?r.label:r,{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?r:"")+"\n ";return o=null!=(o=n.control||(null!=t?t.control:t))?o:n.helperMissing,l={name:"control",hash:{},fn:e.program(4,a,0),inverse:e.noop,data:a},r="function"==typeof o?o.call(s,l):o,n.control||(r=n.blockHelperMissing.call(t,r,l)),null!=r&&(u+=r),u+"\n\n"+(null!=(r=n["if"].call(s,null!=(r=null!=t?t.options:t)?r.helpers:r,{name:"if",hash:{},fn:e.program(6,a,0),inverse:e.noop,data:a}))?r:"")+"\n"+(null!=(r=n["if"].call(s,null!=(r=null!=t?t.options:t)?r.renderButtons:r,{name:"if",hash:{},fn:e.program(10,a,0),inverse:e.noop,data:a}))?r:"")+"\n </div>\n\n</script>"},useData:!0}),this.HandlebarsPrecompiled["bootstrap-edit"].message=Handlebars.template({compiler:[7,">= 4.0.0"],main:function(e,t,n,i,a){var r,o,l=null!=t?t:{},s=n.helperMissing,u="function";return'<script type="text/x-handlebars-template">\n\n <div class="help-block alpaca-message alpaca-message-'+(null!=(o=null!=(o=n.id||(null!=t?t.id:t))?o:s,r=typeof o===u?o.call(l,{name:"id",hash:{},data:a}):o)?r:"")+'">\n <i class="glyphicon glyphicon-exclamation-sign"></i> '+(null!=(o=null!=(o=n.message||(null!=t?t.message:t))?o:s,r=typeof o===u?o.call(l,{name:"message",hash:{},data:a}):o)?r:"")+"\n </div>\n\n</script>"},useData:!0}),function(e,t){e.Base=t()}(this,function(){var e="function",t="object",n="string",i=!1,a=["constructor","toString","valueOf"],r=a.length,o=/\bbase\b/,l=function(){},s={toSource:null,base:l},u=function(){};return u.extend=function(n,a){var r=u.prototype.extend;i=!0;var o=new this;r.call(o,n),o.base=s.base,i=!1;var l=o.constructor,c=o.constructor=function(){i||(this&&(this._constructing||this.constructor===c)?(this._constructing=!0,l.apply(this,arguments),this._constructing=!1):arguments.length&&u.cast.apply(c,arguments))};return r.call(c,this),c.ancestor=this,c.prototype=o,c.valueOf=function(e){return e===t?c:l.valueOf()},r.call(c,a),typeof c.init===e&&c.init(),c},u.prototype.extend=function(l,c){if(typeof l===n&&arguments.length>1){var d=this[l];if(d&&typeof c===e&&(!d.valueOf||d.valueOf()!==c.valueOf())&&o.test(c)){var p=c.valueOf();c=function(){var e,t=this.base||s.base;return this.base=d,e=0===arguments.length?p.call(this):p.apply(this,arguments),this.base=t,e},c.valueOf=function(e){return e===t?c:p},c.toString=u.toString}this[l]=c}else if(l){var h=u.prototype.extend;i||typeof this===e||(h=this.extend||h);for(var f,m=i?0:1;r>m;m++)f=a[m],l[f]!==s[f]&&h.call(this,f,l[f]);for(f in l)s[f]||h.call(this,f,l[f])}return this},u=u.extend({base:s.base},{ancestor:Object,version:"1.1",cast:function(){for(var t,n,i=0,a=arguments.length;a>i;i++)n=arguments[i],t=n.extend||u.prototype.extend,typeof n===e?(t=n.prototype.extend||u.prototype.extend,t.call(n.prototype,this.prototype),t.call(n,this),n.ancestor=this):t.call(n,this.prototype);return this},implement:function(){for(var e=0;e<arguments.length;e++)this.cast.call(arguments[e],this);return this},toString:function(){return this.valueOf()+""}})}),function(e){var t=function(){var n=t.makeArray(arguments);if(0===n.length)return t.throwDefaultError("You must supply at least one argument. This argument can either be a DOM element against which Alpaca will generate a form or it can be a function name. See http://www.alpacajs.org for more details.");var i=n[0];i&&t.isString(i)&&(i=e("#"+i));var a=null,r=null,o=null,l=null,s=null,u=null,c=null,d=null,p=!1,h={},f=null,m=null,g=null,v=null,b=function(n,a){var r=null,o=e(n).attr("data-alpaca-field-id");if(o){var l=t.fieldInstances[o];l&&(r=l)}if(!r){var s=e(n).attr("data-alpaca-form-id");if(s){var u=e(n).find(":first");if(u.length>0){var c=e(u[0]).attr("data-alpaca-field-id");if(c){var d=t.fieldInstances[c];d&&(r=d)}}}}if(!r&&!a){var p=e(i).find(":first");if(p.length>0){var h=b(p[0],!0);h&&(r=h)}}if(!r&&!a){var f=e(i).parent();if(f){var m=b(f,!0);m&&(r=m)}}return r},y=["get","exists","destroy"],w=n.length>1&&t.isString(n[1])&&y.indexOf(n[1])>-1,x=b(i);if(x||w){if(w){var E=n[1];return"get"===E?x:"exists"===E?!!x:"destroy"===E?void(x&&x.destroy()):t.throwDefaultError("Unknown special function: "+E)}return x}var F=null;if(1===n.length){var C=e(i).text();F=JSON.parse(C),e(i).html("")}else F=t.isObject(n[1])?n[1]:t.isFunction(n[1])?n[1]():{data:n[1]};if(!F)return t.throwDefaultError("Unable to determine Alpaca configuration");if(a=F.data,r=F.schema,o=F.options,l=F.view,s=F.render,F.callback&&(s=F.callback),u=F.postRender,c=F.error,d=F.connector,f=F.dataSource,m=F.schemaSource,g=F.optionsSource,v=F.viewSource,F.ui&&(h.ui=F.ui),F.type&&(h.type=F.type),t.isEmpty(F.notTopLevel)||(p=F.notTopLevel),t.isEmpty(c)&&(c=t.defaultErrorCallback),!d||!d.connect){var T="default",S={};t.isString(d)?T=d:t.isObject(d)&&d.id&&(T=d.id,d.config&&(S=d.config));var k=t.getConnectorClass(T);k||(k=t.getConnectorClass("default")),d=new k(T,S)}var O=d;if(p){var A=t.getConnectorClass("default");O=new A("default")}o||(o={});var I=function(e){e.parent||(e.hideInitValidationError||e.refreshValidationState(!0),"view"!==e.view.type&&t.fieldApplyFieldAndChildren(e,function(e){e.hideInitValidationError=!1}))},M=function(e){e.parent||(e.observableScope=t.generateId()),e.parent||t.fireReady(e),t.isUndefined(o.focus)&&!e.parent&&(o.focus=t.defaultFocus),o&&o.focus?window.setTimeout(function(){var t=function(e){e.suspendBlurFocus=!0,e.focus(),e.suspendBlurFocus=!1};if(o.focus){if(e.isControlField&&e.isAutoFocusable())t(e);else if(e.isContainerField)if(o.focus===!0)e.children&&e.children.length>0&&t(e);else if("string"==typeof o.focus){var n=e.getControlByPath(o.focus);n&&n.isControlField&&n.isAutoFocusable()&&t(n)}I(e)}},500):I(e),u&&u(e)};O.loadAll({data:a,schema:r,options:o,view:l,dataSource:f,schemaSource:m,optionsSource:g,viewSource:v},function(e,n,u,p){return e=e?e:a,u=u?u:r,n=n?n:o,p=p?p:l,t.isEmpty(e)&&t.isEmpty(u)&&(t.isEmpty(n)||t.isEmpty(n.type))&&(e="",t.isEmpty(n)?n="text":o&&t.isObject(o)&&(n.type="text")),n.view&&(p=n.view),t.init(i,e,n,u,p,h,s,M,d,c)},function(e){return c(e),null})};t.Fields={},t.Connectors={},t.Extend=e.extend,t.Create=function(){var t=Array.prototype.slice.call(arguments);return t.unshift({}),e.extend.apply(this,t)},t.Extend(t,{makeArray:function(e){return Array.prototype.slice.call(e)},isFunction:function(e){return"[object Function]"===Object.prototype.toString.call(e)},isString:function(e){return"string"==typeof e},isObject:function(e){return!t.isUndefined(e)&&"[object Object]"===Object.prototype.toString.call(e)},isPlainObject:function(t){return e.isPlainObject(t)},isNumber:function(e){return"number"==typeof e},isArray:function(e){return e instanceof Array},isBoolean:function(e){return"boolean"==typeof e},isUndefined:function(e){return"undefined"==typeof e},trim:function(e){var n=e;return n&&t.isString(n)&&(n=n.replace(/^\s+|\s+$/g,"")),n},safeDomParse:function(n){if(n&&t.isString(n)){n=t.trim(n);var i=null;try{i=e(n)}catch(a){n="<div>"+n+"</div>",i=e(n).children()}return i}return n},isEmpty:function(e,n){var i=this;if(t.isUndefined(e))return!0;if(null===e)return!0;if(e&&t.isObject(e)){var a=i.countProperties(e,n);if(0===a)return!0}return!1},countProperties:function(e,n){var i=0;if(e&&t.isObject(e))for(var a in e)e.hasOwnProperty(a)&&(n?i++:"function"!=typeof e[a]&&i++);return i},copyOf:function(n){var i=n;if(t.isArray(n)){i=[];for(var a=0;a<n.length;a++)i.push(t.copyOf(n[a]))}else if(t.isObject(n)){if(n instanceof Date)return new Date(n.getTime());if(n instanceof RegExp)return new RegExp(n);if(n.nodeType&&"cloneNode"in n)i=n.cloneNode(!0);else if(e.isPlainObject(n)){i={};for(var r in n)n.hasOwnProperty(r)&&(i[r]=t.copyOf(n[r]))}}return i},copyInto:function(e,t){for(var n in t)t.hasOwnProperty(n)&&!this.isFunction(this[n])&&(e[n]=t[n])},cloneObject:function(e){return t.copyOf(e)},spliceIn:function(e,t,n){return e.substring(0,t)+n+e.substring(t,e.length)},compactArray:function(e){var t,n=[],i=e.length;for(t=0;i>t;t++)lang.isNull(e[t])||lang.isUndefined(e[t])||n.push(e[t]);return n},removeAccents:function(e){return e.replace(/[àáâãäå]/g,"a").replace(/[èéêë]/g,"e").replace(/[ìíîï]/g,"i").replace(/[òóôõö]/g,"o").replace(/[ùúûü]/g,"u").replace(/[ýÿ]/g,"y").replace(/[ñ]/g,"n").replace(/[ç]/g,"c").replace(/[œ]/g,"oe").replace(/[æ]/g,"ae")},indexOf:function(e,n,i){var a,r=n.length;for(t.isFunction(i)||(i=function(e,t){return e===t}),a=0;r>a;a++)if(i.call({},e,n[a]))return a;return-1},uniqueIdCounter:0,defaultLocale:"en_US",defaultFocus:!0,defaultSort:function(e,t){return e.text>t.text?1:e.text<t.text?-1:0},setDefaultLocale:function(e){this.defaultLocale=e},defaultSchemaFieldMapping:{},registerDefaultSchemaFieldMapping:function(e,t){e&&t&&(this.defaultSchemaFieldMapping[e]=t)},defaultFormatFieldMapping:{},registerDefaultFormatFieldMapping:function(e,t){e&&t&&(this.defaultFormatFieldMapping[e]=t)},getSchemaType:function(e){var n=null;return t.isEmpty(e)?n="string":t.isArray(e)?n="array":t.isObject(e)?n="object":t.isString(e)?n="string":t.isNumber(e)?n="number":t.isBoolean(e)&&(n="boolean"),n||"object"!=typeof e||(n="object"),n},guessOptionsType:function(e){var n=null;return n=e&&"undefined"!=typeof e["enum"]?e["enum"].length>3?"select":"radio":t.defaultSchemaFieldMapping[e.type],e.format&&t.defaultFormatFieldMapping[e.format]&&(n=t.defaultFormatFieldMapping[e.format]),n},views:{},generateViewId:function(){return"view-"+this.generateId()},registerView:function(e){var n=e.id;if(!n)return t.throwDefaultError("Cannot register view with missing view id: "+n);var i=this.views[n];if(i)t.mergeObject(i,e);else{this.views[n]=e,e.templates||(e.templates={});for(var a=t.TemplateEngineRegistry.ids(),r=0;r<a.length;r++){var o=a[r],l=t.TemplateEngineRegistry.find(o);if(l)for(var s=l.findCacheKeys(n),u=0;u<s.length;u++){var c=t.splitCacheKey(s[u]);e.templates[c.templateId]={type:o,template:!0,cacheKey:s[u]}}}}},getNormalizedView:function(e){return this.normalizedViews[e]},lookupNormalizedView:function(e,t){var n=null;for(var i in this.normalizedViews){var a=this.normalizedViews[i];if(a.ui===e&&a.type===t){n=i;break}}return n},registerTemplate:function(e,t,n){n||(n="base"),this.views[n]||(this.views[n]={},this.views[n].id=n),this.views[n].templates||(this.views[n].templates={}),this.views[n].templates[e]=t},registerTemplates:function(e,t){for(var n in e)this.registerTemplate(n,e[n],t)},registerMessage:function(e,t,n){n||(n="base"),this.views[n]||(this.views[n]={},this.views[n].id=n),this.views[n].messages||(this.views[n].messages={}),this.views[n].messages[e]=t},registerMessages:function(e,t){for(var n in e)e.hasOwnProperty(n)&&this.registerMessage(n,e[n],t)},defaultDateFormat:"MM/DD/YYYY",defaultTimeFormat:"HH:SS",regexps:{email:/^[a-z0-9!\#\$%&'\*\-\/=\?\+\-\^_`\{\|\}~]+(?:\.[a-z0-9!\#\$%&'\*\-\/=\?\+\-\^_`\{\|\}~]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z]{2,6}$/i,url:/^(http|https|ftp):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(\:[0-9]{1,5})?(\/.*)?$/i,"intranet-url":/^(http|https|ftp):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*(\:[0-9]{1,5})?(\/.*)?$/i,password:/^[0-9a-zA-Z\x20-\x7E]*$/,date:/^(0[1-9]|1[012])[- \/.](0[1-9]|[12][0-9]|3[01])[- \/.]\d\d$/,integer:/^([\+\-]?([1-9]\d*)|0)$/,number:/^([\+\-]?((([0-9]+(\.)?)|([0-9]*\.[0-9]+))([eE][+-]?[0-9]+)?))$/,phone:/^(\D?(\d{3})\D?\D?(\d{3})\D?(\d{4}))?$/,ipv4:/^(?:1\d?\d?|2(?:[0-4]\d?|[6789]|5[0-5]?)?|[3-9]\d?|0)(?:\.(?:1\d?\d?|2(?:[0-4]\d?|[6789]|5[0-5]?)?|[3-9]\d?|0)){3}$/,"zipcode-five":/^(\d{5})?$/,"zipcode-nine":/^(\d{5}(-\d{4})?)?$/,whitespace:/^\s+$/},fieldInstances:{},fieldClassRegistry:{},registerFieldClass:function(e,t){this.fieldClassRegistry[e]=t},getFieldClass:function(e){return this.fieldClassRegistry[e]},getFieldClassType:function(e){for(var t in this.fieldClassRegistry)if(this.fieldClassRegistry.hasOwnProperty(t)&&this.fieldClassRegistry[t]===e)return t;return null},connectorClassRegistry:{},registerConnectorClass:function(e,t){this.connectorClassRegistry[e]=t},getConnectorClass:function(e){return this.connectorClassRegistry[e]},replaceAll:function(e,t,n){return e.replace(new RegExp(t,"g"),n)},element:function(t,n,i,a){var r=e("<"+t+"/>");if(n&&r.attr(n),i&&r.css(i),a)for(var o in a)r.addClass(o)},elementFromTemplate:function(n,i){var a=n;if(i)for(var r in i)a=t.replaceAll(a,"${"+r+"}",i[r]);return e(a)},generateId:function(){return t.uniqueIdCounter++,"alpaca"+t.uniqueIdCounter},later:function(t,n,i,a,r){t=t||0,n=n||{};var o,l,s=i,u=e.makeArray(a);if("string"==typeof i&&(s=n[i]),!s)throw{name:"TypeError",message:"The function is undefined."};return o=function(){s.apply(n,u)},l=r?setInterval(o,t):setTimeout(o,t),{id:l,interval:r,cancel:function(){this.interval?clearInterval(l):clearTimeout(l)}}},endsWith:function(e,t){return-1!==e.indexOf(t,e.length-t.length)},startsWith:function(e,t){return e.substr(0,t.length)===t},isUri:function(e){return t.isString(e)&&(t.startsWith(e,"http://")||t.startsWith(e,"https://")||t.startsWith(e,"/")||t.startsWith(e,"./")||t.startsWith(e,"../"))},traverseObject:function(e,n,i){t.isString(n)&&(n=n.split("."));var a=null,r=e,o=null;do o=n.shift(),i&&o===i&&(o=n.shift()),t.isEmpty(r[o])?n=[]:(r=r[o],0===n.length&&(a=r));while(n.length>0);return a},each:function(e,n){if(t.isArray(e))for(var i=0;i<e.length;i++)n.apply(e[i]);else if(t.isObject(e))for(var a in e)n.apply(e[a])},merge:function(e,n,i){e||(e={});for(var a in n){var r=!0;i&&(r=i(a)),r&&(t.isEmpty(n[a])?e[a]=n[a]:t.isObject(n[a])?(e[a]||(e[a]={}),e[a]=t.merge(e[a],n[a])):e[a]=n[a])}return e},mergeObject:function(e,t){return e||(e={}),t||(t={}),this.mergeObject2(t,e),e},mergeObject2:function(n,i){var a=t.isArray,r=t.isObject,o=t.isUndefined,l=t.copyOf,s=function(t,n){return a(t)?a(n)&&e.each(t,function(e){n.push(l(t[e]))}):r(t)?r(n)&&e.each(t,function(e){o(n[e])?n[e]=l(t[e]):n[e]=s(t[e],n[e])}):n=l(t),n};return s(n,i),i},substituteTokens:function(e,n){if(!t.isEmpty(e))for(var i=0;i<n.length;i++){var a="{"+i+"}",r=e.indexOf(a);if(r>-1){var o=e.substring(0,r)+n[i]+e.substring(r+3);e=o}}return e},compareObject:function(e,t){return equiv(e,t)},compareArrayContent:function(t,n){var i=t&&n&&t.length===n.length;if(i)for(var a=t.length-1;a>=0;a--){var r=t[a];if(e.inArray(r,n)<0)return!1;
}return i},testRegex:function(e,t){var n=new RegExp(e);return n.test(t)},isValEmpty:function(n,i){var a=!1;return t.isEmpty(n,i)?a=!0:(t.isString(n)&&""===n&&(a=!0),t.isObject(n)&&e.isEmptyObject(n)&&(a=!0),t.isArray(n)&&0===n.length&&(a=!0)),a},init:function(e,n,i,a,r,o,l,s,u,c){var d=this;if(t.isObject(r)){var p=r.id;p||(r.id=this.generateViewId());var h=r.parent;h||(r.parent="bootstrap-edit"),this.registerView(r),r=r.id}this.compile(function(p){if(p.errors&&p.errors.length>0){for(var h=[],f=0;f<p.errors.length;f++){var m=p.errors[f].view,g=p.errors[f].cacheKey,v=p.errors[f].err,b="The template with cache key: "+g+" for view: "+m+" failed to compile";v&&v.message&&(b+=", message: "+v.message,h.push(v.message)),v&&(b+=", err: "+JSON.stringify(v)),t.logError(b),delete d.normalizedViews[m],delete d.views[m]}return t.throwErrorWithCallback("View compilation failed, cannot initialize Alpaca. "+h.join(", "),c)}d._init(e,n,i,a,r,o,l,s,u,c)},c)},_init:function(n,i,a,r,o,l,s,u,c,d){var p=this,h=t.defaultView||null,f=null;e.mobile&&!h&&(h="jquerymobile");var m="function"==typeof e.fn.modal;m&&!h&&(h="bootstrap");var g="undefined"!=typeof e.ui;if(g&&!h&&(h="jqueryui"),h&&(f=i?"edit":"create"),!o){var v=l.ui,b=l.type;v||(h||(h=t.defaultUI),h&&(v=h)),v&&(b||(b=f?f:"edit"),t.logDebug("No view provided but found request for UI: "+v+" and type: "+b),o=this.lookupNormalizedView(v,b),o?t.logDebug("Found view: "+o):t.logDebug("No view found for UI: "+v+" and type: "+b))}if(!o)return t.throwErrorWithCallback("A view was not specified and could not be automatically determined.",d);if(t.isString(o)&&!this.normalizedViews[o])return t.throwErrorWithCallback("The desired view: "+o+" could not be loaded. Please make sure it is loaded and not misspelled.",d);var y=t.createFieldInstance(n,i,a,r,o,c,d);if(y){e(n).addClass("alpaca-field-rendering"),e(n).addClass("alpaca-hidden"),t.fieldInstances[y.getId()]=y,y.allFieldInstances=function(){return t.fieldInstances},t.isEmpty(s)&&(s=y.view.render),t.isEmpty(u)&&(u=y.view.postRender);var w=function(){y.parent||y.getFieldEl().addClass("alpaca-"+p.getNormalizedView(o).type),y.parent||y.getFieldEl().addClass("alpaca-top"),e(n).removeClass("alpaca-field-rendering"),e(n).removeClass("alpaca-hidden"),y._oldFieldEl&&e(y._oldFieldEl).remove(),u(y)};t.isEmpty(s)?y.render(function(){w()}):s(y,function(){w()}),y.callback=s,y.renderedCallback=u}},createFieldInstance:function(e,n,i,a,r,o,l){if(t.isValEmpty(i,!0)&&(i={}),t.isValEmpty(a,!0)&&(a={}),i&&t.isString(i)){var s=i;i={},i.type=s}i.type||(a.type||(a.type=t.getSchemaType(n)),a.type||(n&&t.isArray(n)?a.type="array":a.type="object"),i.type=t.guessOptionsType(a));var u=t.getFieldClass(i.type);return u?new u(e,n,i,a,r,o,l):(l({message:"Unable to find field class for type: "+i.type,reason:"FIELD_INSTANTIATION_ERROR"}),null)},parseJSON:function(t){return t?e.parseJSON(t):null},compile:function(n,i){var a=this,r={errors:[],count:0,successCount:0},o=function(e){if(0===r.errors.length)for(var t in e)a.normalizedViews[t]=e[t];n(r)},l=function(e,t,n,i,a){var l=n.id;r.count++,t?r.errors.push({view:l,cacheKey:i,err:t}):r.successCount++,r.count==a&&o(e)},s=function(n,i,a,r,o,s,u){var c=t.makeCacheKey(i.id,a,r,o),d="text/x-handlebars-template";if(s&&t.isObject(s)&&(d=s.type,s.cacheKey&&(c=s.cacheKey),s=s.template),s&&"string"==typeof s){var p=s.toLowerCase();if(t.isUri(p));else if(!s||0!==s.indexOf("#")&&0!==s.indexOf(".")){if(s){var h=i.templates[s];h&&(s=h)}}else{var f=e(s);d=e(f).attr("type"),s=e(f).html()}}if(!d){t.logError("Engine type was empty");var m=new Error("Engine type was empty");return void l(n,m,i,c,u)}var g=t.TemplateEngineRegistry.find(d);if(!g){t.logError("Cannot find template engine for type: "+type);var m=new Error("Cannot find template engine for type: "+type);return void l(n,m,i,c,u)}if(s===!0){if(g.isCached(c))return void l(n,null,i,c,u);var v="View configuration for view: "+i.id+" claims to have precompiled template for cacheKey: "+c+" but it could not be found";return t.logError(v),void l(n,new Error(v),i,c,u)}return g.isCached(c)?void l(n,null,i,c,u):void g.compile(c,s,function(e){l(n,e,i,c,u)})},u=function(e){var t=[];for(var n in e){var i=e[n];if(i.templates)for(var a in i.templates){var r=i.templates[a];t.push(function(e,t,n,i,a,r){return function(o){s(e,t,n,i,a,r,o)}}(e,i,"view",i.id,a,r))}if(i.fields)for(var o in i.fields)if(i.fields[o].templates)for(var a in i.fields[o].templates){var r=i.fields[o].templates[a];t.push(function(e,t,n,i,a,r){return function(o){s(e,t,n,i,a,r,o)}}(e,i,"field",o,a,r))}if(i.layout&&i.layout.template){var r=i.layout.template;t.push(function(e,t,n,i,a,r){return function(o){s(e,t,n,i,a,r,o)}}(e,i,"layout","layout","layoutTemplate",r))}if(i.globalTemplate){var r=i.globalTemplate;t.push(function(e,t,n,i,a,r){return function(o){s(e,t,n,i,a,r,o)}}(e,i,"global","global","globalTemplate",r))}}for(var l=t.length,u=0;u<t.length;u++)t[u](l)},c=function(){var e={},n=0;t.normalizedViews||(t.normalizedViews={}),a.normalizedViews=t.normalizedViews;for(var r in a.views)if(!t.normalizedViews[r]){var l=new t.NormalizedView(r);if(!l.normalize(a.views))return t.throwErrorWithCallback("View normalization failed, cannot initialize Alpaca. Please check the error logs.",i);e[r]=l,n++}n>0?u(e):o(e)};c()},getTemplateDescriptor:function(e,n,i){var a=null,r=null,o=null;if(e.templates&&e.templates[n]){o=t.makeCacheKey(e.id,"view",e.id,n);var l=e.templates[n];t.isObject(l)&&l.cacheKey&&(o=l.cacheKey)}if(i&&i.path){var s=i.path;if(e&&e.fields&&s&&s.length>1){var u=function(i,a,r){if(a!=i.length){var o=i.slice(),l=!1,s=i[a],c=s.indexOf("[");c>-1&&(s=s.substring(0,c),l=!0),o[a]=s;var d=o.join("/");if(e.fields[d]&&e.fields[d].templates&&e.fields[d].templates[n]){var p=t.makeCacheKey(e.id,"field",d,n);p&&r.push({path:d,cacheKey:p})}u(i,a+1,r),l&&u(o,a+1,r)}},c=s.split("/"),d=[];u(c,0,d),d.length>0&&(o=d[0].cacheKey)}}if("globalTemplate"!==n&&"global"!==n||(o=t.makeCacheKey(e.id,"global","global","globalTemplate")),"layoutTemplate"!==n&&"layout"!==n||(o=t.makeCacheKey(e.id,"layout","layout","layoutTemplate")),o){for(var p=t.TemplateEngineRegistry.ids(),h=0;h<p.length;h++){var f=p[h],m=t.TemplateEngineRegistry.find(f);if(m.isCached(o)){r=f;break}}r&&(a={engine:r,cacheKey:o})}return a},tmpl:function(e,n){var i=t.tmplHtml(e,n);return t.safeDomParse(i)},tmplHtml:function(e,n){n||(n={});var i=e.engine,a=t.TemplateEngineRegistry.find(i);if(!a)return t.throwDefaultError("Cannot find template engine for type: "+i);var r=e.cacheKey,o=a.execute(r,n,function(e){var n=JSON.stringify(e);return e.message&&(n=e.message),t.throwDefaultError("The compiled template: "+r+" failed to execute: "+n)});return o}}),t.DEBUG=0,t.INFO=1,t.WARN=2,t.ERROR=3,t.logLevel=t.WARN,t.logDebug=function(e){t.log(t.DEBUG,e)},t.logInfo=function(e){t.log(t.INFO,e)},t.logWarn=function(e){t.log(t.WARN,e)},t.logError=function(e){t.log(t.ERROR,e)},t.LOG_METHOD_MAP={0:"debug",1:"info",2:"warn",3:"error"},t.log=function(e,n){if(t.logLevel<=e){var i=t.LOG_METHOD_MAP[e];"undefined"!=typeof console&&console[i]&&("debug"===i?console.debug(n):"info"===i?console.info(n):"warn"===i?console.warn(n):"error"===i?console.error(n):console.log(n))}},t.checked=function(e,n){return t.attrProp(e,"checked",n)},t.disabled=function(e,n){return t.attrProp(e,"disabled",n)},t.attrProp=function(t,n,i){return"undefined"!=typeof i&&(e(t).prop?e(t).prop(n,i):i?e(t).attr(n,i):e(t).removeAttr(n)),e(t).prop?e(t).prop(n):e(t).attr(n)},t.loadRefSchemaOptions=function(e,n,i){if(n)if("#"===n)i(e.schema,e.options);else if(0===n.indexOf("#/")){for(var a=n.substring(2),r=a.split("/"),o=e.schema,l=0;l<r.length;l++){var s=r[l];if(o[s])o=o[s];else if(o.properties&&o.properties[s])o=o.properties[s];else{if(!o.definitions||!o.definitions[s]){o=null;break}o=o.definitions[s]}}for(var u=e.options,l=0;l<r.length;l++){var s=r[l];if(u[s])u=u[s];else if(u.fields&&u.fields[s])u=u.fields[s];else{if(!u.definitions||!u.definitions[s]){u=null;break}u=u.definitions[s]}}i(o,u)}else if(0===n.indexOf("#")){var c=t.resolveReference(e.schema,e.options,n);c?i(c.schema,c.options):i()}else{var d=t.pathParts(n);e.connector.loadReferenceSchema(d.path,function(n){e.connector.loadReferenceOptions(d.path,function(e){if(d.id){var a=t.resolveReference(n,e,d.id);a&&(n=a.schema,e=a.options)}i(n,e)},function(){i(n)})},function(){i()})}else i()},t.DEFAULT_ERROR_CALLBACK=function(e){if(e&&e.message)throw t.logError(JSON.stringify(e)),new Error("Alpaca caught an error with the default error handler: "+JSON.stringify(e))},t.defaultErrorCallback=t.DEFAULT_ERROR_CALLBACK,t.throwDefaultError=function(e){e&&t.isObject(e)&&(e=JSON.stringify(e));var n={message:e};t.defaultErrorCallback(n)},t.throwErrorWithCallback=function(e,n){e&&t.isObject(e)&&(e=JSON.stringify(e));var i={message:e};n?n(i):t.defaultErrorCallback(i)},t.resolveReference=function(e,n,i){if(e.id===i||"#"+e.id===i){var a={};return e&&(a.schema=e),n&&(a.options=n),a}if(e.properties)for(var r in e.properties){var o=e.properties[r],l=null;n&&n.fields&&n.fields[r]&&(l=n.fields[r]);var s=t.resolveReference(o,l,i);if(s)return s}else if(e.items){var o=e.items,l=null;n&&n.items&&(l=n.items);var s=t.resolveReference(o,l,i);if(s)return s}return null},e.alpaca=window.Alpaca=t,e.fn.alpaca=function(){var n=t.makeArray(arguments),i=[].concat(this,n),a=t.apply(this,i);return"undefined"==typeof a&&(a=e(this)),a},e.fn.outerHTML=function(t){return t?e("<div></div>").append(this).html():e("<div></div>").append(this.clone()).html()},e.fn.swapWith=function(t){return this.each(function(){var n=e(t).clone(),i=e(this).clone();e(t).replaceWith(i),e(this).replaceWith(n)})},e.fn.attrProp=function(n,i){return t.attrProp(e(this),n,i)},e.event.special.destroyed={remove:function(e){e.handler&&e.handler()}},t.pathParts=function(e){if("string"!=typeof e)return e;var n=e,i=null,a=n.indexOf("#");a>-1&&(i=n.substring(a+1),n=n.substring(0,a)),t.endsWith(n,"/")&&(n=n.substring(0,n.length-1));var r={};return r.path=n,i&&(r.id=i),r},t.resolveField=function(e,n){var i=null;if("string"==typeof n)if(0===n.indexOf("#/")&&propertyId.length>2);else if("#"===n||"#/"===n)i=e;else if(0===n.indexOf("#")){for(var a=e;a.parent;)a=a.parent;var r=n.substring(1);i=t.resolveFieldByReference(a,r)}else i=e.childrenByPropertyId[n];return i},t.resolveFieldByReference=function(e,n){if(e.schema&&e.schema.id==n)return e;if(e.children&&e.children.length>0)for(var i=0;i<e.children.length;i++){var a=e.children[i],r=t.resolveFieldByReference(a,n);if(r)return r}return null},t.anyEquality=function(e,n){var i={};if("object"==typeof e||t.isArray(e))for(var a in e)i[e[a]]=!0;else i[e]=!0;var r=!1;if("object"==typeof n||t.isArray(n))for(var a in n){var o=n[a];if(i[o]){r=!0;break}}else r=i[n];return r},t.series=function(e,t){async.series(e,function(){t()})},t.parallel=function(e,t){async.parallel(e,function(){t()})},t.nextTick=function(e){async.nextTick(function(){e()})},t.compileValidationContext=function(e,t){var n=[],i=e;do i.isValidationParticipant()||(i=null),i&&n.push(i),i&&(i=i.parent);while(i);n.reverse();var a=[],r=function(e,t,n){if(!e||0===e.length)return n();var i=e[0],a={};a.id=i.getId(),a.field=i,a.path=i.path;var o=i.isValid();i.isContainer()&&(o=i.isValid(!0)),a.before=o;var l=function(e,n,i){var a=e._previouslyValidated;e.validate(),e._validateCustomValidator(function(){var r=e.isValid();e.isContainer()&&(r=e.isValid(!0)),n.after=r,n.validated=!1,n.invalidated=!1,!o&&r?n.validated=!0:o&&!r?n.invalidated=!0:a||r||(n.invalidated=!0),n.container=e.isContainer(),n.valid=n.after,t.push(n),i()})};if(e.length>1){var s=e.slice(0);s.shift(),r(s,t,function(){l(i,a,function(){n()})})}else l(i,a,function(){n()})};r(n,a,function(){t(a)})},t.updateValidationStateForContext=function(e,n){for(var i=0;i<n.length;i++){var a=n[i],r=a.field;if(r.getFieldEl().removeClass("alpaca-invalid alpaca-invalid-hidden alpaca-valid"),r.fireCallback("clearValidity"),a.valid)r.getFieldEl().addClass("alpaca-field-valid"),r.fireCallback("valid");else if(!r.options.readonly||t.showReadOnlyInvalidState){var o=!1;r.hideInitValidationError&&(o=!0),r.fireCallback("invalid",o),r.getFieldEl().addClass("alpaca-invalid"),o&&r.getFieldEl().addClass("alpaca-invalid-hidden")}else t.logWarn("The field (id="+r.getId()+", title="+r.getTitle()+", path="+r.path+") is invalid and also read-only");if(a.validated?t.later(25,this,function(){r.trigger("validated")}):a.invalidated&&t.later(25,this,function(){r.trigger("invalidated")}),r.options.showMessages&&!r.initializing&&(!r.options.readonly||t.showReadOnlyInvalidState)){var l=[];for(var s in r.validation)r.validation[s].status||l.push({id:s,message:r.validation[s].message});r.displayMessage(l,r.valid)}}},t.fieldApplyFieldAndChildren=function(e,n){if(n(e),e.children&&e.children.length>0)for(var i=0;i<e.children.length;i++)t.fieldApplyFieldAndChildren(e.children[i],n)},t.replaceAll=function(e,t,n){return e.replace(new RegExp(t,"g"),n)},t.asArray=function(e){if(!t.isArray(e)){var n=[];return n.push(e),n}return e},function(){function e(e){var t=!1;return function | ){if(t)throw new Error("Callback was already called.");t=!0,e.apply(i,arguments)}}function t(e){return e.constructor===String?"string":e.constructor===Boolean?"boolean":e.constructor===Number?isNaN(e)?"nan":"number":"undefined"==typeof e?"undefined":null===e?"null":e instanceof Array?"array":e instanceof Date?"date":e instanceof RegExp?"regexp":"object"==typeof e?"object":e instanceof Function?"function":void 0}function n(e,n,i){var a=t(e);return a?"function"===t(n[a])?n[a].apply(n,i):n[a]:void 0}var i,a,r={};i=this,null!=i&&(a=i.async),r.noConflict=function(){return i.async=a,r};var o=function(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n<e.length;n+=1)t(e[n],n,e)},l=function(e,t){if(e.map)return e.map(t);var n=[];return o(e,function(e,i,a){n.push(t(e,i,a))}),n},s=function(e,t,n){return e.reduce?e.reduce(t,n):(o(e,function(e,i,a){n=t(n,e,i,a)}),n)},u=function(e){if(Object.keys)return Object.keys(e);var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t};"undefined"!=typeof process&&process.nextTick?(r.nextTick=process.nextTick,"undefined"!=typeof setImmediate?r.setImmediate=function(e){setImmediate(e)}:r.setImmediate=r.nextTick):"function"==typeof setImmediate?(r.nextTick=function(e){setImmediate(e)},r.setImmediate=r.nextTick):(r.nextTick=function(e){setTimeout(e,0)},r.setImmediate=r.nextTick),r.each=function(t,n,i){if(i=i||function(){},!t.length)return i();var a=0;o(t,function(r){n(r,e(function(e){e?(i(e),i=function(){}):(a+=1,a>=t.length&&i(null))}))})},r.forEach=r.each,r.eachSeries=function(e,t,n){if(n=n||function(){},!e.length)return n();var i=0,a=function(){t(e[i],function(t){t?(n(t),n=function(){}):(i+=1,i>=e.length?n(null):a())})};a()},r.forEachSeries=r.eachSeries,r.eachLimit=function(e,t,n,i){var a=c(t);a.apply(null,[e,n,i])},r.forEachLimit=r.eachLimit;var c=function(e){return function(t,n,i){if(i=i||function(){},!t.length||0>=e)return i();var a=0,r=0,o=0;!function l(){if(a>=t.length)return i();for(;e>o&&r<t.length;)r+=1,o+=1,n(t[r-1],function(e){e?(i(e),i=function(){}):(a+=1,o-=1,a>=t.length?i():l())})}()}},d=function(e){return function(){var t=Array.prototype.slice.call(arguments);return e.apply(null,[r.each].concat(t))}},p=function(e,t){return function(){var n=Array.prototype.slice.call(arguments);return t.apply(null,[c(e)].concat(n))}},h=function(e){return function(){var t=Array.prototype.slice.call(arguments);return e.apply(null,[r.eachSeries].concat(t))}},f=function(e,t,n,i){var a=[];t=l(t,function(e,t){return{index:t,value:e}}),e(t,function(e,t){n(e.value,function(n,i){a[e.index]=i,t(n)})},function(e){i(e,a)})};r.map=d(f),r.mapSeries=h(f),r.mapLimit=function(e,t,n,i){return m(t)(e,n,i)};var m=function(e){return p(e,f)};r.reduce=function(e,t,n,i){r.eachSeries(e,function(e,i){n(t,e,function(e,n){t=n,i(e)})},function(e){i(e,t)})},r.inject=r.reduce,r.foldl=r.reduce,r.reduceRight=function(e,t,n,i){var a=l(e,function(e){return e}).reverse();r.reduce(a,t,n,i)},r.foldr=r.reduceRight;var g=function(e,t,n,i){var a=[];t=l(t,function(e,t){return{index:t,value:e}}),e(t,function(e,t){n(e.value,function(n){n&&a.push(e),t()})},function(e){i(l(a.sort(function(e,t){return e.index-t.index}),function(e){return e.value}))})};r.filter=d(g),r.filterSeries=h(g),r.select=r.filter,r.selectSeries=r.filterSeries;var v=function(e,t,n,i){var a=[];t=l(t,function(e,t){return{index:t,value:e}}),e(t,function(e,t){n(e.value,function(n){n||a.push(e),t()})},function(e){i(l(a.sort(function(e,t){return e.index-t.index}),function(e){return e.value}))})};r.reject=d(v),r.rejectSeries=h(v);var b=function(e,t,n,i){e(t,function(e,t){n(e,function(n){n?(i(e),i=function(){}):t()})},function(e){i()})};r.detect=d(b),r.detectSeries=h(b),r.some=function(e,t,n){r.each(e,function(e,i){t(e,function(e){e&&(n(!0),n=function(){}),i()})},function(e){n(!1)})},r.any=r.some,r.every=function(e,t,n){r.each(e,function(e,i){t(e,function(e){e||(n(!1),n=function(){}),i()})},function(e){n(!0)})},r.all=r.every,r.sortBy=function(e,t,n){r.map(e,function(e,n){t(e,function(t,i){t?n(t):n(null,{value:e,criteria:i})})},function(e,t){if(e)return n(e);var i=function(e,t){var n=e.criteria,i=t.criteria;return i>n?-1:n>i?1:0};n(null,l(t.sort(i),function(e){return e.value}))})},r.auto=function(e,t){t=t||function(){};var n=u(e);if(!n.length)return t(null);var i={},a=[],l=function(e){a.unshift(e)},c=function(e){for(var t=0;t<a.length;t+=1)if(a[t]===e)return void a.splice(t,1)},d=function(){o(a.slice(0),function(e){e()})};l(function(){u(i).length===n.length&&(t(null,i),t=function(){})}),o(n,function(n){var a=e[n]instanceof Function?[e[n]]:e[n],p=function(e){var a=Array.prototype.slice.call(arguments,1);if(a.length<=1&&(a=a[0]),e){var l={};o(u(i),function(e){l[e]=i[e]}),l[n]=a,t(e,l),t=function(){}}else i[n]=a,r.setImmediate(d)},h=a.slice(0,Math.abs(a.length-1))||[],f=function(){return s(h,function(e,t){return e&&i.hasOwnProperty(t)},!0)&&!i.hasOwnProperty(n)};if(f())a[a.length-1](p,i);else{var m=function(){f()&&(c(m),a[a.length-1](p,i))};l(m)}})},r.waterfall=function(e,t){if(t=t||function(){},e.constructor!==Array){var n=new Error("First argument to waterfall must be an array of functions");return t(n)}if(!e.length)return t();var i=function(e){return function(n){if(n)t.apply(null,arguments),t=function(){};else{var a=Array.prototype.slice.call(arguments,1),o=e.next();o?a.push(i(o)):a.push(t),r.setImmediate(function(){e.apply(null,a)})}}};i(r.iterator(e))()};var y=function(e,t,n){if(n=n||function(){},t.constructor===Array)e.map(t,function(e,t){e&&e(function(e){var n=Array.prototype.slice.call(arguments,1);n.length<=1&&(n=n[0]),t.call(null,e,n)})},n);else{var i={};e.each(u(t),function(e,n){t[e](function(t){var a=Array.prototype.slice.call(arguments,1);a.length<=1&&(a=a[0]),i[e]=a,n(t)})},function(e){n(e,i)})}};r.parallel=function(e,t){y({map:r.map,each:r.each},e,t)},r.parallelLimit=function(e,t,n){y({map:m(t),each:c(t)},e,n)},r.series=function(e,t){if(t=t||function(){},e.constructor===Array)r.mapSeries(e,function(e,t){e&&e(function(e){var n=Array.prototype.slice.call(arguments,1);n.length<=1&&(n=n[0]),t.call(null,e,n)})},t);else{var n={};r.eachSeries(u(e),function(t,i){e[t](function(e){var a=Array.prototype.slice.call(arguments,1);a.length<=1&&(a=a[0]),n[t]=a,i(e)})},function(e){t(e,n)})}},r.iterator=function(e){var t=function(n){var i=function(){return e.length&&e[n].apply(null,arguments),i.next()};return i.next=function(){return n<e.length-1?t(n+1):null},i};return t(0)},r.apply=function(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t.concat(Array.prototype.slice.call(arguments)))}};var w=function(e,t,n,i){var a=[];e(t,function(e,t){n(e,function(e,n){a=a.concat(n||[]),t(e)})},function(e){i(e,a)})};r.concat=d(w),r.concatSeries=h(w),r.whilst=function(e,t,n){e()?t(function(i){return i?n(i):void r.whilst(e,t,n)}):n()},r.doWhilst=function(e,t,n){e(function(i){return i?n(i):void(t()?r.doWhilst(e,t,n):n())})},r.until=function(e,t,n){e()?n():t(function(i){return i?n(i):void r.until(e,t,n)})},r.doUntil=function(e,t,n){e(function(i){return i?n(i):void(t()?n():r.doUntil(e,t,n))})},r.queue=function(t,n){function i(e,t,i,a){t.constructor!==Array&&(t=[t]),o(t,function(t){var o={data:t,callback:"function"==typeof a?a:null};i?e.tasks.unshift(o):e.tasks.push(o),e.saturated&&e.tasks.length===n&&e.saturated(),r.setImmediate(e.process)})}void 0===n&&(n=1);var a=0,l={tasks:[],concurrency:n,saturated:null,empty:null,drain:null,push:function(e,t){i(l,e,!1,t)},unshift:function(e,t){i(l,e,!0,t)},process:function(){if(a<l.concurrency&&l.tasks.length){var n=l.tasks.shift();l.empty&&0===l.tasks.length&&l.empty(),a+=1;var i=function(){a-=1,n.callback&&n.callback.apply(n,arguments),l.drain&&l.tasks.length+a===0&&l.drain(),l.process()},r=e(i);t(n.data,r)}},length:function(){return l.tasks.length},running:function(){return a}};return l},r.cargo=function(e,t){var n=!1,i=[],a={tasks:i,payload:t,saturated:null,empty:null,drain:null,push:function(e,n){e.constructor!==Array&&(e=[e]),o(e,function(e){i.push({data:e,callback:"function"==typeof n?n:null}),a.saturated&&i.length===t&&a.saturated()}),r.setImmediate(a.process)},process:function s(){if(!n){if(0===i.length)return void(a.drain&&a.drain());var r="number"==typeof t?i.splice(0,t):i.splice(0),u=l(r,function(e){return e.data});a.empty&&a.empty(),n=!0,e(u,function(){n=!1;var e=arguments;o(r,function(t){t.callback&&t.callback.apply(null,e)}),s()})}},length:function(){return i.length},running:function(){return n}};return a};var x=function(e){return function(t){var n=Array.prototype.slice.call(arguments,1);t.apply(null,n.concat([function(t){var n=Array.prototype.slice.call(arguments,1);"undefined"!=typeof console&&(t?console.error&&console.error(t):console[e]&&o(n,function(t){console[e](t)}))}]))}};r.log=x("log"),r.dir=x("dir"),r.memoize=function(e,t){var n={},i={};t=t||function(e){return e};var a=function(){var a=Array.prototype.slice.call(arguments),r=a.pop(),o=t.apply(null,a);o in n?r.apply(null,n[o]):o in i?i[o].push(r):(i[o]=[r],e.apply(null,a.concat([function(){n[o]=arguments;var e=i[o];delete i[o];for(var t=0,a=e.length;a>t;t++)e[t].apply(null,arguments)}])))};return a.memo=n,a.unmemoized=e,a},r.unmemoize=function(e){return function(){return(e.unmemoized||e).apply(null,arguments)}},r.times=function(e,t,n){for(var i=[],a=0;e>a;a++)i.push(a);return r.map(i,t,n)},r.timesSeries=function(e,t,n){for(var i=[],a=0;e>a;a++)i.push(a);return r.mapSeries(i,t,n)},r.compose=function(){var e=Array.prototype.reverse.call(arguments);return function(){var t=this,n=Array.prototype.slice.call(arguments),i=n.pop();r.reduce(e,n,function(e,n,i){n.apply(t,e.concat([function(){var e=arguments[0],t=Array.prototype.slice.call(arguments,1);i(e,t)}]))},function(e,n){i.apply(t,[e].concat(n))})}};var E=function(e,t){var n=function(){var n=this,i=Array.prototype.slice.call(arguments),a=i.pop();return e(t,function(e,t){e.apply(n,i.concat([t]))},a)};if(arguments.length>2){var i=Array.prototype.slice.call(arguments,2);return n.apply(this,i)}return n};r.applyEach=d(E),r.applyEachSeries=h(E),r.forever=function(e,t){function n(i){if(i){if(t)return t(i);throw i}e(n)}n()},i.async=r;i.equiv=function(){var e,i=[],a=function(){function n(e,t){return e instanceof t.constructor||t instanceof e.constructor?t==e:t===e}return{string:n,"boolean":n,number:n,"null":n,undefined:n,nan:function(e){return isNaN(e)},date:function(e,n){return"date"===t(e)&&n.valueOf()===e.valueOf()},regexp:function(e,n){return"regexp"===t(e)&&n.source===e.source&&n.global===e.global&&n.ignoreCase===e.ignoreCase&&n.multiline===e.multiline},"function":function(){var e=i[i.length-1];return e!==Object&&"undefined"!=typeof e},array:function(n,i){var a,r;if("array"!==t(n))return!1;if(r=i.length,r!==n.length)return!1;for(a=0;r>a;a++)if(!e(i[a],n[a]))return!1;return!0},object:function(t,n){var a,r=!0,o=[],l=[];if(n.constructor!==t.constructor)return!1;i.push(n.constructor);for(a in n)o.push(a),e(n[a],t[a])||(r=!1);i.pop();for(a in t)l.push(a);return r&&e(o.sort(),l.sort())}}}();return e=function(){var e=Array.prototype.slice.apply(arguments);return e.length<2?!0:function(e,i){return e===i?!0:null===e||null===i||"undefined"==typeof e||"undefined"==typeof i||t(e)!==t(i)?!1:n(e,a,[i,e])}(e[0],e[1])&&arguments.callee.apply(this,e.splice(1,e.length-1))}}()}(),t.MARKER_CLASS_CONTROL_FIELD="alpaca-marker-control-field",t.MARKER_CLASS_CONTAINER_FIELD="alpaca-marker-container-field",t.MARKER_CLASS_CONTAINER_FIELD_ITEM="alpaca-marker-control-field-item",t.MARKER_DATA_CONTAINER_FIELD_ITEM_KEY="data-alpaca-container-field-item-key",t.MARKER_CLASS_FORM_ITEMS_FIELD="alpaca-marker-form-items-field",t.CLASS_CONTAINER="alpaca-container",t.CLASS_CONTROL="alpaca-control",t.MARKER_CLASS_INSERT="alpaca-marker-insert",t.MARKER_DATA_INSERT_KEY="data-alpaca-marker-insert-key",t.MARKER_CLASS_ARRAY_TOOLBAR="alpaca-marker-array-field-toolbar",t.MARKER_DATA_ARRAY_TOOLBAR_FIELD_ID="data-alpaca-array-field-toolbar-field-id",t.MARKER_CLASS_ARRAY_ITEM_ACTIONBAR="alpaca-marker-array-field-item-actionbar",t.MARKER_DATA_ARRAY_ITEM_KEY="data-alpaca-marker-array-field-item-key",t.MARKER_DATA_ARRAY_ITEM_PARENT_FIELD_ID="data-alpaca-marker-array-field-item-parent-field-id",t.MARKER_CLASS_CONTAINER_FIELD_ITEM_FIELD="alpaca-marker-container-field-item-field",t.makeCacheKey=function(e,t,n,i){return e+":"+t+":"+n+":"+i},t.splitCacheKey=function(e){var t={},n=e.indexOf(":"),i=e.lastIndexOf(":");t.viewId=e.substring(0,n),t.templateId=e.substring(i+1);var a=e.substring(n+1,i),r=a.indexOf(":");return t.scopeType=a.substring(0,r),t.scopeId=a.substring(r+1),t},t.createEmptyDataInstance=function(e){return e?"object"===e.type?{}:"array"===e.type?[]:"number"===e.type?-1:"boolean"===e.type?!1:"":""},t.animatedSwap=function(t,n,i,a){"function"==typeof i&&(a=i,i=500);var r=function(t,n,i,a){var r=e(t),o=e(n),l=r.offset(),s=o.offset(),u=r.clone(),c=o.clone(),d=s.top+o.height()-l.top,p=0,h=0,f=s.left+o.width()-l.left,m=0,g=0;r.css("opacity",0),o.css("opacity",0),u.insertAfter(r).css({position:"absolute",width:r.outerWidth(),height:r.outerHeight()}).offset(l).css("z-index","999"),c.insertAfter(o).css({position:"absolute",width:o.outerWidth(),height:o.outerHeight()}).offset(s).css("z-index","999"),l.top!==s.top&&(p=d-r.height()),h=d-o.height(),l.left!==s.left&&(m=f-r.width()),g=f-o.width(),u.animate({top:"+="+p+"px",left:"+="+m+"px"},i,function(){o.css("opacity",1),e(this).remove()}),c.animate({top:"-="+h+"px",left:"-="+g+"px"},i,function(){r.css("opacity",1),e(this).remove()}),window.setTimeout(function(){u.remove(),c.remove(),a()},i+1)};r(t,n,i,a)},t.animatedMove=function(t,n,i,a){"function"==typeof i&&(a=i,i=500);var r=function(t,n,i,a){var r=e(t),o=e(n),l=r.offset(),s=o.offset(),u=r.clone(),c=s.top+o.height()-l.top,d=0,p=0,h=s.left+o.width()-l.left,f=0,m=0;r.css("opacity",0),o.css("opacity",0),u.insertAfter(r).css({position:"absolute",width:r.outerWidth(),height:r.outerHeight()}).offset(l).css("z-index","999"),l.top!==s.top&&(d=c-r.height()),p=c-o.height(),l.left!==s.left&&(f=h-r.width()),m=h-o.width(),u.animate({top:"+="+d+"px",left:"+="+f+"px"},i,function(){o.css("opacity",1),e(this).remove()}),window.setTimeout(function(){u.remove(),a()},i+1)};r(t,n,i,a)},t.fireReady=function(e){if(e.children&&e.children.length>0)for(var n=0;n<e.children.length;n++)t.fireReady(e.children[n]);e.trigger("ready")},t.readCookie=function(e){function t(e){for(var t=e+"=",n=document.cookie.split(";"),i=0;i<n.length;i++){for(var a=n[i];" "==a.charAt(0);)a=a.substring(1,a.length);if(0==a.indexOf(t))return a.substring(t.length,a.length)}return null}var n=null;return"undefined"!=typeof document&&(n=t(e)),n},t.safeSetObjectArray=function(e,t,n){"undefined"==typeof e[t]||null===e[t]?e[t]=[]:e[t].length=0;for(var i=0;i<n.length;i++)e[t].push(n[i])},t.moment=function(){if(t._moment||window.moment&&(t._moment=window.moment),!t._moment)throw new Error("The moment.js library has not been included, cannot produce moment object");return t._moment.call(this,arguments)},t.CSRF_TOKEN=null,t.CSRF_COOKIE_NAMES=["CSRF-TOKEN","XSRF-TOKEN"],t.CSRF_HEADER_NAME="X-CSRF-TOKEN",t.defaultToolbarSticky=void 0,t.showReadOnlyInvalidState=!1}(jQuery),function(e){var t=e.alpaca;t.listenerId=function(){var e=0;return function(){return"listener-"+e++}}(),t.subscribe=function(){var e=t.makeArray(arguments),n=null,i=null,a=null;if(2==e.length?(n="global",i=e.shift(),a=e.shift()):(n=e.shift(),i=e.shift(),a=e.shift()),i&&t.isObject(i)&&(i=i.path),!i)return t.logError("Missing observable subscribe id: "+i),null;var r=a._lfid;r||(r=t.listenerId(),a._lfid=r);var o=function(e){return function(){return a.apply(e,arguments)}}(this);o._lfid=a._lfid;var l=t.ScopedObservables.get(n),s=l.observable(i);return s.subscribe(r,o),{scope:n,id:i,listenerId:r}},t.unsubscribe=function(){var e=t.makeArray(arguments),n=null,i=null,a=null;2==e.length?(n="global",i=e.shift(),a=e.shift()):3==e.length&&(n=e.shift(),i=e.shift(),a=e.shift());var r=a;if(t.isFunction(r)&&(r=r._lfid),i&&t.isObject(i)&&(i=i.path),!i)return t.logError("Missing observable id: "+i),null;var o=t.ScopedObservables.get(n),l=o.observable(i);return l.unsubscribe(r),{scope:n,id:i,listenerId:r}},t.observable=function(){var e,n,i=t.makeArray(arguments);if(1==i.length?(e="global",n=i.shift()):2==i.length&&(e=i.shift(),n=i.shift()),n&&t.isObject(n)&&(n=n.path),n){var a=t.ScopedObservables.get(e);observable=a.observable(n)}else t.logError("Missing observable id: "+JSON.stringify(i));return observable},t.clearObservable=function(){var e,n,i=t.makeArray(arguments);1==i.length?(e="global",n=i.shift()):2==i.length&&(e=i.shift(),n=i.shift()),n&&t.isObject(n)&&(n=n.path),n||t.logError("Missing observable id: "+JSON.stringify(i));var a=t.ScopedObservables.get(e),r=a.observable(n);r.clear()},t.dependentObservable=function(){var e=null,n=null,i=null,a=t.makeArray(arguments);if(2==a.length)e="global",n=a.shift(),i=a.shift();else{if(3!=a.length)return void t.error("Wrong number of arguments");e=a.shift(),n=a.shift(),i=a.shift()}n&&t.isObject(n)&&(n=n.path),n||t.logError("Missing observable id: "+JSON.stringify(a));var r=t.ScopedObservables.get(e);return r.dependentObservable(n,i)}}(jQuery),function(e){var t=e.alpaca;t.Observables=Base.extend({constructor:function(e){this.base(),this.scope=e,this.observables={}},observable:function(e,n){if(!this.observables[e]){var i=new t.Observable(this.scope,e);n&&i.set(n),this.observables[e]=i}return this.observables[e]},dependentObservable:function(e,n){var i=this;if(!this.observables[e]){var a=this.observable(e),r=new t.Observables(this.scope);r.observable=function(e,t){var n=i.observable(e,t);return n.markDependentOnUs(a),n};var o=function(){return n.call(r)};a.setValueFunction(o)}return this.observables[e]},observables:function(){return this.observables}})}(jQuery),function(e){var t=e.alpaca;t.Observable=Base.extend({constructor:function(t,n){this.base(),this.id=t+"-"+n,this.value=null,this.subscribers={},this.dependentOnUs={},this.notifySubscribers=function(t){var n=this;e.each(this.subscribers,function(e,i){i(n.value,t)})},this.notifyDependents=function(t){e.each(this.dependentOnUs,function(e,t){t.onDependencyChange()})},this.valueFunction=null},setValueFunction:function(e){this.valueFunction=e,this.onDependencyChange()},subscribe:function(e,t){this.isSubscribed(e)||(this.subscribers[e]=t)},unsubscribe:function(e){delete this.subscribers[e]},isSubscribed:function(e){return!!this.subscribers[e]},markDependentOnUs:function(e){this.dependentOnUs[e.id]=e},onDependencyChange:function(){var e=this.get();if(this.valueFunction){var t=this.valueFunction();e!=t&&this.set(t)}},set:function(e){var t=this.value;this.value=e,this.notifyDependents(t),this.notifySubscribers(t)},get:function(e){var t=this.value;return t||(t=e),t},clear:function(){var e=this.value;delete this.value,this.notifyDependents(e),this.notifySubscribers(e)}})}(jQuery),function(e){var t=e.alpaca;t.ScopedObservables={},t.ScopedObservables.map={},
t.ScopedObservables.get=function(e){return t.ScopedObservables.map[e]||(t.ScopedObservables.map[e]=new t.Observables(e)),t.ScopedObservables.map[e]}}(jQuery),function(){Alpaca.TemplateEngineRegistry=function(){var e={};return{register:function(t,n){e[t]=n,n.init()},find:function(t){var n=null;if(e[t])n=e[t];else for(var i in e)for(var a=e[i].supportedMimetypes(),r=0;r<a.length;r++)if(t.toLowerCase()===a[r].toLowerCase()){n=e[i];break}return n},ids:function(){var t=[];for(var n in e)t.push(n);return t}}}()}(),function(e){Alpaca.AbstractTemplateEngine=Base.extend({constructor:function(t){this.base(),this.id=t,this.cleanup=function(t){return t&&1===e(t).length&&"script"===e(t)[0].nodeName.toLowerCase()?e(t).html():t}},compile:function(t,n,i){var a=this,r="html";if(Alpaca.isString(n)){var o=n.toLowerCase();Alpaca.isUri(o)?r="uri":0!==n.indexOf("#")&&0!==n.indexOf(".")&&0!==n.indexOf("[")||(r="selector")}if("selector"===r)a._compile(t,n,function(e){i(e)});else if("uri"===r){var l=a.fileExtension(),s=n;-1===s.indexOf("."+l)&&(s+="."+l),e.ajax({url:s,dataType:"html",success:function(e,n,r){e=a.cleanup(e),a._compile(t,e,function(e){i(e)})},error:function(e,t){i({message:e.responseText,xhr:e,code:t},null)}})}else if("html"===r){var u=n;u instanceof jQuery&&(u=e(u).outerHTML()),a._compile(t,u,function(e){i(e)})}else i(new Error("Template engine cannot determine how to handle type: "+r))},_compile:function(e,t,n){Alpaca.isEmpty(t)&&(t=""),t=Alpaca.trim(t),0===t.toLowerCase().indexOf("<script")||(t="<script type='"+this.supportedMimetypes()[0]+"'>"+t+"</script>"),Alpaca.logDebug("Compiling template: "+this.id+", cacheKey: "+e+", template: "+t),this.doCompile(e,t,n)},doCompile:function(e,t,n){},execute:function(e,t,n){Alpaca.logDebug("Executing template for cache key: "+e);var i=this.doExecute(e,t,n);return i=this.cleanup(i)},doExecute:function(e,t,n){return null},fileExtension:function(){return"html"},supportedMimetypes:function(){return[]},isCached:function(e){return!1},findCacheKeys:function(e){return[]}})}(jQuery),function($,Handlebars,HandlebarsPrecompiled){var COMPILED_TEMPLATES={},helpers={};helpers.compare=function(e,t,n){if(arguments.length<3)throw new Error("Handlerbars Helper 'compare' needs 2 parameters");var i=n.hash.operator||"==",a={"==":function(e,t){return e==t},"===":function(e,t){return e===t},"!=":function(e,t){return e!=t},"!==":function(e,t){return e!==t},"<":function(e,t){return t>e},">":function(e,t){return e>t},"<=":function(e,t){return t>=e},">=":function(e,t){return e>=t},"typeof":function(e,t){return typeof e==t}};if(!a[i])throw new Error("Handlerbars Helper 'compare' doesn't know the operator "+i);var r=a[i](e,t);return r?n.fn(this):n.inverse(this)},helpers.ifnot=function(e,t){return e?t.inverse(this):t.fn(this)},helpers.times=function(e,t){for(var n="",i=0;e>i;++i)n+=t.fn(i);return n},helpers.control=function(e){return"<div class='"+Alpaca.MARKER_CLASS_CONTROL_FIELD+"'></div>"},helpers.container=function(e){return"<div class='"+Alpaca.MARKER_CLASS_CONTAINER_FIELD+"'></div>"},helpers.item=function(e,t){return Alpaca.isObject(e)&&(t=e,e="div"),"<"+e+" class='"+Alpaca.MARKER_CLASS_CONTAINER_FIELD_ITEM+"' "+Alpaca.MARKER_DATA_CONTAINER_FIELD_ITEM_KEY+"='"+this.name+"'></"+e+">"},helpers.itemField=function(e,t){return Alpaca.isObject(e)&&(t=e,e="div"),"<"+e+" class='"+Alpaca.MARKER_CLASS_CONTAINER_FIELD_ITEM_FIELD+"'></"+e+">"},helpers.formItems=function(e){return"<div class='"+Alpaca.MARKER_CLASS_FORM_ITEMS_FIELD+"'></div>"},helpers.insert=function(e){return"<div class='"+Alpaca.MARKER_CLASS_INSERT+"' "+Alpaca.MARKER_DATA_INSERT_KEY+"='"+e+"'></div>"},helpers.str=function(e){return e===!1?"false":e===!0?"true":0===e?"0":"undefined"==typeof e?"":null===e?"":Alpaca.isString(e)?e:Alpaca.isNumber(e)?e:Alpaca.isObject(e)?JSON.stringify(e,null," "):Alpaca.isArray(e)?JSON.stringify(e,null," "):e},helpers.arrayToolbar=function(e){return"<div class='"+Alpaca.MARKER_CLASS_ARRAY_TOOLBAR+"' "+Alpaca.MARKER_DATA_ARRAY_TOOLBAR_FIELD_ID+"='"+this.id+"'></div>"},helpers.arrayActionbar=function(e){return"<div class='"+Alpaca.MARKER_CLASS_ARRAY_ITEM_ACTIONBAR+"' "+Alpaca.MARKER_DATA_ARRAY_ITEM_KEY+"='"+this.name+"' "+Alpaca.MARKER_DATA_ARRAY_ITEM_PARENT_FIELD_ID+"='"+this.parentFieldId+"'></div>"},Handlebars.registerHelper("arrayToolbar",helpers.arrayToolbar),Handlebars.registerHelper("arrayActionbar",helpers.arrayActionbar),Handlebars.registerHelper("setIndex",function(e){this.index=Number(e)}),Handlebars.registerHelper("eachProperty",function(e,t){var n="";for(var i in e)n+=t.fn({key:i,value:e[i]});return n}),Handlebars.registerHelper("uploadErrorMessage",function(e){var t=e;return 1===e?t="File exceeds upload_max_filesize":2===e?t="File exceeds MAX_FILE_SIZE":3===e?t="File was only partially uploaded":4===e?t="No File was uploaded":5===e?t="Missing a temporary folder":6===e?t="Failed to write file to disk":7===e?t="File upload stopped by extension":"maxFileSize"===e?t="File is too big":"minFileSize"===e?t="File is too small":"acceptFileTypes"===e?t="Filetype not allowed":"maxNumberOfFiles"===e?t="Max number of files exceeded":"uploadedBytes"===e?t="Uploaded bytes exceed file size":"emptyResult"===e&&(t="Empty file upload result"),t}),Handlebars.registerHelper("disguise",function(e,t){for(var n="",i=0;i<e.length;i++)n+=t;return n}),Handlebars.registerHelper("compare",helpers.compare),Handlebars.registerHelper("control",helpers.control),Handlebars.registerHelper("container",helpers.container),Handlebars.registerHelper("item",helpers.item),Handlebars.registerHelper("itemField",helpers.itemField),Handlebars.registerHelper("formItems",helpers.formItems),Handlebars.registerHelper("times",helpers.times),Handlebars.registerHelper("str",helpers.str),Handlebars.registerHelper("with",function(e,t){return t.fn(e)}),Handlebars.registerHelper("ifnot",helpers.ifnot);var partials={};Alpaca.HandlebarsTemplateEngine=Alpaca.AbstractTemplateEngine.extend({fileExtension:function(){return"html"},supportedMimetypes:function(){return["text/x-handlebars-template","text/x-handlebars-tmpl"]},init:function(){if(HandlebarsPrecompiled)for(var e in HandlebarsPrecompiled){var t=HandlebarsPrecompiled[e];for(var n in t){var i=t[n];if("function"==typeof i){var a=Alpaca.makeCacheKey(e,"view",e,n);COMPILED_TEMPLATES[a]=i}}}},doCompile:function(cacheKey,html,callback){var self=this,template=null;try{var functionString=Handlebars.precompile(html);template=eval("("+functionString+")"),template=Handlebars.template(template),COMPILED_TEMPLATES[cacheKey]=template}catch(e){return void callback(e)}callback()},doExecute:function(e,t,n){var i=COMPILED_TEMPLATES[e];if(!i)return void n(new Error("Could not find handlebars cached template for key: "+e));var a=null;try{a=i(t)}catch(r){return n(r),null}return a},isCached:function(e){return!!COMPILED_TEMPLATES[e]},findCacheKeys:function(e){var t=[];for(var n in COMPILED_TEMPLATES)0===n.indexOf(e+":")&&t.push(n);return t}}),Alpaca.TemplateEngineRegistry.register("handlebars",new Alpaca.HandlebarsTemplateEngine("handlebars"))}(jQuery,"undefined"!=typeof Handlebars?Handlebars:window.Handlebars,"undefined"!=typeof HandlebarsPrecompiled?HandlebarsPrecompiled:window.HandlebarsPrecompiled),function(e){var t=e.alpaca;t.NormalizedView=Base.extend({constructor:function(e){this.id=e},normalize:function(e){var n=e[this.id];if(!n)return t.logError("View compilation failed - view not found: "+this.id),!1;for(var i=[],a=n;a;){i.push(a);var r=a.parent;if(r){var o=e[a.parent];if(!o)return t.logError("View compilation failed - cannot find parent view: "+r+" for view: "+a.id),!1;a=o}else a=null}i=i.reverse();for(var l=function(e,n,i){var a=n[i],r=e[i];t.isUndefined(r)||t.isUndefined(a)||t.logDebug("View property: "+i+" already has value: "+r+" and overwriting to: "+a),t.isUndefined(a)||(e[i]=a)},s=function(e,n,i){var a=n[i],r=e[i];t.isUndefined(r)||t.isUndefined(a)||t.logDebug("View property: "+i+" already has function, overwriting"),t.isUndefined(a)||(e[i]=a)},u=function(e,n,i){var a=n[i];a&&(e[i]||(e[i]={}),t.mergeObject2(a,e[i]))},c=0;c<i.length;c++){var d=i[c];l(this,d,"type"),l(this,d,"ui"),l(this,d,"displayReadonly"),l(this,d,"locale"),s(this,d,"render"),s(this,d,"postRender"),u(this,d,"templates"),u(this,d,"fields"),u(this,d,"layout"),u(this,d,"styles"),u(this,d,"callbacks"),u(this,d,"messages"),l(this,d,"horizontal"),l(this,d,"collapsible"),l(this,d,"legendStyle"),l(this,d,"toolbarStyle"),l(this,d,"buttonStyle"),l(this,d,"toolbarSticky"),l(this,d,"globalTemplate"),u(this,d,"wizard")}return t.logDebug("View compilation complete for view: "+this.id),t.logDebug("Final view: "),t.logDebug(JSON.stringify(this,null," ")),!0}})}(jQuery),function(e){var t=e.alpaca;t.RuntimeView=Base.extend({constructor:function(e,t){this.field=t,this.setView(e)},setView:function(e){e||(e="web-edit");var n=t.getNormalizedView(e);if(!n)throw new Error("Runtime view for view id: "+e+" could not find a normalized view");for(var i in n)n.hasOwnProperty(i)&&(this[i]=n[i])},getWizard:function(){return this.getViewParam("wizard")},getGlobalTemplateDescriptor:function(){return this.getTemplateDescriptor("globalTemplate")},getLayout:function(){var e=this;return{templateDescriptor:this.getTemplateDescriptor("layoutTemplate",e),bindings:this.getViewParam(["layout","bindings"],!0)}},getTemplateDescriptor:function(e,n){return t.getTemplateDescriptor(this,e,n)},getMessage:function(e,n){n||(n=t.defaultLocale);var i=this.getViewParam(["messages",n,e]);return t.isEmpty(i)&&(i=this.getViewParam(["messages",e])),i},getViewParam:function(e,n){var i=this.field.path;if(this.fields&&this.fields[i]){var a=this._getConfigVal(this.fields[i],e);if(!t.isEmpty(a))return a}if(i&&-1!==i.indexOf("[")&&-1!==i.indexOf("]")){var r=i.replace(/\[\d+\]/g,"[*]");if(this.fields&&this.fields[r]){var a=this._getConfigVal(this.fields[r],e);if(!t.isEmpty(a))return a}}if(i&&-1!==i.indexOf("[")&&-1!==i.indexOf("]")){var r=i.replace(/\[\d+\]/g,"");if(this.fields&&this.fields[r]){var a=this._getConfigVal(this.fields[r],e);if(!t.isEmpty(a))return a}}return!t.isEmpty(n)&&n&&"/"!==this.field.path?null:this._getConfigVal(this,e)},_getConfigVal:function(e,n){if(t.isArray(n))for(var i=0;i<n.length&&!t.isEmpty(e);i++)e=e[n[i]];else t.isEmpty(e)||(e=e[n]);return e},fireCallback:function(e,t,n,i,a,r,o){this.callbacks&&this.callbacks[t]&&this.callbacks[t].call(e,n,i,a,r,o)},applyStyle:function(t,n){var i=n;i&&i.getFieldEl&&(i=i.getFieldEl()),i&&this.styles&&this.styles[t]&&e(i).addClass(this.styles[t])},getStyle:function(e){return this.styles[e]?this.styles[e]:""}})}(jQuery),function(e){var t=e.alpaca;t.Field=Base.extend({constructor:function(e,n,i,a,r,o,l){var s=this;this.initializing=!0,this.domEl=e,this.parent=null,this.data=n,this.options=i,this.schema=a,this.connector=o,this.errorCallback=function(e){l?l(e):t.defaultErrorCallback.call(s,e)},this.singleLevelRendering=!1,this.view=new t.RuntimeView(r,this);var u=!1;this.options||(this.options={},u=!0),this.id=this.options.id,this.type=this.options.type,this.id||(this.id=t.generateId());var c=!1;if(this.schema||(this.schema={},c=!0),this.options.label||null===this.schema.title||(this.options.label=this.schema.title),this.options.helpers||(this.options.helpers=[]),this.options.helper){if(t.isArray(this.options.helper))for(var d=0;d<this.options.helper.length;d++)this.options.helpers.push(this.options.helper[d]);else this.options.helpers.push(this.options.helper);delete this.options.helper}t.isEmpty(this.options.readonly)&&!t.isEmpty(this.schema.readonly)&&(this.options.readonly=this.schema.readonly),t.isValEmpty(this.data)&&!t.isEmpty(this.schema["default"])&&(this.data=this.schema["default"],this.showingDefaultData=!0),this.path="/",this.validation={},this._events={},this.isDisplayOnly=function(){return"view"===s.view.type||"display"==s.view.type},this.schema&&this.schema.id&&0===this.schema.id.indexOf("#")&&(this.schema.id=this.schema.id.substring(1)),this._previouslyValidated=!1,this.updateObservable=function(){this.data?this.observable(this.path).set(this.data):this.observable(this.path).clear()},this.getObservableScope=function(){for(var e=this;!e.isTop();)e=e.parent;var t=e.observableScope;return t||(t="global"),t},this.ensureProperType=function(e){var n=this,i=function(e,n){return t.isString(e)?"number"===n?e=parseFloat(e):"integer"===n?e=parseInt(e):"boolean"===n&&(e=""!==e&&"false"!==e.toLowerCase()):t.isNumber(e)&&("string"===n?e=""+e:"boolean"===n&&(e=-1!==e&&0!==e)),e};if("undefined"!=typeof e)if(t.isArray(e))for(var a=0;a<e.length;a++)n.schema.items&&n.schema.items.type&&(e[a]=i(e[a],n.schema.items.type));else(t.isString(e)||t.isNumber(e))&&n.schema.type&&(e=i(e,n.schema.type));return e},this.onConstruct()},onConstruct:function(){},isTop:function(){return!this.parent},getTemplateDescriptorId:function(){throw new Error("Template descriptor ID was not specified")},initTemplateDescriptor:function(){var e=this,n=this.view.getTemplateDescriptor(this.getTemplateDescriptorId(),this),i=this.view.getGlobalTemplateDescriptor(),a=this.view.getLayout(),r=!1;this.isTop()&&(i?(this.setTemplateDescriptor(i),this.singleLevelRendering=!0,r=!0):a&&a.templateDescriptor&&(this.setTemplateDescriptor(a.templateDescriptor),r=!0)),!r&&n&&this.setTemplateDescriptor(n);var o=this.getTemplateDescriptor();return o?void 0:t.throwErrorWithCallback("Unable to find template descriptor for field: "+e.getFieldType())},setup:function(){this.initializing||(this.data=this.getValue()),this.initTemplateDescriptor(),t.isUndefined(this.schema.required)&&(this.schema.required=!1),t.isUndefined(this.options.validate)&&(this.options.validate=!0),t.isUndefined(this.options.disabled)&&(this.options.disabled=!1),t.isUndefined(this.options.showMessages)&&(this.options.showMessages=!0)},on:function(e,n){return t.logDebug("Adding listener for event: "+e),this._events[e]||(this._events[e]=[]),this._events[e].push(n),this},off:function(e){this._events[e]&&(this._events[e].length=0)},triggerWithPropagation:function(e,t,n){if("string"==typeof t&&(n=t,t=null),n||(n="up"),"up"===n)this.trigger.call(this,e,t),this.parent&&this.parent.triggerWithPropagation.call(this.parent,e,t,n);else if("down"===n){if(this.children&&this.children.length>0)for(var i=0;i<this.children.length;i++){var a=this.children[i];a.triggerWithPropagation.call(a,e,t,n)}this.trigger.call(this,e,t)}else if("both"===n){if(this.children&&this.children.length>0)for(var i=0;i<this.children.length;i++){var a=this.children[i];a.triggerWithPropagation.call(a,e,t,"down")}this.trigger.call(this,e,t),this.parent&&this.parent.triggerWithPropagation.call(this.parent,e,t,"up")}},trigger:function(e,n,i,a,r){var o=this._events[e];if(o)for(var l=0;l<o.length;l++){var s=o[l],u=null;if("function"==typeof s){t.logDebug("Firing event: "+e);try{u=s.call(this,n,i,a,r)}catch(c){t.logDebug("The event handler caught an exception: "+e),t.logDebug(c)}}}},bindData:function(){t.isEmpty(this.data)||this.setValue(this.data)},render:function(e,n){var i=this;e&&(t.isString(e)||t.isObject(e))?this.view.setView(e):t.isEmpty(n)&&t.isFunction(e)&&(n=e),null===this.options.label&&this.propertyId&&(this.options.label=this.propertyId),this.options.name&&(this.name=this.options.name),this.calculateName(),this.setup(),this._render(function(){i.trigger("render"),n()})},calculateName:function(){if(!this.name||this.name&&this.nameCalculated)if(this.parent&&this.parent.name&&this.path){var e=this.path.substring(this.path.lastIndexOf("/")+1);-1!==e.indexOf("[")&&-1!==e.indexOf("]")&&(e=e.substring(e.indexOf("[")+1,e.indexOf("]"))),e&&(this.name=this.parent.name+"_"+e,this.nameCalculated=!0)}else this.path&&(this.name=this.path.replace(/\//g,"").replace(/\[/g,"_").replace(/\]/g,""),this.nameCalculated=!0)},_render:function(n){var i=this;if(i.options.form&&t.isObject(i.options.form)){i.options.form.viewType=this.view.type;var a=i.form;a||(a=new t.Form(i.domEl,this.options.form,i.view.id,i.connector,i.errorCallback)),a.render(function(a){var r=e("<div></div>");i._processRender(r,function(){a.formFieldsContainer.before(i.field),a.formFieldsContainer.remove(),a.topControl=i,i.view.type&&"view"!==i.view.type&&a.initEvents(),i.form=a,i.postRender(function(){i.initializing=!1,i.form.afterInitialize(),e(i.field).bind("destroyed",function(e){i.form.destroy()}),n&&t.isFunction(n)&&n(i)})})})}else this._processRender(i.domEl,function(){i.postRender(function(){i.initializing=!1,n&&t.isFunction(n)&&n(i)})})},_processRender:function(e,t){var n=this;n.renderField(e,function(){n.fireCallback("field"),n.renderFieldElements(function(){t()})})},renderFieldDomElement:function(e){var n=this.getTemplateDescriptor();return t.tmpl(n,{id:this.getId(),options:this.options,schema:this.schema,data:e,view:this.view,path:this.path,name:this.name})},renderField:function(t,n){var i=this,a=this.data;this.isDisplayOnly()&&"object"==typeof a&&(a=JSON.stringify(a));var r=i.renderFieldDomElement(a);if(e(r).length>0){for(var o=null,l=0;l<e(r).length;l++){var s=e(r)[l].nodeName;if(s&&(s=s.toLowerCase(),"div"===s||"span"===s)){o=e(e(r)[l]);break}}o||(o=e(e(r).last())),o&&(r=o)}this.field=r,this.field.appendTo(t),n()},renderFieldElements:function(e){e()},updateDOMElement:function(){this.field.attr("data-alpaca-field-path",this.getPath()),this.field.attr("data-alpaca-field-name",this.getName()),this.field.removeAttr("name")},postRender:function(n){var i=this;if(this.field.addClass("alpaca-field"),this.field.addClass("alpaca-field-"+this.getFieldType()),this.field.attr("data-alpaca-field-id",this.getId()),this.updateDOMElement(),"view"!==this.view.type){this.isRequired()?(e(this.field).addClass("alpaca-required"),i.fireCallback("required")):(e(this.field).addClass("alpaca-optional"),i.fireCallback("optional"));var a=function(){t.disabled(e("input",i.field),!0),t.disabled(e("select",i.field),!0),t.disabled(e(":radio",i.field),!0),t.disabled(e(":checkbox",i.field),!0),e(":radio",i.field).off().click(function(e){return e.preventDefault(),e.stopImmediatePropagation(),!1}),e(".radio label",i.field).off().click(function(e){return e.preventDefault(),e.stopImmediatePropagation(),!1}),e("input",i.field).off().click(function(e){return e.preventDefault(),e.stopImmediatePropagation(),!1})};this.options.readonly&&(e(this.field).addClass("alpaca-readonly"),e("input",this.field).attr("readonly","readonly"),a(),i.fireCallback("readonly")),this.options.disabled&&(e(this.field).addClass("alpaca-disabled"),a(),i.fireCallback("disabled"));var r=function(e,n){if(n){var i=0,a=null;if(t.isArray(n))for(i=0;i<n.length;i++)e.addClass(n[i]);else if(n.indexOf(",")>-1)for(a=n.split(","),i=0;i<a.length;i++)e.addClass(a[i]);else if(n.indexOf(" ")>-1)for(a=n.split(" "),i=0;i<a.length;i++)e.addClass(a[i]);else e.addClass(n)}};r(this.field,this.options.fieldClass),this.options.disabled&&(this.disable(),i.fireCallback("disable")),this.view.type&&"edit"===this.view.type?this.bindData():this.showingDefaultData&&this.bindData(),"create"===this.view.type&&t.logDebug("Skipping data binding for field: "+this.id+" since view mode is 'create'"),this.view.type&&"view"!==this.view.type&&this.initEvents()}this.options.hidden&&this.field.hide();var o="create"===this.view.type&&!this.refreshed;this.hideInitValidationError=t.isValEmpty(this.options.hideInitValidationError)?o:this.options.hideInitValidationError,this.view.displayReadonly||e(this.field).find(".alpaca-readonly").hide(),this.options.postRender?this.options.postRender.call(this,function(){n()}):n()},refresh:function(n){var i=this,a=i.data=i.getValue(),r=i.domEl,o=i.field,l=e("<div></div>");e(o).before(l),i.domEl=e("<div style='display: none'></div>"),i.field=void 0,i.control=void 0,i.container=void 0,i.form=void 0,e(o).find("button").prop("disabled",!0),this.initializing=!0,i.setup(),i._render(function(){e(l).before(i.field),i.domEl=r;var s=e(o).attr("class");s&&e.each(s.split(" "),function(t,n){n&&0===!n.indexOf("alpaca-")&&e(i.field).addClass(n)}),e(o).hide(),e(l).remove(),i.refreshed=!0,"undefined"!=typeof a&&(t.isObject(a)||t.isArray(a))&&i.setValue(a),t.fireReady(i),n&&n(),e(o).remove(void 0,{nodestroy:!0})})},applyStyle:function(e,t){this.view.applyStyle(e,t)},fireCallback:function(e,t,n,i,a,r){this.view.fireCallback(this,e,t,n,i,a,r)},getFieldEl:function(){return this.field},getId:function(){return this.id},getParent:function(){return this.parent},getPath:function(){return this.path},getName:function(){return this.name},isTopLevel:function(){return t.isEmpty(this.parent)},top:function(){for(var e=this;e.parent;)e=e.parent;return e},getValue:function(){var e=this,t=this.data;return t=e.ensureProperType(t)},setValue:function(e){this.data=e,this.updateObservable(),this.triggerUpdate(),this.isDisplayOnly()&&!this.initializing&&(this.top&&this.top()&&this.top().initializing||this.refresh())},setDefault:function(){},getTemplateDescriptor:function(){return this.templateDescriptor},setTemplateDescriptor:function(e){this.templateDescriptor=e},displayMessage:function(n,i){var a=this;n&&t.isObject(n)&&(n=[n]),n&&t.isString(n)&&(n=[{id:"custom",message:n}]),e(this.getFieldEl()).children(".alpaca-message").remove(),n&&n.length>0&&this.options.maxMessages&&t.isNumber(this.options.maxMessages)&&this.options.maxMessages>-1&&(n=n.slice(0,this.options.maxMessages)),a.fireCallback("removeMessages"),n&&n.length>0&&e.each(n,function(n,i){var r=!1;a.hideInitValidationError&&(r=!0);var o=a.view.getTemplateDescriptor("message");if(o){var l=t.tmpl(o,{id:i.id,message:i.message,view:a.view});l.addClass("alpaca-message"),r&&l.addClass("alpaca-message-hidden"),e(a.getFieldEl()).append(l)}a.fireCallback("addMessage",n,i.id,i.message,r)})},refreshValidationState:function(e,n){var i=this,a=[],r=[],o=function(e,n){return function(i){t.nextTick(function(){t.compileValidationContext(e,function(e){n.push(e),i()})})}};if(e){var l=function(e,t){if(e.isValidationParticipant()){if(e.children&&e.children.length>0)for(var n=0;n<e.children.length;n++)l(e.children[n],t);r.push(o(e,t))}};l(this,a)}r.push(o(this,a)),t.series(r,function(e){for(var r={},o=[],l=0;l<a.length;l++)for(var s=a[l],u=o.length,c=0;c<s.length;c++){var d=s[c],p=r[d.id];if(p)d.validated&&!p.invalidated&&(p.validated=!0,p.invalidated=!1,p.valid=d.valid),d.invalidated&&(p.invalidated=!0,p.validated=!1,p.valid=d.valid);else{var h={};h.id=d.id,h.path=d.path,h.domEl=d.domEl,h.field=d.field,h.validated=d.validated,h.invalidated=d.invalidated,h.valid=d.valid,o.splice(u,0,h),r[h.id]=h}}o.reverse(),i.hideInitValidationError||t.updateValidationStateForContext(i.view,o),n&&n()})},getMessage:function(e){return this.view.getMessage(e,this.view.locale)},validate:function(e){var n=!0;if(!this.initializing&&this.options.validate){if(this.children&&e)for(var i=0;i<this.children.length;i++){var a=this.children[i];a.isValidationParticipant()&&a.validate(e)}if(n=this.handleValidate(),!n&&t.logLevel==t.DEBUG){var r=[];for(var o in this.validation)this.validation[o].status||r.push(this.validation[o].message);t.logDebug("Validation failure for field (id="+this.getId()+", path="+this.path+"), messages: "+JSON.stringify(r))}}return this._previouslyValidated=!0,n},handleValidate:function(){var e=this.validation,n=this._validateOptional();return e.notOptional={message:n?"":this.getMessage("notOptional"),status:n},n=this._validateDisallow(),e.disallowValue={message:n?"":t.substituteTokens(this.getMessage("disallowValue"),[this.schema.disallow.join(", ")]),status:n},e.notOptional.status&&e.disallowValue.status},_validateCustomValidator:function(e){var n=this;this.options.validator&&t.isFunction(this.options.validator)?this.options.validator.call(this,function(t){n.validation.custom=t,e()}):e()},_validateOptional:function(){return this.isRequired()&&this.isEmpty()?!1:!this.options.disallowOnlyEmptySpaces||!t.testRegex(t.regexps.whitespace,this.getValue())},_validateDisallow:function(){if(!t.isValEmpty(this.schema.disallow)){var n=this.getValue(),i=this.schema.disallow;if(t.isArray(i)){var a=!0;return e.each(i,function(e,i){(t.isObject(n)||t.isArray(n)&&t.isString(i))&&(i=t.parseJSON(i)),t.compareObject(n,i)&&(a=!1)}),a}return(t.isObject(n)||t.isArray(n)&&t.isString(i))&&(i=t.parseJSON(i)),!t.compareObject(n,i)}return!0},triggerUpdate:function(){e(this.field).trigger("fieldupdate")},disable:function(){},enable:function(){},isDisabled:function(){return!1},isEnabled:function(){return!this.isDisabled()},focus:function(e){e&&e(this)},destroy:function(){t.observable(this.path).clear(),t&&t.fieldInstances&&t.fieldInstances[this.getId()]&&delete t.fieldInstances[this.getId()],e(this.field).remove()},show:function(){this.options&&this.options.hidden||(e(this.field).css({display:""}),this.onShow(),this.fireCallback("show"))},onShow:function(){},hide:function(){e(this.field).css({display:"none"}),this.onHide(),this.fireCallback("hide")},onHide:function(){},isValidationParticipant:function(){return this.isShown()},isShown:function(){return!this.isHidden()},isVisible:function(){return!this.isHidden()},isHidden:function(){return"none"===e(this.field).css("display")},print:function(){this.getFieldEl().printArea&&this.getFieldEl().printArea()},onDependentReveal:function(){},onDependentConceal:function(){},reload:function(){this.initializing=!0,t.isEmpty(this.callback)?this.render(this.renderedCallback):this.callback(this,this.renderedCallback)},clear:function(){var e=null;this.data&&(e=this.data),this.setValue(e)},isEmpty:function(){return t.isValEmpty(this.getValue())},isValid:function(t){if(t&&this.children)for(var n=0;n<this.children.length;n++){var i=this.children[n];if(i.isValidationParticipant()&&!i.isValid(t))return!1}if(e.isEmptyObject(this.validation))return!0;for(var a in this.validation)if(!this.validation[a].status)return!1;return!0},initEvents:function(){var n=this;this.field&&(this.field.mouseover(function(e){n.onMouseOver.call(n,e),n.trigger("mouseover",e)}),this.field.mouseout(function(e){n.onMouseOut.call(n,e),n.trigger("mouseout",e)}),e.each(this.options,function(e,i){if(t.startsWith(e,"onField")&&t.isFunction(i)){var a=e.substring(7).toLowerCase();n.field.on(a,function(e){i.call(n,e)})}}),this.options&&this.options.events&&e.each(this.options.events,function(e,i){t.isFunction(i)&&("render"===e||"ready"===e||"blur"===e||"focus"===e?n.on(e,function(e,t,a,r){i.call(n,e,t,a,r)}):n.field.on(e,function(e){i.call(n,e)}))}))},onFocus:function(t){e(this.field).removeClass("alpaca-field-empty"),e(this.field).addClass("alpaca-field-focused")},onBlur:function(t){var n=e(this.field).hasClass("alpaca-field-focused");e(this.field).removeClass("alpaca-field-focused"),n&&this.refreshValidationState(),e(this.field).trigger("fieldblur")},onChange:function(e){this.data=this.getValue(),this.updateObservable(),this.triggerUpdate()},onMouseOver:function(e){},onMouseOut:function(e){},getControlByPath:function(e){var n=null;if(e){0===e.indexOf("/")&&(e=e.substring(1)),t.endsWith(e,"/")&&(e=e.substring(0,e.length-1));for(var i=this,a=e.split("/"),r=0;r<a.length;r++){var o=a[r],l=o,s=-1,u=o.indexOf("[");if(u>=0){var c=o.indexOf("]",u+1);c>=0&&(s=parseInt(o.substring(u+1,c)),l=o.substring(0,u))}l&&(i=i.childrenByPropertyId[l],s>-1&&(i=i.children[s]))}n=i}return n},getControlsByFieldType:function(e){var t=[];if(e){var n=function(e,t,i){for(var a=0;a<e.children.length;a++)e.children[a].getFieldType()===t&&i.push(e.children[a]),e.children[a].isContainer()&&n(e.children[a],t,i)};n(this,e,t)}return t},getControlsBySchemaType:function(e){var t=[];if(e){var n=function(e,t,i){for(var a=0;a<e.children.length;a++)e.children[a].getType()===t&&i.push(e.children[a]),e.children[a].isContainer()&&n(e.children[a],t,i)};n(this,e,t)}return t},subscribe:function(){var e=t.makeArray(arguments);return e.unshift(this.getObservableScope()),t.subscribe.apply(this,e)},unsubscribe:function(){var e=t.makeArray(arguments);return e.unshift(this.getObservableScope()),t.unsubscribe.apply(this,e)},observable:function(){var e=t.makeArray(arguments);return e.unshift(this.getObservableScope()),t.observable.apply(this,e)},clearObservable:function(){var e=t.makeArray(arguments);return e.unshift(this.getObservableScope()),t.clearObservable.apply(this,e)},dependentObservable:function(){var e=t.makeArray(arguments);return e.unshift(this.getObservableScope()),t.dependentObservable.apply(this,e)},getType:function(){},getFieldType:function(){return""},getBaseFieldType:function(){var e=null,t=this.constructor.ancestor.prototype;return t&&t.getFieldType&&(e=t.getFieldType()),e},isContainer:function(){return!1},isRequired:function(){var e=!1;if("boolean"==typeof this.schema.required&&(e=this.schema.required),this.parent&&this.parent.schema.required&&t.isArray(this.parent.schema.required)){var n=this.parent.schema.required;if(n)for(var i=0;i<n.length;i++)if(n[i]===this.propertyId){e=!0;break}}return e},getTitle:function(){},getDescription:function(){},getSchemaOfSchema:function(){var e={title:this.getTitle(),description:this.getDescription(),type:"object",properties:{title:{title:"Title",description:"Short description of the property.",type:"string"},description:{title:"Description",description:"Detailed description of the property.",type:"string"},readonly:{title:"Readonly",description:"Indicates that the field is read-only. A read-only field cannot have it's value changed. Read-only fields render in a grayed-out or disabled control. If the field is rendered using a view with the <code>displayReadonly</code> attribute set to false, the read-only field will not appear.",type:"boolean","default":!1},required:{title:"Required",description:"Indicates whether the field's value is required. If set to true, the field must take on a valid value and cannnot be left empty or unassigned.",type:"boolean","default":!1},"default":{title:"Default",description:"The default value to be assigned for this property. If the data for the field is empty or not provided, this default value will be plugged in for you. Specify a default value when you want to pre-populate the field's value ahead of time.",type:"any"},type:{title:"Type",description:"Data type of the property.",type:"string",readonly:!0},format:{title:"Format",description:"Data format of the property.",type:"string"},disallow:{title:"Disallowed Values",description:"List of disallowed values for the property.",type:"array"},dependencies:{title:"Dependencies",description:"List of property dependencies.",type:"array"}}};return this.getType&&!t.isValEmpty(this.getType())&&(e.properties.type["default"]=this.getType(),e.properties.type["enum"]=[this.getType()]),e},getOptionsForSchema:function(){return{fields:{title:{helper:"Field short description",type:"text"},description:{helper:"Field detailed description",type:"textarea"},readonly:{helper:"Field will be read only if checked",rightLabel:"This field is read-only",type:"checkbox"},required:{helper:"Field value must be set if checked",rightLabel:"This field is required",type:"checkbox"},"default":{helper:"Field default value",type:"textarea"},type:{helper:"Field data type",type:"text"},format:{type:"select",dataSource:function(e){for(var n in t.defaultFormatFieldMapping)this.selectOptions.push({value:n,text:n});e()}},disallow:{helper:"Disallowed values for the field",itemLabel:"Value",type:"array"},dependencies:{helper:"Field Dependencies",multiple:!0,size:3,type:"select",dataSource:function(e,t){if(e.parent&&e.parent.schemaParent&&e.parent.schemaParent.parent)for(var n in e.parent.schemaParent.parent.childrenByPropertyId)n!=e.parent.schemaParent.propertyId&&e.selectOptions.push({value:n,text:n});t&&t()}}}}},getSchemaOfOptions:function(){var e={title:"Options for "+this.getTitle(),description:this.getDescription()+" (Options)",type:"object",properties:{form:{},id:{title:"Field Id",description:"Unique field id. Auto-generated if not provided.",type:"string"},type:{title:"Field Type",description:"Field type.",type:"string","default":this.getFieldType(),readonly:!0},validate:{title:"Validation",description:"Field validation is required if true.",type:"boolean",
"default":!0},showMessages:{title:"Show Messages",description:"Display validation messages if true.",type:"boolean","default":!0},disabled:{title:"Disabled",description:"Field will be disabled if true.",type:"boolean","default":!1},readonly:{title:"Readonly",description:"Field will be readonly if true.",type:"boolean","default":!1},hidden:{title:"Hidden",description:"Field will be hidden if true.",type:"boolean","default":!1},label:{title:"Label",description:"Field label.",type:"string"},helper:{title:"Helper",description:"Field help message.",type:"string"},helpers:{title:"Helpers",description:"An array of field help messages. Each message will be displayed on it's own line.",type:"array",items:{type:"string"}},fieldClass:{title:"CSS class",description:"Specifies one or more CSS classes that should be applied to the dom element for this field once it is rendered. Supports a single value, comma-delimited values, space-delimited values or values passed in as an array.",type:"string"},hideInitValidationError:{title:"Hide Initial Validation Errors",description:"Hide initial validation errors if true.",type:"boolean","default":!1},focus:{title:"Focus",description:"If true, the initial focus for the form will be set to the first child element (usually the first field in the form). If a field name or path is provided, then the specified child field will receive focus. For example, you might set focus to 'name' (selecting the 'name' field) or you might set it to 'client/name' which picks the 'name' field on the 'client' object.",type:"checkbox","default":!0},optionLabels:{title:"Enumerated Value Labels",description:"An array of string labels for items in the enum array",type:"array"},view:{title:"Override of the view for this field",description:"Allows for this field to be rendered with a different view (such as 'display' or 'create')",type:"string"}}};return this.isTopLevel()?e.properties.form={title:"Form",description:"Options for rendering the FORM tag.",type:"object",properties:{attributes:{title:"Form Attributes",description:"List of attributes for the FORM tag.",type:"object",properties:{id:{title:"Id",description:"Unique form id. Auto-generated if not provided.",type:"string"},action:{title:"Action",description:"Form submission endpoint",type:"string"},method:{title:"Method",description:"Form submission method","enum":["post","get"],type:"string"},rubyrails:{title:"Ruby On Rails",description:"Ruby on Rails Name Standard","enum":["true","false"],type:"string"},name:{title:"Name",description:"Form name",type:"string"},focus:{title:"Focus",description:"Focus Setting",type:"any"}}},buttons:{title:"Form Buttons",description:"Configuration for form-bound buttons",type:"object",properties:{submit:{type:"object",title:"Submit Button",required:!1},reset:{type:"object",title:"Reset button",required:!1}}},toggleSubmitValidState:{title:"Toggle Submit Valid State",description:"Toggle the validity state of the Submit button",type:"boolean","default":!0}}}:delete e.properties.form,e},getOptionsForOptions:function(){var e={type:"object",fields:{id:{type:"text",readonly:!0},type:{type:"text"},validate:{rightLabel:"Enforce validation",type:"checkbox"},showMessages:{rightLabel:"Show validation messages",type:"checkbox"},disabled:{rightLabel:"Disable this field",type:"checkbox"},hidden:{type:"checkbox",rightLabel:"Hide this field"},label:{type:"text"},helper:{type:"textarea"},helpers:{type:"array",items:{type:"textarea"}},fieldClass:{type:"text"},hideInitValidationError:{rightLabel:"Hide initial validation errors",type:"checkbox"},focus:{type:"checkbox",rightLabel:"Auto-focus first child field"},optionLabels:{type:"array",items:{type:"text"}},view:{type:"text"}}};return this.isTopLevel()&&(e.fields.form={type:"object",fields:{attributes:{type:"object",fields:{id:{type:"text",readonly:!0},action:{type:"text"},method:{type:"select"},name:{type:"text"}}}}}),e}}),t.registerMessages({disallowValue:"{0} are disallowed values.",notOptional:"This field is not optional."})}(jQuery),function(e){var t=e.alpaca;t.ControlField=t.Field.extend({onConstruct:function(){var t=this;this.isControlField=!0,this._getControlVal=function(n){var i=null;return this.control&&(i=e(this.control).val(),n&&(i=t.ensureProperType(i))),i}},setup:function(){var e=this;this.base();var n=e.resolveControlTemplateType();if(!n)return t.throwErrorWithCallback("Unable to find template descriptor for control: "+e.getFieldType());if(this.controlDescriptor=this.view.getTemplateDescriptor("control-"+n,e),"undefined"==typeof this.options.renderButtons&&(this.options.renderButtons=!0),this.options.buttons)for(var i in this.options.buttons)this.options.buttons[i].label&&(this.options.buttons[i].value=this.options.buttons[i].label),this.options.buttons[i].title&&(this.options.buttons[i].value=this.options.buttons[i].title),this.options.buttons[i].type||(this.options.buttons[i].type="button"),this.options.buttons[i].styles||(this.options.buttons[i].styles=this.view.styles.button)},getControlEl:function(){return this.control},resolveControlTemplateType:function(){var e=this,t=!1,n=null,i=this;do if(i.getFieldType){var a=this.view.getTemplateDescriptor("control-"+i.getFieldType(),e);a?(n=i.getFieldType(),t=!0):i=i.constructor.ancestor.prototype}else t=!0;while(!t);return n},onSetup:function(){},isAutoFocusable:function(){return!0},getTemplateDescriptorId:function(){return"control"},renderFieldElements:function(n){var i=this;this.control=e(this.field).find("."+t.MARKER_CLASS_CONTROL_FIELD),this.control.removeClass(t.MARKER_CLASS_CONTROL_FIELD),i.prepareControlModel(function(e){i.beforeRenderControl(e,function(){i.renderControl(e,function(a){a&&(i.control.replaceWith(a),i.control=a,i.control.addClass(t.CLASS_CONTROL)),i.fireCallback("control"),i.afterRenderControl(e,function(){n()})})})})},prepareControlModel:function(e){var t={};t.id=this.getId(),t.name=this.name,t.options=this.options,t.schema=this.schema,t.data=this.data,t.required=this.isRequired(),t.view=this.view,e(t)},beforeRenderControl:function(e,t){t()},afterRenderControl:function(t,n){var i=this;i.firstUpdateObservableFire||"undefined"==typeof i.data||null==i.data||(i.firstUpdateObservableFire=!0,i.updateObservable()),e(this.getFieldEl()).find(".alpaca-control-button").each(function(){e(this).click(function(t){e(this).attr("button-pushed",!0)});var t=e(this).attr("data-key");if(t){var n=i.options.buttons[t];n&&n.click&&e(this).click(function(e,t){return function(n){n.preventDefault(),t.call(e,n)}}(i,n.click))}}),n()},renderControl:function(e,n){var i=null;this.controlDescriptor&&(i=t.tmpl(this.controlDescriptor,e)),n(i)},postRender:function(e){this.base(function(){e()})},updateDOMElement:function(){this.base(),this.control.attr("name",this.getName())},setDefault:function(){var e=t.isEmpty(this.schema["default"])?"":this.schema["default"];this.setValue(e)},getValue:function(){var e=this,t=this.base();return this.isDisplayOnly()||(t=e.getControlValue()),t=e.ensureProperType(t)},getControlValue:function(){return this._getControlVal(!0)},_validateEnum:function(){if(!this.getEnum())return!0;var n=this.getValue();return!this.isRequired()&&t.isValEmpty(n)?!0:e.inArray(n,this.getEnum())>-1},handleValidate:function(){var e=this.base(),n=this.validation,i=this._validateEnum(),a=this.getEnum(),r=this.getOptionLabels();return r&&r.length>0&&(a=r),n.invalidValueOfEnum={message:i?"":t.substituteTokens(this.getMessage("invalidValueOfEnum"),[a.join(", "),this.getValue()]),status:i},e&&n.invalidValueOfEnum.status},initEvents:function(){this.base(),this.control&&this.control.length>0&&this.initControlEvents()},initControlEvents:function(){var e=this,t=this.control;t.click(function(t){e.onClick.call(e,t),e.trigger("click",t)}),t.change(function(t){setTimeout(function(){e.onChange.call(e,t),e.triggerWithPropagation("change",t)},200)}),t.focus(function(t){if(e.wasFocused=!0,!e.suspendBlurFocus){var n=e.onFocus.call(e,t);return n!==!1&&(n=e.trigger("focus",t)),n}}),t.blur(function(t){if(e.wasBlurred=!0,!e.suspendBlurFocus){var n=e.onBlur.call(e,t);return n!==!1&&(n=e.trigger("blur",t)),n}}),t.keypress(function(t){var n=e.onKeyPress.call(e,t);return n!==!1&&(n=e.trigger("keypress",t)),n}),t.keyup(function(t){var n=e.onKeyUp.call(e,t);return n!==!1&&(n=e.trigger("keyup",t)),n}),t.keydown(function(t){var n=e.onKeyDown.call(e,t);return n!==!1&&(n=e.trigger("keydown",t)),n})},onKeyPress:function(e){var t=this,n=!1;if(t.view.type&&"edit"===t.view.type){var i=this.isValid();i||(n=!0)}else if(t.view.type&&"create"===t.view.type){var i=this.isValid();!i&&t.wasBlurred&&(n=!0)}n&&window.setTimeout(function(){t.refreshValidationState()},50)},onKeyDown:function(e){},onKeyUp:function(e){},onClick:function(e){},disable:function(){this.base(),this.control&&this.control.length>0&&e(this.control).prop("disabled",!0)},enable:function(){this.base(),this.control&&this.control.length>0&&e(this.control).prop("disabled",!1)},isDisabled:function(){return e(this.control).prop("disabled")},getEnum:function(){var e=null;return this.schema&&this.schema["enum"]&&(e=this.schema["enum"]),e},setEnum:function(e){t.safeSetObjectArray(this.schema,"enum",e)},getOptionLabels:function(){var e=null;return this.options&&this.options.optionLabels&&(e=this.options.optionLabels),e},setOptionLabels:function(e){t.safeSetObjectArray(this.options,"optionLabels",e)},sortEnum:function(){var e=this.getEnum();if(e&&e.length>0){for(var n=this.getOptionLabels(),i=[],a=0;a<e.length;a++){var r=e[a],o=e[a];n&&n.length>=a+1&&(o=n[a]),i.push({value:r,text:o})}this.sortSelectableOptions(i);for(var l=[],s=[],a=0;a<i.length;a++)l.push(i[a].value),t.isArray(n)&&s.push(i[a].text);this.setEnum(l),this.setOptionLabels(s)}},sortSelectableOptions:function(e){var n=this;if(n.options.sort!==!1){var i=t.defaultSort;n.options.sort&&"function"==typeof n.options.sort&&(i=n.options.sort),e.sort(i)}},invokeDataSource:function(n,i,a){var r=this,o=function(e){var t=this;return e?a(e):void t.afterLoadDataSourceOptions(n,i,function(e,n){return e?a(e):(t.sortSelectableOptions(n),void a(null,n))})}.bind(r);if(t.isFunction(r.options.dataSource))r.options.dataSource.call(r,function(e){if(t.isArray(e)){for(var i=0;i<e.length;i++)"string"==typeof e[i]?n.push({text:e[i],value:e[i]}):t.isObject(e[i])&&n.push(e[i]);o()}else if(t.isObject(e)){for(var a in e)n.push({text:a,value:e[a]});o()}else o()});else if(t.isUri(r.options.dataSource))e.ajax({url:r.options.dataSource,type:"get",dataType:"json",success:function(i){var a=i;r.options.dsTransformer&&t.isFunction(r.options.dsTransformer)&&(a=r.options.dsTransformer(a)),a&&(t.isObject(a)?(e.each(a,function(e,t){n.push({value:e,text:t})}),o()):t.isArray(a)&&(e.each(a,function(e,t){n.push({value:t.value,text:t.text})}),o()))},error:function(e,t,n){r.errorCallback({message:"Unable to load data from uri : "+r.options.dataSource,stage:"DATASOURCE_LOADING_ERROR",details:{jqXHR:e,textStatus:t,errorThrown:n}})}});else if(t.isArray(r.options.dataSource)){for(var l=0;l<r.options.dataSource.length;l++)"string"==typeof r.options.dataSource[l]?n.push({text:r.options.dataSource[l],value:r.options.dataSource[l]}):t.isObject(r.options.dataSource[l])&&n.push(r.options.dataSource[l]);o()}else if(t.isObject(r.options.dataSource))if(r.options.dataSource.connector){var s=r.connector;if(t.isObject(r.options.dataSource.connector)){var u=r.options.dataSource.connector.id,c=r.options.dataSource.connector.config;c||(c={});var d=t.getConnectorClass(u);d&&(s=new d(u,c))}var p=r.options.dataSource.config;p||(p={}),s.loadDataSource(p,function(e){for(var i=0;i<e.length;i++)"string"==typeof e[i]?n.push({text:e[i],value:e[i]}):t.isObject(e[i])&&n.push(e[i]);o()})}else{for(var h in r.options.dataSource)n.push({text:r.options.dataSource[h],value:h});o()}else a()},afterLoadDataSourceOptions:function(e,t,n){n(null,e)},getSchemaOfSchema:function(){return t.merge(this.base(),{properties:{"enum":{title:"Enumerated Values",description:"List of specific values for this property",type:"array"}}})},getOptionsForSchema:function(){return t.merge(this.base(),{fields:{"enum":{itemLabel:"Value",type:"array"}}})},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{name:{title:"Field Name",description:"Field Name.",type:"string"},sort:{title:"Sort Function",description:"Defines an f(a,b) sort function for the array of enumerated values [{text, value}]. This is used to sort enum and optionLabels as well as results that come back from any data sources (for select and radio controls). By default the items are sorted alphabetically. Don't apply any sorting if false.",type:"function"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{name:{type:"text"}}})}}),t.registerMessages({invalidValueOfEnum:"This field should have one of the values in {0}. Current value is: {1}"})}(jQuery),function(e){var t=e.alpaca;t.ContainerField=t.Field.extend({onConstruct:function(){this.isContainerField=!0},isContainer:function(){return!0},getContainerEl:function(){return this.container},getTemplateDescriptorId:function(){return"container"},resolveContainerTemplateType:function(){var e=!1,t=null,n=this;do if(n.getFieldType){var i=this.view.getTemplateDescriptor("container-"+n.getFieldType(),this);i?(t=n.getFieldType(),e=!0):n=n.constructor.ancestor.prototype}else e=!0;while(!e);return t},resolveContainerItemTemplateType:function(){var e=!1,t=null,n=this;do if(n.getFieldType){var i=this.view.getTemplateDescriptor("container-"+n.getFieldType()+"-item",this);i?(t=n.getFieldType(),e=!0):n=n.constructor.ancestor.prototype}else e=!0;while(!e);return t},setup:function(){var e=this;this.base();var n=e.resolveContainerTemplateType();if(!n)return t.throwErrorWithCallback("Unable to find template descriptor for container: "+e.getFieldType());this.containerDescriptor=this.view.getTemplateDescriptor("container-"+n,e);var i=!1;t.isEmpty(this.view.collapsible)||(i=this.view.collapsible),t.isEmpty(this.options.collapsible)||(i=this.options.collapsible),this.options.collapsible=i;var a="button";t.isEmpty(this.view.legendStyle)||(a=this.view.legendStyle),t.isEmpty(this.options.legendStyle)||(a=this.options.legendStyle),this.options.legendStyle=a,this.lazyLoading=!1,t.isEmpty(this.options.lazyLoading)||(this.lazyLoading=this.options.lazyLoading,this.lazyLoading&&(this.options.collapsed=!0)),this.children=[],this.childrenById={},this.childrenByPropertyId={}},destroy:function(){this.form&&(this.form.destroy(!0),delete this.form),t.each(this.children,function(){this.destroy()}),this.base()},renderFieldElements:function(n){var i=this;this.container=e(this.field).find("."+t.MARKER_CLASS_CONTAINER_FIELD),this.container.removeClass(t.MARKER_CLASS_CONTAINER_FIELD),i.prepareContainerModel(function(e){i.beforeRenderContainer(e,function(){i.renderContainer(e,function(a){a&&(i.container.replaceWith(a),i.container=a,i.container.addClass(t.CLASS_CONTAINER)),i.view.horizontal?i.container.addClass("alpaca-horizontal"):i.container.addClass("alpaca-vertical"),i.fireCallback("container"),i.afterRenderContainer(e,function(){n()})})})})},prepareContainerModel:function(e){var t=this,n={id:this.getId(),name:this.name,schema:this.schema,options:this.options,view:this.view};t.createItems(function(t){t||(t=[]);for(var i=0;i<t.length;i++)t[i].containerItemEl||(t[i].containerItemEl=t[i].getFieldEl());n.items=t,e(n)})},beforeRenderContainer:function(e,t){t()},renderContainer:function(e,n){var i=null;this.containerDescriptor&&(i=t.tmpl(this.containerDescriptor,e)),n(i)},afterRenderContainer:function(e,t){var n=this;n.beforeApplyCreatedItems(e,function(){n.applyCreatedItems(e,function(){n.afterApplyCreatedItems(e,function(){t()})})})},postRender:function(e){this.base(function(){e()})},initEvents:function(){this.base()},createItems:function(e){e()},beforeApplyCreatedItems:function(e,t){t()},applyCreatedItems:function(n,i){var a=this,r=null;if(a.isTopLevel()&&a.view.getLayout()&&(r=a.view.getLayout().bindings,!r&&a.view.getLayout().templateDescriptor&&n.items.length>0)){r={};for(var o=0;o<n.items.length;o++){var l=n.items[o].name;r[l]="[data-alpaca-layout-binding='"+l+"']"}}n.items.length>0?(e(a.container).addClass("alpaca-container-has-items"),e(a.container).attr("data-alpaca-container-item-count",n.items.length)):(e(a.container).removeClass("alpaca-container-has-items"),e(a.container).removeAttr("data-alpaca-container-item-count"));for(var o=0;o<n.items.length;o++){var s=n.items[o],u=e(a.container).find("."+t.MARKER_CLASS_CONTAINER_FIELD_ITEM+"["+t.MARKER_DATA_CONTAINER_FIELD_ITEM_KEY+"='"+s.name+"']");if(r){var c=r[s.name];if(c){var d=e(c,a.field);if(0==d.length)try{d=e("#"+c,a.field)}catch(p){}d.length>0&&(s.domEl=e("<div></div>"),e(s.domEl).addClass("alpaca-layout-binding-holder"),e(s.domEl).attr("alpaca-layout-binding-field-name",s.name),d.append(s.domEl),s.domEl.append(s.containerItemEl))}e(u).remove()}else{var d=e(u).parent();e(u).replaceWith(s.containerItemEl),s.domEl=d}e(s.containerItemEl).addClass("alpaca-container-item"),0===o&&e(s.containerItemEl).addClass("alpaca-container-item-first"),o+1===n.items.length&&e(s.containerItemEl).addClass("alpaca-container-item-last"),e(s.containerItemEl).attr("data-alpaca-container-item-index",o),e(s.containerItemEl).attr("data-alpaca-container-item-name",s.name),e(s.containerItemEl).attr("data-alpaca-container-item-parent-field-id",a.getId()),a.registerChild(s,o)}a.options.collapsible&&a.fireCallback("collapsible"),a.triggerUpdate(),i()},afterApplyCreatedItems:function(e,t){t()},registerChild:function(e,n){t.isEmpty(n)?this.children.push(e):this.children.splice(n,0,e),this.childrenById[e.getId()]=e,e.propertyId&&(this.childrenByPropertyId[e.propertyId]=e),e.parent=this},unregisterChild:function(e){var n=this.children[e];n&&(t.isEmpty(e)||this.children.splice(e,1),delete this.childrenById[n.getId()],n.propertyId&&delete this.childrenByPropertyId[n.propertyId],n.parent=null)},updateDOMElement:function(){var t=this;this.base(),t.children.length>0?(e(t.getContainerEl()).addClass("alpaca-container-has-items"),e(t.getContainerEl()).attr("data-alpaca-container-item-count",t.children.length)):(e(t.getContainerEl()).removeClass("alpaca-container-has-items"),e(t.getContainerEl()).removeAttr("data-alpaca-container-item-count"));for(var n=0;n<t.children.length;n++){var i=t.children[n];i.path||("array"===i.schema.type?i.path=t.path+"["+n+"]":i.path=t.path+"/"+i.propertyId),i.calculateName(),e(i.containerItemEl).removeClass("alpaca-container-item-first"),e(i.containerItemEl).removeClass("alpaca-container-item-last"),e(i.containerItemEl).removeClass("alpaca-container-item-index"),e(i.containerItemEl).removeClass("alpaca-container-item-key"),e(i.containerItemEl).addClass("alpaca-container-item"),0===n&&e(i.containerItemEl).addClass("alpaca-container-item-first"),n+1===t.children.length&&e(i.containerItemEl).addClass("alpaca-container-item-last"),e(i.containerItemEl).attr("data-alpaca-container-item-index",n),e(i.containerItemEl).attr("data-alpaca-container-item-name",i.name),e(i.containerItemEl).attr("data-alpaca-container-item-parent-field-id",t.getId()),t.updateChildDOMWrapperElement(n,i),i.updateDOMElement()}},updateChildDOMWrapperElement:function(e,t){},handleRepositionDOMRefresh:function(){var e=this;e.getParent()?e.getParent().updateDOMElement():e.updateDOMElement()},onDependentReveal:function(){for(var e=0;e<this.children.length;e++)this.children[e].onDependentReveal()},onDependentConceal:function(){for(var e=0;e<this.children.length;e++)this.children[e].onDependentConceal()},focus:function(t){var n=this;if(this.isDisplayOnly())return void(t&&t());this.base();var i=-1,a=[],r=this.getContainerEl();this.form&&(r=this.form.getFormEl()),e(r).find(".alpaca-container-item[data-alpaca-container-item-parent-field-id='"+this.getId()+"']").each(function(){var t=e(this).attr("data-alpaca-container-item-index");a.push(n.children[t])});for(var o=0;o<a.length;o++)if(a[o]&&!a[o].isValid(!0)&&a[o].isControlField&&a[o].isAutoFocusable()&&!a[o].options.readonly){i=o;break}-1===i&&a.length>0&&(i=0),i>-1&&(a[i].focus(),t&&t(a[i]))},disable:function(){this.base();for(var e=0;e<this.children.length;e++)this.children[e].disable()},enable:function(){this.base();for(var e=0;e<this.children.length;e++)this.children[e].enable()},getValue:function(){var e=this,t=e.getContainerValue();return t},getContainerValue:function(){return null},firstChild:function(){var e=null;return this.children.length>0&&(e=this.children[0]),e},lastChild:function(){var e=null;return this.children.length>0&&(e=this.children[this.children.length-1]),e},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{lazyLoading:{title:"Lazy Loading",description:"Child fields will only be rendered when the fieldset is expanded if this option is set true.",type:"boolean","default":!1},collapsible:{title:"Collapsible",description:"Field set is collapsible if true.",type:"boolean","default":!1},collapsed:{title:"Collapsed",description:"Field set is initially collapsed if true.",type:"boolean","default":!1},legendStyle:{title:"Legend Style",description:"Field set legend style.",type:"string","enum":["button","link"],"default":"button"},animate:{title:"Animate movements and transitions",description:"Up and down transitions will be animated",type:"boolean","default":!0}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{lazyLoading:{rightLabel:"Lazy loading child fields ?",helper:"Lazy loading will be enabled if checked.",type:"checkbox"},collapsible:{rightLabel:"Field set collapsible ?",helper:"Field set is collapsible if checked.",type:"checkbox"},collapsed:{rightLabel:"Field set initially collapsed ?",description:"Field set is initially collapsed if checked.",type:"checkbox"},legendStyle:{type:"select"},animate:{rightLabel:"Animate movements and transitions",type:"checkbox"}}})}})}(jQuery),function(e){var t=e.alpaca;t.Form=Base.extend({constructor:function(e,n,i,a,r){if(this.domEl=e,this.parent=null,this.connector=a,this.errorCallback=r,this.options=n,this.options.attributes?this.attributes=this.options.attributes:this.attributes={},this.options.buttons){this.options.buttons.submit&&(this.options.buttons.submit.type||(this.options.buttons.submit.type="submit"),this.options.buttons.submit.name||(this.options.buttons.submit.name="submit"),this.options.buttons.submit.value||(this.options.buttons.submit.value="Submit")),this.options.buttons.reset&&(this.options.buttons.reset.type||(this.options.buttons.reset.type="reset"),this.options.buttons.reset.name||(this.options.buttons.reset.name="reset"),this.options.buttons.reset.value||(this.options.buttons.reset.value="Reset"));for(var o in this.options.buttons)this.options.buttons[o].label&&(this.options.buttons[o].value=this.options.buttons[o].label),this.options.buttons[o].title&&(this.options.buttons[o].value=this.options.buttons[o].title),this.options.buttons[o].type||(this.options.buttons[o].type="button")}this.attributes.id?this.id=this.attributes.id:(this.id=t.generateId(),this.attributes.id=this.id),this.options.buttons&&this.options.buttons.submit&&t.isUndefined(this.options.toggleSubmitValidState)&&(this.options.toggleSubmitValidState=!0),this.viewType=n.viewType,this.view=new t.RuntimeView(i,this);for(var o in this.options.buttons)this.options.buttons[o].styles||(this.options.buttons[o].styles=this.view.styles.button)},render:function(e){var t=this;this.processRender(this.domEl,function(){t.form.appendTo(t.domEl),t.form.addClass("alpaca-form"),t.fireCallback("form"),e(t)})},afterInitialize:function(){var e=this;e.options.toggleSubmitValidState&&e.adjustSubmitButtonState()},isFormValid:function(){this.topControl.validate(!0);var e=this.topControl.isValid(!0);return e},isValid:function(){return this.isFormValid()},validate:function(e){return this.topControl.validate(e)},enableSubmitButton:function(){if(e(".alpaca-form-button-submit").attrProp("disabled",!1),e.mobile)try{e(".alpaca-form-button-submit").button("refresh")}catch(t){}},disableSubmitButton:function(){if(e(".alpaca-form-button-submit").attrProp("disabled",!0),e.mobile)try{e(".alpaca-form-button-submit").button("refresh")}catch(t){}},adjustSubmitButtonState:function(){this.disableSubmitButton(),this.isFormValid()&&this.enableSubmitButton()},processRender:function(n,i){var a=this;if(this.formDescriptor=this.view.getTemplateDescriptor("form"),!this.formDescriptor)return t.throwErrorWithCallback("Could not find template descriptor: form");var r=t.tmpl(this.formDescriptor,{id:this.getId(),options:this.options,view:this.view});r.appendTo(n),this.form=r,this.formFieldsContainer=e(this.form).find("."+t.MARKER_CLASS_FORM_ITEMS_FIELD),this.formFieldsContainer.removeClass(t.MARKER_CLASS_FORM_ITEMS_FIELD),t.isEmpty(this.form.attr("id"))&&this.form.attr("id",this.getId()+"-form-outer"),t.isEmpty(this.form.attr("data-alpaca-form-id"))&&this.form.attr("data-alpaca-form-id",this.getId()),e(n).find("form").attr(this.attributes),this.buttons={},e(n).find(".alpaca-form-button").each(function(){e(this).click(function(t){e(this).attr("button-pushed",!0)});var t=e(this).attr("data-key");if(t){var n=a.options.buttons[t];n&&n.click&&e(this).click(function(e,t){return function(n){n.preventDefault(),t.call(e,n)}}(a,n.click))}}),i()},getId:function(){return this.id},getType:function(){return this.type},getParent:function(){return this.parent},getValue:function(){return this.topControl.getValue()},setValue:function(e){this.topControl.setValue(e)},initEvents:function(){var t=this,n=e(this.domEl).find("form"),i=this.getValue();e(n).submit(i,function(e){return t.onSubmit(e,t)}),this.options.toggleSubmitValidState&&(e(t.topControl.getFieldEl()).bind("fieldupdate",function(){t.adjustSubmitButtonState()}),e(t.topControl.getFieldEl()).bind("fieldkeyup",function(){t.adjustSubmitButtonState()}),e(t.topControl.getFieldEl()).bind("fieldblur",function(){t.adjustSubmitButtonState()}))},getButtonEl:function(t){return e(this.domEl).find(".alpaca-form-button-"+t)},onSubmit:function(e,n){if(!this.isFormValid())return e.stopPropagation(),this.refreshValidationState(!0),!1;if(this.submitHandler){e.stopPropagation();var i=this.submitHandler(e,n);return t.isUndefined(i)&&(i=!1),i}},registerSubmitHandler:function(e){t.isFunction(e)&&(this.submitHandler=e)},refreshValidationState:function(e,t){this.topControl.refreshValidationState(e,t)},disable:function(){this.topControl.disable()},enable:function(){this.topControl.enable()},focus:function(e){this.topControl.focus(function(t){e&&e(t)})},destroy:function(e){this.getFormEl().remove(),!e&&this.parent&&this.parent.destroy()},show:function(){this.getFormEl().css({display:""})},hide:function(){this.getFormEl().css({display:"none"})},clear:function(e){this.topControl.clear(e)},isEmpty:function(){return this.topControl.isEmpty()},fireCallback:function(e,t,n,i,a,r){this.view.fireCallback(this,e,t,n,i,a,r)},getFormEl:function(){return this.form},submit:function(){this.form.submit()},ajaxSubmit:function(n){var i=this;n||(n={}),n.url=i.options.attributes.action,n.type=i.options.attributes.method,n.data||(n.data=this.getValue()),n.dataType||(n.dataType="json"),n.headers||(n.headers={});var a=i.determineCsrfToken();return a&&(n.headers[t.CSRF_HEADER_NAME]=a),e.ajax(n)},determineCsrfToken:function(){var e=t.CSRF_TOKEN;if(!e)for(var n=0;n<t.CSRF_COOKIE_NAMES.length;n++){var i=t.CSRF_COOKIE_NAMES[n],a=t.readCookie(i);if(a){e=a;break}}return e}})}(jQuery),function(e){var t=e.alpaca,n=36e5;t.Connector=Base.extend({constructor:function(e,a){this.id=e,this.config=a,this.isUri=function(e){return!t.isEmpty(e)&&t.isUri(e)},this.cache=new i("URL",!0,n)},connect:function(e,t){e()},loadTemplate:function(e,n,i){t.isEmpty(e)?i({message:"Empty data source.",reason:"TEMPLATE_LOADING_ERROR"}):t.isUri(e)?this.loadUri(e,!1,function(e){n&&t.isFunction(n)&&n(e)},function(e){i&&t.isFunction(i)&&i(e)}):n(e)},loadData:function(e,t,n,i){return this._handleLoadJsonResource(e,n,i)},loadSchema:function(e,t,n,i){return this._handleLoadJsonResource(e,n,i)},loadOptions:function(e,t,n,i){return this._handleLoadJsonResource(e,n,i)},loadView:function(e,t,n,i){return this._handleLoadJsonResource(e,n,i)},loadAll:function(e,n,i){var a=this,r=function(){var r=e.dataSource,o=e.schemaSource,l=e.optionsSource,s=e.viewSource;o||"string"!=typeof e.schema||(o=e.schema),l||"string"!=typeof e.options||(l=e.options),s||"string"!=typeof e.view||(s=e.view);var u={},c=0,d=0,p=function(){c===d&&n&&t.isFunction(n)&&n(u.data,u.options,u.schema,u.view)},h=function(e){i&&t.isFunction(i)&&i(e)};if(r&&d++,o&&d++,l&&d++,s&&d++,0===d)return void p();var f=function(e,n,i){u[e]=n,i&&("object"==typeof u[e]&&"object"==typeof i?t.mergeObject(u[e],i):u[e]=i)};r&&a.loadData(r,e,function(t){f("data",e.data,t),c++,p()},h),o&&a.loadSchema(o,e,function(t){f("schema",e.schema,t),c++,p()},h),l&&a.loadOptions(l,e,function(t){f("options",e.options,t),c++,p()},h),s&&a.loadView(s,e,function(t){f("view",e.view,t),c++,p()},h)},o=function(e){i&&t.isFunction(i)&&i(e)};a.connect(r,o)},loadJson:function(e,t,n){this.loadUri(e,!0,t,n)},buildAjaxConfig:function(e,t){var n={url:e,type:"get"};return t?n.dataType="json":n.dataType="text",n},loadUri:function(n,i,a,r){var o=this,l=o.buildAjaxConfig(n,i);l.success=function(e){o.cache.put(n,e),a&&t.isFunction(a)&&a(e)},l.error=function(e,i,a){r&&t.isFunction(r)&&r({message:"Unable to load data from uri : "+n,stage:"DATA_LOADING_ERROR",details:{jqXHR:e,textStatus:i,errorThrown:a}})};var s=o.cache.get(n);s!==!1&&a&&t.isFunction(a)?a(s):e.ajax(l)},loadReferenceSchema:function(e,t,n){return this._handleLoadJsonResource(e,t,n)},loadReferenceOptions:function(e,t,n){return this._handleLoadJsonResource(e,t,n)},_handleLoadJsonResource:function(e,t,n){this.isUri(e)?this.loadJson(e,function(e){t(e)},n):t(e)},loadDataSource:function(e,t,n){return this._handleLoadDataSource(e,t,n)},_handleLoadDataSource:function(e,n,i){var a=e;return t.isObject(a)&&(a=e.url),this._handleLoadJsonResource(a,n,i)}}),t.registerConnectorClass("default",t.Connector);var i=function(e,t,n){switch(t?this.on=!0:this.on=!1,null!=n&&(this.defaultLifetime=n),this.type=e,this.type){case"URL":this.put=this.put_url;break;case"GET":this.put=this.put_GET}};i.prototype.on=!1,i.prototype.type=void 0,i.prototype.defaultLifetime=18e5,i.prototype.items={},i.prototype.put_url=function(e,t,n){null==n&&(n=this.defaultLifetime);var i=this.make_key(e);return this.items[i]={},this.items[i].key=i,this.items[i].url=e,this.items[i].response=t,this.items[i].expire=(new Date).getTime()+n,!0},i.prototype.put_GET=function(e,t,n,i){null==i&&(i=this.defaultLifetime);var a=this.make_key(e,[t]);return this.items[a]={},this.items[a].key=a,this.items[a].url=e,this.items[a].data=t,this.items[a].response=n,this.items[a].expire=(new Date).getTime()+i,!0},i.prototype.get=function(e,t){var n=this.make_key(e,t);return null==this.items[n]?!1:this.items[n].expire<(new Date).getTime()?!1:this.items[n].response},i.prototype.make_key=function(e,t){var n=e;switch(this.type){case"URL":break;case"GET":n+=this.stringify(t[0])}return n},i.prototype.flush=function(){return cache.items={},!0},i.prototype.stringify=function(e,t,n){var i;if(gap="",indent="","number"==typeof n)for(i=0;n>i;i+=1)indent+=" ";else"string"==typeof n&&(indent=n);if(rep=t,t&&"function"!=typeof t&&("object"!=typeof t||"number"!=typeof t.length))throw new Error("JSON.stringify");return this.str("",{"":e})},i.prototype.quote=function(e){var t=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;return t.lastIndex=0,t.test(e)?'"'+e.replace(t,function(e){var t=meta[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'},i.prototype.str=function(e,t){var n,i,a,r,o,l=gap,s=t[e];switch(s&&"object"==typeof s&&"function"==typeof s.toJSON&&(s=s.toJSON(e)),"function"==typeof rep&&(s=rep.call(t,e,s)),typeof s){case"string":return this.quote(s);case"number":return isFinite(s)?String(s):"null";
case"boolean":case"null":return String(s);case"object":if(!s)return"null";if(gap+=indent,o=[],"[object Array]"===Object.prototype.toString.apply(s)){for(r=s.length,n=0;r>n;n+=1)o[n]=this.str(n,s)||"null";return a=0===o.length?"[]":gap?"[\n"+gap+o.join(",\n"+gap)+"\n"+l+"]":"["+o.join(",")+"]",gap=l,a}if(rep&&"object"==typeof rep)for(r=rep.length,n=0;r>n;n+=1)i=rep[n],"string"==typeof i&&(a=this.str(i,s),a&&o.push(this.quote(i)+(gap?": ":":")+a));else for(i in s)Object.hasOwnProperty.call(s,i)&&(a=this.str(i,s),a&&o.push(this.quote(i)+(gap?": ":":")+a));return a=0===o.length?"{}":gap?"{\n"+gap+o.join(",\n"+gap)+"\n"+l+"}":"{"+o.join(",")+"}",gap=l,a}}}(jQuery),function(e){var t=e.alpaca;t.CloudCmsConnector=t.Connector.extend({connect:function(e,n){var i=this,a=function(t,a){return t?void n(t):(a&&(i.branch=Chain(a),i.bindHelperFunctions(i.branch)),void e())};t.globalContext&&t.globalContext.branch?a(null,t.globalContext.branch):(i.branch=null,i.doConnect(function(e,t){a(e,t)}))},doConnect:function(e){this.config.key||(this.config.key="default"),Gitana.connect(this.config,function(t){return t?void e(t):void(this.getDriver().getOriginalConfiguration().loadAppHelper?this.datastore("content").readBranch("master").then(function(){e(null,this)}):e())})},bindHelperFunctions:function(e){e.loadAlpacaSchema||(e.loadAlpacaSchema=function(t,n,i){var a=function(){return e.getUri()+"/alpaca/schema"},r={};return r.id=t,this.chainGetResponse(this,a,r).then(function(e){i.call(this,null,e)})}),e.loadAlpacaOptions||(e.loadAlpacaOptions=function(t,n,i){var a=function(){return e.getUri()+"/alpaca/options"},r={};return r.schemaId=n.schemaSource,r.id=t,this.chainGetResponse(this,a,r).then(function(e){i.call(this,null,e)})}),e.loadAlpacaData||(e.loadAlpacaData=function(t,n,i){var a=function(){return e.getUri()+"/alpaca/data"},r={};return r.id=t,this.chainGetResponse(this,a,r).then(function(e){i.call(this,null,e)})}),e.loadAlpacaDataSource||(e.loadAlpacaDataSource=function(n,i,a){var r={};i&&t.copyInto(r,i);var o=function(){return e.getUri()+"/alpaca/datasource"};return this.chainPostResponse(this,o,r,n).then(function(e){a.call(this,null,e.datasource)})})},loadData:function(e,t,n,i){var a=this;return a.branch?void a.branch.loadAlpacaData(e,t,function(e,t){if(e)return void i(e);var a=null;t&&(a=JSON.parse(JSON.stringify(t))),n(a)}):this.base(e,t,n,i)},loadSchema:function(e,t,n,i){var a=this;return a.branch?void a.branch.loadAlpacaSchema(e,t,function(e,t){return e?void i(e):void n(t)}):this.base(e,t,n,i)},loadOptions:function(e,n,i,a){var r=this;return r.branch?void r.branch.loadAlpacaOptions(e,n,function(e,n){return e?void a(e):(n||(n={}),n.form.buttons={submit:{title:"Submit",click:function(e){var t=this,n=this.getValue();n||(n={});var i=this.ajaxSubmit({xhrFields:{withCredentials:!0},crossDomain:!0,processData:!1,data:JSON.stringify(n),contentType:"application/json; charset=utf-8"});i.done(function(){t.topControl.trigger("formSubmitSuccess")}),i.fail(function(){t.topControl.trigger("formSubmitFail")})}}},"undefined"==typeof n.focus&&(n.focus=t.defaultFocus),n.form.attributes.action=r.config.baseURL+n.form.attributes.action,void i(n))}):this.base(e,n,i,a)},loadReferenceSchema:function(e,t,n){var i=this;return i.loadSchema(e,t,n)},loadReferenceOptions:function(e,t,n){var i=this;return i.loadOptions(e,t,n)},loadDataSource:function(e,t,n){var i=this;if(!i.branch)return this.base(e,t,n);var a=e.pagination;return delete e.pagination,i.branch.loadAlpacaDataSource(e,a,function(e,i){return e?void n(e):void t(i)})}}),t.registerConnectorClass("cloudcms",t.CloudCmsConnector)}(jQuery),function(e){var t=e.alpaca;t.Fields.TextField=t.ControlField.extend({getFieldType:function(){return"text"},setup:function(){this.base(),this.inputType||(this.inputType="text"),this.options.inputType&&(this.inputType=this.options.inputType),this.options.data||(this.options.data={}),this.options.attributes||(this.options.attributes={}),"undefined"==typeof this.options.allowOptionalEmpty&&(this.options.allowOptionalEmpty=!0),this.options.autocomplete&&"string"==typeof this.options.autocomplete&&("on"===this.options.autocomplete.toLowerCase()?this.options.autocomplete=!0:"true"===this.options.autocomplete.toLowerCase()?this.options.autocomplete=!0:"yes"===this.options.autocomplete.toLowerCase()?this.options.autocomplete=!0:this.options.autocomplete=!1),"undefined"==typeof this.options.autocomplete&&(this.options.autocomplete=!1),"undefined"==typeof this.options.disallowEmptySpaces&&(this.options.disallowEmptySpaces=!1),"undefined"==typeof this.options.disallowOnlyEmptySpaces&&(this.options.disallowOnlyEmptySpaces=!1)},destroy:function(){this.base(),this.control&&this.control.typeahead&&this.options.typeahead&&e(this.control).typeahead("destroy")},postRender:function(e){var t=this;this.base(function(){t.control&&(t.applyAutocomplete(),t.applyMask(),t.applyTypeAhead(),t.updateMaxLengthIndicator()),e()})},applyAutocomplete:function(){var t=this;"undefined"!=typeof t.options.autocomplete&&(e(t.field).addClass("alpaca-autocomplete"),e(t.control).attr("autocomplete",t.options.autocomplete?"on":"off"),t.fireCallback("autocomplete"))},applyMask:function(){var e=this;e.control.mask&&e.options.maskString&&e.control.mask(e.options.maskString)},applyTypeAhead:function(){var n=this;if(n.control.typeahead&&n.options.typeahead&&!t.isEmpty(n.options.typeahead)){var i=n.options.typeahead.config;i||(i={});var a=n.options.typeahead.datasets;a||(a={}),a.name||(a.name=n.getId());var r=n.options.typeahead.events;if(r||(r={}),"local"===a.type||"remote"===a.type||"prefetch"===a.type){var o={datumTokenizer:function(e){var t="";for(var n in e)(e.hasOwnProperty(n)||e[n])&&(t+=" "+e[n]);return Bloodhound.tokenizers.whitespace(t)},queryTokenizer:Bloodhound.tokenizers.whitespace};if("local"===a.type){var l=[];if("function"==typeof a.source)o.local=a.source;else{for(var s=0;s<a.source.length;s++){var u=a.source[s];"string"==typeof u&&(u={value:u}),l.push(u)}o.local=l}a.local&&(o.local=a.local)}"prefetch"===a.type&&(o.prefetch={url:a.source},a.filter&&(o.prefetch.filter=a.filter)),"remote"===a.type&&(o.remote={url:a.source},a.filter&&(o.remote.filter=a.filter),a.replace&&(o.remote.replace=a.replace));var c=new Bloodhound(o);c.initialize(),a.source=c.ttAdapter()}if(a.templates)for(var d in a.templates){var p=a.templates[d];"string"==typeof p&&(a.templates[d]=Handlebars.compile(p))}e(n.control).typeahead(i,a),e(n.control).on("typeahead:autocompleted",function(t,i){n.setValue(i.value),e(n.control).change()}),e(n.control).on("typeahead:selected",function(t,i){n.setValue(i.value),e(n.control).change()}),r&&(r.autocompleted&&e(n.control).on("typeahead:autocompleted",function(e,t){r.autocompleted(e,t)}),r.selected&&e(n.control).on("typeahead:selected",function(e,t){r.selected(e,t)}));var h=e(n.control);e(n.control).change(function(){var t=e(this).val(),n=e(h).typeahead("val");n!==t&&e(h).typeahead("val",n)}),e(n.field).find("span.twitter-typeahead").first().css("display","block"),e(n.field).find("span.twitter-typeahead input.tt-input").first().css("background-color","")}},prepareControlModel:function(e){var t=this;this.base(function(n){n.inputType=t.inputType,e(n)})},updateMaxLengthIndicator:function(){var n=this,i=!1,a="";if(!t.isEmpty(n.schema.maxLength)&&n.options.showMaxLengthIndicator){var r=n.getValue()||"",o=n.schema.maxLength-r.length;o>=0?a="You have "+o+" characters remaining":(a="Your message is too long by "+-1*o+" characters",i=!0);var l=e(n.field).find(".alpaca-field-text-max-length-indicator");0===l.length&&(l=e("<p class='alpaca-field-text-max-length-indicator'></p>"),e(n.control).after(l)),e(l).html(a),e(l).removeClass("err"),i&&e(l).addClass("err")}},getControlValue:function(){var t=this,n=this._getControlVal(!0);if(t.control.mask&&t.options.maskString){var i=e(this.control).data(e.mask.dataName);i&&(n=i(),n=t.ensureProperType(n))}return n},setValue:function(e){this.control&&this.control.length>0&&(t.isEmpty(e)?this.control.val(""):this.control.val(e)),this.base(e),this.updateMaxLengthIndicator()},handleValidate:function(){var e=this.base(),n=this.validation,i=this._validatePattern();return n.invalidPattern={message:i?"":t.substituteTokens(this.getMessage("invalidPattern"),[this.schema.pattern]),status:i},i=this._validateMaxLength(),n.stringTooLong={message:i?"":t.substituteTokens(this.getMessage("stringTooLong"),[this.schema.maxLength]),status:i},i=this._validateMinLength(),n.stringTooShort={message:i?"":t.substituteTokens(this.getMessage("stringTooShort"),[this.schema.minLength]),status:i},e&&n.invalidPattern.status&&n.stringTooLong.status&&n.stringTooShort.status},_validatePattern:function(){if(this.schema.pattern){var e=this.getValue();if(""===e&&this.options.allowOptionalEmpty&&!this.isRequired())return!0;if(t.isEmpty(e)&&(e=""),"string"==typeof e&&!e.match(this.schema.pattern))return!1}return!0},_validateMinLength:function(){if(!t.isEmpty(this.schema.minLength)){var e=this.getValue();if(e!==e&&(e=""),""===e&&this.options.allowOptionalEmpty&&!this.isRequired())return!0;if(t.isEmpty(e)&&(e=""),(""+e).length<this.schema.minLength)return!1}return!0},_validateMaxLength:function(){if(!t.isEmpty(this.schema.maxLength)){var e=this.getValue();if(""===e&&this.options.allowOptionalEmpty&&!this.isRequired())return!0;if(t.isEmpty(e)&&(e=""),(""+e).length>this.schema.maxLength)return!1}return!0},focus:function(t){if(this.control&&this.control.length>0){var n=e(this.control).get(0);try{var i=n.value?n.value.length:0;n.selectionStart=i,n.selectionEnd=i}catch(a){}n.focus(),t&&t(this)}},getType:function(){return"string"},onKeyPress:function(e){var n=this;if(9!==e.keyCode&&37!==e.keyCode&&38!==e.keyCode&&39!==e.keyCode&&40!==e.keyCode){if(8===e.keyCode){if(!t.isEmpty(n.schema.minLength)&&(n.options.constrainLengths||n.options.constrainMinLength)){var i=n.getValue()||"";i.length<=n.schema.minLength&&(e.preventDefault(),e.stopImmediatePropagation())}}else if(!t.isEmpty(n.schema.maxLength)&&(n.options.constrainLengths||n.options.constrainMaxLength)){var i=n.getValue()||"";i.length>=n.schema.maxLength&&(e.preventDefault(),e.stopImmediatePropagation())}32===e.keyCode&&n.options.disallowEmptySpaces&&(e.preventDefault(),e.stopImmediatePropagation())}},onKeyUp:function(t){var n=this;n.updateMaxLengthIndicator(),e(this.field).trigger("fieldkeyup")},getTitle:function(){return"Single-Line Text"},getDescription:function(){return"Text field for single-line text."},getSchemaOfSchema:function(){return t.merge(this.base(),{properties:{minLength:{title:"Minimal Length",description:"Minimal length of the property value.",type:"number"},maxLength:{title:"Maximum Length",description:"Maximum length of the property value.",type:"number"},pattern:{title:"Pattern",description:"Regular expression for the property value.",type:"string"}}})},getOptionsForSchema:function(){return t.merge(this.base(),{fields:{"default":{helper:"Field default value",type:"text"},minLength:{type:"integer"},maxLength:{type:"integer"},pattern:{type:"text"}}})},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{size:{title:"Field Size",description:"Field size.",type:"number","default":40},maskString:{title:"Mask Expression",description:"Expression for the field mask. Field masking will be enabled if not empty.",type:"string"},placeholder:{title:"Field Placeholder",description:"Field placeholder.",type:"string"},typeahead:{title:"Type Ahead",description:"Provides configuration for the $.typeahead plugin if it is available. For full configuration options, see: https://github.com/twitter/typeahead.js"},allowOptionalEmpty:{title:"Allow Optional Empty",description:"Allows this non-required field to validate when the value is empty"},inputType:{title:"HTML5 Input Type",description:"Allows for the override of the underlying HTML5 input type. If not specified, an assumed value is provided based on the kind of input control (i.e. 'text', 'date', 'email' and so forth)",type:"string"},data:{title:"Data attributes for the underlying DOM input control",description:"Allows you to specify a key/value map of data attributes that will be added as DOM attribuets for the underlying input control. The data attributes will be added as data-{name}='{value}'.",type:"object"},autocomplete:{title:"HTML autocomplete attribute for the underlying DOM input control",description:"Allows you to specify the autocomplete attribute for the underlying input control whether or not field should have autocomplete enabled.",type:"string"},disallowEmptySpaces:{title:"Disallow Empty Spaces",description:"Whether to disallow the entry of empty spaces in the text",type:"boolean","default":!1},disallowOnlyEmptySpaces:{title:"Disallow Only Empty Spaces",description:"Whether to disallow the entry of only empty spaces in the text",type:"boolean","default":!1}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{size:{type:"integer"},maskString:{helper:"a - an alpha character;9 - a numeric character;* - an alphanumeric character",type:"text"},typeahead:{type:"object"},allowOptionalEmpty:{type:"checkbox"},inputType:{type:"text"},data:{type:"object"}}})}}),t.registerMessages({invalidPattern:"This field should have pattern {0}",stringTooShort:"This field should contain at least {0} numbers or characters",stringTooLong:"This field should contain at most {0} numbers or characters"}),t.registerFieldClass("text",t.Fields.TextField),t.registerDefaultSchemaFieldMapping("string","text")}(jQuery),function(e){var t=e.alpaca;t.Fields.TextAreaField=t.Fields.TextField.extend({getFieldType:function(){return"textarea"},setup:function(){this.base(),this.options.rows||(this.options.rows=5),this.options.cols||(this.options.cols=40)},handleValidate:function(){var e=this.base(),n=this.validation,i=this._validateWordCount();return n.wordLimitExceeded={message:i?"":t.substituteTokens(this.getMessage("wordLimitExceeded"),[this.options.wordlimit]),status:i},e&&n.wordLimitExceeded.status},_validateWordCount:function(){if(this.options.wordlimit&&this.options.wordlimit>-1){var e=this.data;if(e){var t=e.split(" ").length;if(t>this.options.wordlimit)return!1}}return!0},getTitle:function(){return"Multi-Line Text"},getDescription:function(){return"Textarea field for multiple line text."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{rows:{title:"Rows",description:"Number of rows",type:"number","default":5},cols:{title:"Columns",description:"Number of columns",type:"number","default":40},wordlimit:{title:"Word Limit",description:"Limits the number of words allowed in the text area.",type:"number","default":-1}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{rows:{type:"integer"},cols:{type:"integer"},wordlimit:{type:"integer"}}})}}),t.registerMessages({wordLimitExceeded:"The maximum word limit of {0} has been exceeded."}),t.registerFieldClass("textarea",t.Fields.TextAreaField)}(jQuery),function(e){var t=e.alpaca;t.Fields.CheckBoxField=t.ControlField.extend({getFieldType:function(){return"checkbox"},setup:function(){var n=this;if(n.base(),"undefined"==typeof n.options.multiple&&("array"===n.schema.type?n.options.multiple=!0:"undefined"!=typeof n.schema["enum"]&&(n.options.multiple=!0)),n.options.multiple){if(n.checkboxOptions=[],n.getEnum()){n.sortEnum();var i=n.getOptionLabels();e.each(n.getEnum(),function(e,a){var r=a;i&&(t.isEmpty(i[e])?t.isEmpty(i[a])||(r=i[a]):r=i[e]),n.checkboxOptions.push({value:a,text:r})})}n.options.datasource&&!n.options.dataSource&&(n.options.dataSource=n.options.datasource,delete n.options.datasource),"undefined"==typeof n.options.useDataSourceAsEnum&&(n.options.useDataSourceAsEnum=!0)}else this.options.rightLabel||(this.options.rightLabel="")},prepareControlModel:function(e){var t=this;this.base(function(n){t.checkboxOptions&&(n.checkboxOptions=t.checkboxOptions),e(n)})},getEnum:function(){var e=this.base();return e||this.schema&&this.schema.items&&this.schema.items["enum"]&&(e=this.schema.items["enum"]),e},getOptionLabels:function(){var e=this.base();return e||this.options&&this.options.items&&this.options.items.optionLabels&&(e=this.options.items.optionLabels),e},onClick:function(e){this.refreshValidationState()},beforeRenderControl:function(e,t){var n=this;this.base(e,function(){n.options.dataSource?(n.options.multiple=!0,n.checkboxOptions||(e.checkboxOptions=n.checkboxOptions=[]),n.checkboxOptions.length=0,n.invokeDataSource(n.checkboxOptions,e,function(e){if(n.options.useDataSourceAsEnum){for(var i=[],a=[],r=0;r<n.checkboxOptions.length;r++)i.push(n.checkboxOptions[r].value),a.push(n.checkboxOptions[r].text);n.setEnum(i),n.setOptionLabels(a)}t()})):t()})},postRender:function(t){var n=this;this.base(function(){if(n.data&&"undefined"!=typeof n.data&&n.setValue(n.data),n.options.multiple&&(e(n.getFieldEl()).find("input:checkbox").prop("checked",!1),n.data)){var i=n.data;if("string"==typeof n.data){i=n.data.split(",");for(var a=0;a<i.length;a++)i[a]=e.trim(i[a])}for(var r in i)e(n.getFieldEl()).find('input:checkbox[data-checkbox-value="'+i[r]+'"]').prop("checked",!0)}e(n.getFieldEl()).find("input:checkbox").change(function(e){n.triggerWithPropagation("change")}),t()})},getControlValue:function(){var n=this,i=null;if(n.options.multiple){for(var a=[],r=0;r<n.checkboxOptions.length;r++){var o=e(n.getFieldEl()).find("input[data-checkbox-index='"+r+"']");if(t.checked(o)){var l=e(o).attr("data-checkbox-value");a.push(l)}}"array"===n.schema.type?i=a:"string"===n.schema.type&&(i=a.join(","))}else{var s=e(n.getFieldEl()).find("input");i=s.length>0?t.checked(e(s[0])):!1}return i},setValue:function(n){var i=this,a=function(n){t.isString(n)&&(n="true"===n);var a=e(i.getFieldEl()).find("input");a.length>0&&t.checked(e(a[0]),n)},r=function(a){"string"==typeof a&&(a=a.split(","));for(var r=0;r<a.length;r++)a[r]=t.trim(a[r]);t.checked(e(i.getFieldEl()).find("input[data-checkbox-value]"),!1);for(var o=0;o<a.length;o++){var l=e(i.getFieldEl()).find('input[data-checkbox-value="'+a[o]+'"]');l.length>0&&t.checked(e(l[0]),n)}},o=!1;i.options.multiple?"string"==typeof n?(r(n),o=!0):t.isArray(n)&&(r(n),o=!0):"boolean"==typeof n?(a(n),o=!0):"string"==typeof n&&(a(n),o=!0),!o&&n&&t.logError("CheckboxField cannot set value for schema.type="+i.schema.type+" and value="+n),this.base(n)},_validateEnum:function(){var e=this;if(!e.options.multiple)return!0;var n=e.getValue();return!e.isRequired()&&t.isValEmpty(n)?!0:("string"==typeof n&&(n=n.split(",")),t.anyEquality(n,e.getEnum()))},disable:function(){e(this.control).find("input").each(function(){e(this).disabled=!0,e(this).prop("disabled",!0)})},enable:function(){e(this.control).find("input").each(function(){e(this).disabled=!1,e(this).prop("disabled",!1)})},getType:function(){return"boolean"},getTitle:function(){return"Checkbox Field"},getDescription:function(){return"Checkbox Field for boolean (true/false), string ('true', 'false' or comma-delimited string of values) or data array."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{rightLabel:{title:"Option Label",description:"Optional right-hand side label for single checkbox field.",type:"string"},multiple:{title:"Multiple",description:"Whether to render multiple checkboxes for multi-valued type (such as an array or a comma-delimited string)",type:"boolean"},dataSource:{title:"Option DataSource",description:"Data source for generating list of options. This can be a string or a function. If a string, it is considered to be a URI to a service that produces a object containing key/value pairs or an array of elements of structure {'text': '', 'value': ''}. This can also be a function that is called to produce the same list.",type:"string"},useDataSourceAsEnum:{title:"Use Data Source as Enumerated Values",description:"Whether to constrain the field's schema enum property to the values that come back from the data source.",type:"boolean","default":!0}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{rightLabel:{type:"text"},multiple:{type:"checkbox"},dataSource:{type:"text"}}})}}),t.registerFieldClass("checkbox",t.Fields.CheckBoxField),t.registerDefaultSchemaFieldMapping("boolean","checkbox")}(jQuery),function(e){var t=e.alpaca;t.Fields.FileField=t.Fields.TextField.extend({getFieldType:function(){return"file"},setValue:function(e){this.data=e,this.data=e,this.updateObservable(),this.triggerUpdate()},getControlValue:function(){return this.data},onChange:function(e){this.base(e),this.options.selectionHandler&&this.processSelectionHandler(e.target.files)},processSelectionHandler:function(e){if(e&&e.length>0&&"undefined"!=typeof FileReader){var t=[],n=0,i=new FileReader;i.onload=function(){var i=this;return function(a){var r=a.target.result;t.push(r),n++,n===e.length&&i.options.selectionHandler.call(i,e,t)}}.call(this);for(var a=0;a<e.length;a++)i.readAsDataURL(e[a])}},getTitle:function(){return"File Field"},getDescription:function(){return"Field for uploading files."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{selectionHandler:{title:"Selection Handler",description:"Function that should be called when files are selected. Requires HTML5.",type:"boolean","default":!1}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{selectionHandler:{type:"checkbox"}}})}}),t.registerFieldClass("file",t.Fields.FileField)}(jQuery),function(e){var t=e.alpaca;t.Fields.ListField=t.ControlField.extend({setup:function(){var n=this;if(n.base(),n.selectOptions=[],n.getEnum()){n.sortEnum();var i=n.getOptionLabels();e.each(n.getEnum(),function(e,a){var r=a;i&&(t.isEmpty(i[e])?t.isEmpty(i[a])||(r=i[a]):r=i[e]),n.selectOptions.push({value:a,text:r})})}if(n.isRequired()&&!n.data&&n.options.removeDefaultNone===!0){var a=n.getEnum();a&&a.length>0&&(n.data=a[0])}n.options.datasource&&!n.options.dataSource&&(n.options.dataSource=n.options.datasource,delete n.options.datasource),"undefined"==typeof n.options.useDataSourceAsEnum&&(n.options.useDataSourceAsEnum=!0)},prepareControlModel:function(e){var t=this;this.base(function(n){"undefined"==typeof t.options.noneLabel&&(t.options.noneLabel=t.getMessage("noneLabel")),"undefined"==typeof t.options.hideNone&&("undefined"!=typeof t.options.removeDefaultNone?t.options.hideNone=t.options.removeDefaultNone:t.options.hideNone=t.isRequired()),e(n)})},convertValue:function(n){var i=this;return t.isArray(n)?e.each(n,function(t,a){e.each(i.selectOptions,function(e,i){i.value===a&&(n[t]=i.value)})}):e.each(this.selectOptions,function(e,t){t.value===n&&(n=t.value)}),n},beforeRenderControl:function(e,t){var n=this;this.base(e,function(){n.options.dataSource?(n.selectOptions.length=0,n.invokeDataSource(n.selectOptions,e,function(){if(n.options.useDataSourceAsEnum){for(var e=[],i=[],a=0;a<n.selectOptions.length;a++)e.push(n.selectOptions[a].value),i.push(n.selectOptions[a].text);n.setEnum(e),n.setOptionLabels(i)}t()})):t()})},getSchemaOfSchema:function(){return t.merge(this.base(),{properties:{"enum":{title:"Enumeration",description:"List of field value options",type:"array",required:!0}}})},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{dataSource:{title:"Option Datasource",description:"Datasource for generating list of options. This can be a string or a function. If a string, it is considered to be a URI to a service that produces a object containing key/value pairs or an array of elements of structure {'text': '', 'value': ''}. This can also be a function that is called to produce the same list.",type:"string"},removeDefaultNone:{title:"Remove Default None",description:"If true, the default 'None' option will not be shown.",type:"boolean","default":!1},noneLabel:{title:"None Label",description:"The label to use for the 'None' option in a list (select, radio or otherwise).",type:"string","default":"None"},hideNone:{title:"Hide None",description:"Whether to hide the None option from a list (select, radio or otherwise). This will be true if the field is required and false otherwise.",type:"boolean","default":!1},useDataSourceAsEnum:{title:"Use Data Source as Enumerated Values",description:"Whether to constrain the field's schema enum property to the values that come back from the data source.",type:"boolean","default":!0}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{dataSource:{type:"text"},removeDefaultNone:{type:"checkbox",rightLabel:"Remove Default None"},noneLabel:{type:"text"},hideNone:{type:"checkbox",rightLabel:"Hide the 'None' option from the list"}}})}}),t.registerMessages({noneLabel:"None"})}(jQuery),function(e){var t=e.alpaca;t.Fields.RadioField=t.Fields.ListField.extend({getFieldType:function(){return"radio"},setup:function(){this.base(),this.options.name?this.name=this.options.name:this.name||(this.name=this.getId()+"-name"),t.isUndefined(this.options.emptySelectFirst)&&(this.options.emptySelectFirst=!1),t.isUndefined(this.options.vertical)&&(this.options.vertical=!0)},getControlValue:function(){var t=this,n=null;return e(this.control).find(":checked").each(function(){n=e(this).val(),n=t.ensureProperType(n)}),n},setValue:function(n){var i=this;e(this.control).find("input").each(function(){t.checked(e(this),null)}),"undefined"!=typeof n&&t.checked(e(i.control).find('input[value="'+n+'"]'),"checked"),this.options.emptySelectFirst&&0===e(this.control).find("input:checked").length&&t.checked(e(i.control).find("input:radio").first(),"checked"),this.base(n)},initControlEvents:function(){var t=this;t.base();var n=e(this.control).find("input");n.focus(function(e){t.suspendBlurFocus||(t.onFocus.call(t,e),t.trigger("focus",e))}),n.blur(function(e){t.suspendBlurFocus||(t.onBlur.call(t,e),t.trigger("blur",e))})},prepareControlModel:function(e){var t=this;this.base(function(n){n.selectOptions=t.selectOptions,n.removeDefaultNone=t.options.removeDefaultNone,e(n)})},afterRenderControl:function(n,i){var a=this;this.base(n,function(){a.options.emptySelectFirst&&a.selectOptions&&a.selectOptions.length>0&&(a.data=a.selectOptions[0].value,0===e("input:radio:checked",a.control).length&&t.checked(e(a.control).find('input:radio[value="'+a.data+'"]'),"checked")),a.options.vertical?e(a.control).css("display","block"):e(a.control).css("display","inline-block"),i()})},onClick:function(t){var n=this,i=n.getValue();this.base(t);var a=e(t.currentTarget).find("input").val();"undefined"!=typeof a&&(n.setValue(a),n.refreshValidationState(),i!==a&&n.trigger("change"))},disable:function(){this.base(),this.getFieldEl().addClass("disabled")},enable:function(){this.base(),this.getFieldEl().removeClass("disabled")},getTitle:function(){return"Radio Group Field"},getDescription:function(){return"Radio Group Field with list of options."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{name:{title:"Field name",description:"Field name.",type:"string"},emptySelectFirst:{title:"Empty Select First",description:"If the data is empty, then automatically select the first item in the list.",type:"boolean","default":!1},vertical:{title:"Position the radio selector items vertically",description:"By default, radio controls are stacked vertically. Set to false if you'd like radio controls to lay out horizontally.",type:"boolean","default":!0}}})}}),t.registerFieldClass("radio",t.Fields.RadioField)}(jQuery),function(e){var t=e.alpaca;t.Fields.SelectField=t.Fields.ListField.extend({getFieldType:function(){return"select"},setup:function(){this.base()},getControlValue:function(){var e=this._getControlVal(!0);return"undefined"==typeof e&&(e=this.data),this.convertValue(e)},setValue:function(e){t.isArray(e)?t.compareArrayContent(e,this.getValue())||(!t.isEmpty(e)&&this.control&&this.control.val(e),this.base(e)):e!==this.getValue()&&(this.control&&"undefined"!=typeof e&&null!=e&&this.control.val(e),this.base(e))},getEnum:function(){if(this.schema){if(this.schema["enum"])return this.schema["enum"];if(this.schema.type&&"array"===this.schema.type&&this.schema.items&&this.schema.items["enum"])return this.schema.items["enum"]}},initControlEvents:function(){var e=this;if(e.base(),e.options.multiple){var t=this.control.parent().find("button.multiselect");t.focus(function(t){e.suspendBlurFocus||(e.onFocus.call(e,t),e.trigger("focus",t))}),t.blur(function(t){e.suspendBlurFocus||(e.onBlur.call(e,t),e.trigger("blur",t))})}},beforeRenderControl:function(e,t){var n=this;this.base(e,function(){n.schema.type&&"array"===n.schema.type&&(n.options.multiple=!0),t()})},prepareControlModel:function(e){var t=this;this.base(function(n){n.selectOptions=t.selectOptions,e(n)})},afterRenderControl:function(n,i){var a=this;this.base(n,function(){if(t.isUndefined(a.data)&&a.options.emptySelectFirst&&a.selectOptions&&a.selectOptions.length>0&&(a.data=a.selectOptions[0].value),a.data&&a.setValue(a.data),a.options.multiple&&e.fn.multiselect){var n=null;n=a.options.multiselect?a.options.multiselect:{},n.nonSelectedText||(n.nonSelectedText="None",a.options.noneLabel&&(n.nonSelectedText=a.options.noneLabel)),a.options.hideNone&&delete n.nonSelectedText,e(a.getControlEl()).multiselect(n)}i()})},_validateEnum:function(){var n=this;if(this.schema["enum"]){var i=this.data;if(!this.isRequired()&&t.isValEmpty(i))return!0;if(this.options.multiple){var a=!0;return i||(i=[]),t.isArray(i)||t.isObject(i)||(i=[i]),e.each(i,function(t,i){return e.inArray(i,n.schema["enum"])<=-1?(a=!1,!1):void 0}),a}return t.isArray(i)&&(i=i[0]),e.inArray(i,this.schema["enum"])>-1}return!0},onChange:function(e){this.base(e);var n=this;t.later(25,this,function(){var e=n.getValue();n.setValue(e),n.refreshValidationState()})},_validateMinItems:function(){return!(this.schema.items&&this.schema.items.minItems&&e(":selected",this.control).length<this.schema.items.minItems)},_validateMaxItems:function(){return!(this.schema.items&&this.schema.items.maxItems&&e(":selected",this.control).length>this.schema.items.maxItems)},handleValidate:function(){var e=this.base(),n=this.validation,i=this._validateMaxItems();return n.tooManyItems={message:i?"":t.substituteTokens(this.getMessage("tooManyItems"),[this.schema.items.maxItems]),status:i},i=this._validateMinItems(),n.notEnoughItems={message:i?"":t.substituteTokens(this.getMessage("notEnoughItems"),[this.schema.items.minItems]),status:i},e&&n.tooManyItems.status&&n.notEnoughItems.status},focus:function(t){if(this.control&&this.control.length>0){var n=e(this.control).get(0);n.focus(),t&&t(this)}},getTitle:function(){return"Select Field"},getDescription:function(){return"Select Field"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{multiple:{title:"Mulitple Selection",description:"Allow multiple selection if true.",type:"boolean","default":!1},size:{title:"Displayed Options",description:"Number of options to be shown.",type:"number"},emptySelectFirst:{title:"Empty Select First",description:"If the data is empty, then automatically select the first item in the list.",type:"boolean","default":!1},multiselect:{title:"Multiselect Plugin Settings",description:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{multiple:{rightLabel:"Allow multiple selection ?",helper:"Allow multiple selection if checked",type:"checkbox"},size:{type:"integer"},emptySelectFirst:{type:"checkbox",rightLabel:"Empty Select First"},multiselect:{type:"object",rightLabel:"Multiselect plugin properties - http://davidstutz.github.io/bootstrap-multiselect"}}})}}),t.registerFieldClass("select",t.Fields.SelectField)}(jQuery),function(e){var t=e.alpaca;t.Fields.NumberField=t.Fields.TextField.extend({setup:function(){this.base(),"undefined"==typeof this.options.numericEntry&&(this.options.numericEntry=!1)},getFieldType:function(){return"number"},postRender:function(e){var t=this;this.base(function(){t.control&&t.on("keypress",function(e){var n=e.charCode||e.keyCode||0,i=!0;return t.options.numericEntry&&(i=i&&n>=48&&57>=n),i||(e.preventDefault(),
e.stopImmediatePropagation()),i}),e()})},getControlValue:function(){var e=this._getControlVal(!0);return"undefined"==typeof e||""==e?e:parseFloat(e)},handleValidate:function(){var e=this.base(),n=this.validation,i=this._validateNumber();return n.stringNotANumber={message:i?"":this.getMessage("stringNotANumber"),status:i},i=this._validateDivisibleBy(),n.stringDivisibleBy={message:i?"":t.substituteTokens(this.getMessage("stringDivisibleBy"),[this.schema.divisibleBy]),status:i},i=this._validateMaximum(),n.stringValueTooLarge={message:"",status:i},i||(this.schema.exclusiveMaximum?n.stringValueTooLarge.message=t.substituteTokens(this.getMessage("stringValueTooLargeExclusive"),[this.schema.maximum]):n.stringValueTooLarge.message=t.substituteTokens(this.getMessage("stringValueTooLarge"),[this.schema.maximum])),i=this._validateMinimum(),n.stringValueTooSmall={message:"",status:i},i||(this.schema.exclusiveMinimum?n.stringValueTooSmall.message=t.substituteTokens(this.getMessage("stringValueTooSmallExclusive"),[this.schema.minimum]):n.stringValueTooSmall.message=t.substituteTokens(this.getMessage("stringValueTooSmall"),[this.schema.minimum])),i=this._validateMultipleOf(),n.stringValueNotMultipleOf={message:"",status:i},i||(n.stringValueNotMultipleOf.message=t.substituteTokens(this.getMessage("stringValueNotMultipleOf"),[this.schema.multipleOf])),e&&n.stringNotANumber.status&&n.stringDivisibleBy.status&&n.stringValueTooLarge.status&&n.stringValueTooSmall.status&&n.stringValueNotMultipleOf.status&&n.invalidPattern.status&&n.stringTooLong.status&&n.stringTooShort.status},_validateOptional:function(){return!this.isRequired()||!t.isValEmpty(e(this.control).val())},_validateNumber:function(){var e=this._getControlVal();if("number"==typeof e&&(e=""+e),t.isValEmpty(e))return!0;var n=t.testRegex(t.regexps.number,e);if(!n)return!1;var i=this.getValue();return!isNaN(i)},_validateDivisibleBy:function(){var e=this.getValue();return!(!t.isEmpty(this.schema.divisibleBy)&&e%this.schema.divisibleBy!==0)},_validateMaximum:function(){var e=this.getValue();if(!t.isEmpty(this.schema.maximum)){if(e>this.schema.maximum)return!1;if(!t.isEmpty(this.schema.exclusiveMaximum)&&e==this.schema.maximum&&this.schema.exclusiveMaximum)return!1}return!0},_validateMinimum:function(){var e=this.getValue();if(!t.isEmpty(this.schema.minimum)){if(e<this.schema.minimum)return!1;if(!t.isEmpty(this.schema.exclusiveMinimum)&&e==this.schema.minimum&&this.schema.exclusiveMinimum)return!1}return!0},_validateMultipleOf:function(){var e=this.getValue();return t.isEmpty(this.schema.multipleOf)||!e||0===this.schema.multipleOf},getType:function(){return"number"},onKeyPress:function(e){var n=this;if(9!==e.keyCode&&37!==e.keyCode&&38!==e.keyCode&&39!==e.keyCode&&40!==e.keyCode){if(8===e.keyCode){if(!t.isEmpty(n.schema.minLength)&&(n.options.constrainLengths||n.options.constrainMinLength)){var i=n.getValue()||"";t.isNumber(i)&&(i=i.toString()),i.length<=n.schema.minLength&&(e.preventDefault(),e.stopImmediatePropagation())}}else if(!t.isEmpty(n.schema.maxLength)&&(n.options.constrainLengths||n.options.constrainMaxLength)){var i=n.getValue()||"";t.isNumber(i)&&(i=i.toString()),i.length>=n.schema.maxLength&&(e.preventDefault(),e.stopImmediatePropagation())}32===e.keyCode&&n.options.disallowEmptySpaces&&(e.preventDefault(),e.stopImmediatePropagation())}},onKeyUp:function(t){var n=this;n.updateMaxLengthIndicator(),e(this.field).trigger("fieldkeyup")},getSchemaOfSchema:function(){return t.merge(this.base(),{properties:{multipleOf:{title:"Multiple Of",description:"Property value must be a multiple of the multipleOf schema property such that division by this value yields an interger (mod zero).",type:"number"},minimum:{title:"Minimum",description:"Minimum value of the property.",type:"number"},maximum:{title:"Maximum",description:"Maximum value of the property.",type:"number"},exclusiveMinimum:{title:"Exclusive Minimum",description:"Property value can not equal the number defined by the minimum schema property.",type:"boolean","default":!1},exclusiveMaximum:{title:"Exclusive Maximum",description:"Property value can not equal the number defined by the maximum schema property.",type:"boolean","default":!1}}})},getOptionsForSchema:function(){return t.merge(this.base(),{fields:{multipleOf:{title:"Multiple Of",description:"The value must be a integral multiple of the property",type:"number"},minimum:{title:"Minimum",description:"Minimum value of the property",type:"number"},maximum:{title:"Maximum",description:"Maximum value of the property",type:"number"},exclusiveMinimum:{rightLabel:"Exclusive minimum ?",helper:"Field value must be greater than but not equal to this number if checked",type:"checkbox"},exclusiveMaximum:{rightLabel:"Exclusive Maximum ?",helper:"Field value must be less than but not equal to this number if checked",type:"checkbox"}}})},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{numericEntry:{title:"Numeric Entry",description:"Whether to constrain data entry key presses to numeric values (0-9)",type:"boolean","default":!1}}})},getTitle:function(){return"Number Field"},getDescription:function(){return"Field for float numbers."}}),t.registerMessages({stringValueTooSmall:"The minimum value for this field is {0}",stringValueTooLarge:"The maximum value for this field is {0}",stringValueTooSmallExclusive:"Value of this field must be greater than {0}",stringValueTooLargeExclusive:"Value of this field must be less than {0}",stringDivisibleBy:"The value must be divisible by {0}",stringNotANumber:"This value is not a number.",stringValueNotMultipleOf:"This value is not a multiple of {0}"}),t.registerFieldClass("number",t.Fields.NumberField),t.registerDefaultSchemaFieldMapping("number","number")}(jQuery),function(e){var t=e.alpaca;t.Fields.ArrayField=t.ContainerField.extend({getFieldType:function(){return"array"},setup:function(){var n=this;this.base();var i=n.resolveContainerItemTemplateType();if(!i)return t.throwErrorWithCallback("Unable to find template descriptor for container item: "+n.getFieldType());this.containerItemTemplateDescriptor=n.view.getTemplateDescriptor("container-"+i+"-item",n),this.options.toolbarStyle||(this.options.toolbarStyle=t.isEmpty(this.view.toolbarStyle)?"button":this.view.toolbarStyle),this.options.toolbarStyle||(this.options.toolbarStyle="button"),this.options.actionbarStyle||(this.options.actionbarStyle=t.isEmpty(this.view.actionbarStyle)?"top":this.view.actionbarStyle),this.options.actionbarStyle||(this.options.actionbarStyle="top"),this.schema.items||(this.schema.items={}),this.options.items||(this.options.items={}),this.schema.items.maxItems&&(this.schema.maxItems=this.schema.items.maxItems,delete this.schema.items.maxItems),this.schema.items.minItems&&(this.schema.minItems=this.schema.items.minItems,delete this.schema.items.minItems),this.schema.items.uniqueItems&&(this.schema.uniqueItems=this.schema.items.uniqueItems,delete this.schema.items.uniqueItems),this.options.rubyrails=!1,this.parent&&this.parent.options&&this.parent.options.form&&this.parent.options.form.attributes&&(t.isEmpty(this.parent.options.form.attributes.rubyrails)||(this.options.rubyrails=!0));var a=t.defaultToolbarSticky;if(t.isEmpty(this.view.toolbarSticky)||(a=this.view.toolbarSticky),t.isEmpty(this.options.toolbarSticky)||(a=this.options.toolbarSticky),this.options.toolbarSticky=a,"undefined"==typeof n.options.hideToolbarWithChildren&&(n.options.hideToolbarWithChildren=!0),this.schema.items&&this.schema.uniqueItems&&t.mergeObject(this.options,{forceRevalidation:!0}),"undefined"==typeof this.data&&(this.data=[]),null==this.data&&(this.data=[]),""==this.data&&(this.data=[]),t.isString(this.data))try{var r=t.parseJSON(this.data);if(!t.isArray(r)&&!t.isObject(r))return void t.logWarn("ArrayField parsed string data but it was not an array: "+this.data);this.data=r}catch(o){this.data=[this.data]}if(!t.isArray(this.data)&&!t.isObject(this.data))return void t.logWarn("ArrayField data is not an array: "+JSON.stringify(this.data,null," "));var l=function(e,t,i){var a=n.findAction(e,t);a||(a={core:!0},e.push(a));for(var r in i)a[r]||(a[r]=i[r])},s=function(e,t){var n=0;do"undefined"==typeof e[n].enabled&&(e[n].enabled=!0),t||delete e[n].label,e[n].enabled?n++:e.splice(n,1);while(n<e.length);e.sort(function(e,t){return e.core&&!t.core?-1:!e.core&&t.core?1:0})};if(n.toolbar={},n.options.toolbar)for(var u in n.options.toolbar)n.toolbar[u]=t.copyOf(n.options.toolbar[u]);if("undefined"==typeof n.toolbar.showLabels&&(n.toolbar.showLabels=!0),n.toolbar.actions||(n.toolbar.actions=[]),l(n.toolbar.actions,"add",{label:n.getMessage("addItemButtonLabel"),action:"add",iconClass:n.view.getStyle("addIcon"),click:function(e,t){n.handleToolBarAddItemClick(function(e){})}}),s(n.toolbar.actions,n.toolbar.showLabels),n.actionbar={},n.options.actionbar)for(var c in n.options.actionbar)n.actionbar[c]=t.copyOf(n.options.actionbar[c]);"undefined"==typeof n.actionbar.showLabels&&(n.actionbar.showLabels=!1),n.actionbar.actions||(n.actionbar.actions=[]),l(n.actionbar.actions,"add",{label:n.getMessage("addButtonLabel"),action:"add",iconClass:n.view.getStyle("addIcon"),click:function(e,t,i){n.handleActionBarAddItemClick(i,function(e){})}}),l(n.actionbar.actions,"remove",{label:n.getMessage("removeButtonLabel"),action:"remove",iconClass:n.view.getStyle("removeIcon"),click:function(e,t,i){n.handleActionBarRemoveItemClick(i,function(e){})}}),l(n.actionbar.actions,"up",{label:n.getMessage("upButtonLabel"),action:"up",iconClass:n.view.getStyle("upIcon"),click:function(e,t,i){n.handleActionBarMoveItemUpClick(i,function(){})}}),l(n.actionbar.actions,"down",{label:n.getMessage("downButtonLabel"),action:"down",iconClass:n.view.getStyle("downIcon"),click:function(e,t,i){n.handleActionBarMoveItemDownClick(i,function(){})}}),s(n.actionbar.actions,n.actionbar.showLabels);var d=this.data.length,p=e.extend(!0,{},this.data);p.length=d,this.data=Array.prototype.slice.call(p)},setValue:function(e){var n=this;if(e&&t.isArray(e)){var i=0;do if(i<n.children.length){var a=n.children[i];e.length>i?(a.setValue(e[i]),i++):n.removeItem(i)}while(i<n.children.length);i<e.length&&n.resolveItemSchemaOptions(function(a,r,o){if(a||t.logDebug("Unable to resolve schema for item: "+i),o)return t.throwErrorWithCallback("Circular reference detected for schema: "+JSON.stringify(a),n.errorCallback);for(var l=[];i<e.length;){var s=function(e,i){return function(o){n.addItem(e,a,r,i[e],function(){t.nextTick(function(){o()})})}}(i,e);l.push(s),i++}t.series(l,function(){})})}},getContainerValue:function(){if(0===this.children.length&&!this.isRequired())return[];for(var e=[],t=0;t<this.children.length;t++){var n=this.children[t].getValue();n!==n&&(n=void 0),"undefined"!=typeof n&&e.push(n)}return e},createItems:function(e){var n=this,i=[];n.data&&n.data.length>0?n.resolveItemSchemaOptions(function(a,r,o){if(o)return t.throwErrorWithCallback("Circular reference detected for schema: "+JSON.stringify(a),n.errorCallback);for(var l=[],s=0;s<n.data.length;s++){var u=n.data[s],c=function(e,t){return function(o){n.createItem(e,a,r,t,function(e){i.push(e),o()})}}(s,u);l.push(c)}t.nextTick(function(){t.series(l,function(t){e(i)})})}):e(i)},createItem:function(n,i,a,r,o){var l=this;if(l._validateEqualMaxItems()){var s=e("<div></div>");s.alpaca({data:r,options:a,schema:i,view:this.view.id?this.view.id:this.view,connector:this.connector,error:function(e){l.destroy(),l.errorCallback.call(l,e)},notTopLevel:!0,render:function(e,t){e.parent=l,e.path=l.path+"["+n+"]",e.render(null,function(){l.updatePathAndName(),l.triggerUpdate(),t&&t()})},postRender:function(n){var i=t.tmpl(l.containerItemTemplateDescriptor,{id:l.getId(),name:n.name,parentFieldId:l.getId(),actionbarStyle:l.options.actionbarStyle,view:l.view,data:r}),a=e(i).find("."+t.MARKER_CLASS_CONTAINER_FIELD_ITEM_FIELD);return 0===a.length&&e(i).hasClass(t.MARKER_CLASS_CONTAINER_FIELD_ITEM_FIELD)&&(a=e(i)),0===a.length?void l.errorCallback.call(l,{message:"Cannot find insertion point for field: "+l.getId()}):(e(a).before(n.getFieldEl()),e(a).remove(),n.containerItemEl=i,t.fieldApplyFieldAndChildren(n,function(e){e.hideInitValidationError=!1}),t.isFunction(l.options.items.postRender)&&l.options.items.postRender.call(n,a),void(o&&o(n)))}})}},resolveItemSchemaOptions:function(e){var n,i=this,a=function(t,n,a){i.options.readonly&&(n.readonly=!0),e(t,n,a)};!n&&i.options&&i.options.fields&&i.options.fields.item&&(n=i.options.fields.item),!n&&i.options&&i.options.items&&(n=i.options.items);var r;if(i.schema&&i.schema.items&&(r=i.schema.items),r&&r.$ref){for(var o=r.$ref,l=this,s=[l];l.parent;)l=l.parent,s.push(l);var u=r,c=n;t.loadRefSchemaOptions(l,o,function(e,n){for(var i=0,r=0;r<s.length;r++)s[r].schema&&(s[r].schema.id===o||s[r].schema.id==="#"+o?i++:s[r].schema.$ref===o&&i++);var l=i>10,d={};u&&t.mergeObject(d,u),e&&t.mergeObject(d,e),delete d.id;var p={};c&&t.mergeObject(p,c),n&&t.mergeObject(p,n),t.nextTick(function(){a(d,p,l)})})}else t.nextTick(function(){a(r,n)})},handleValidate:function(){var e=this.base(),n=this.validation,i=this._validateUniqueItems();return n.valueNotUnique={message:i?"":this.getMessage("valueNotUnique"),status:i},i=this._validateMaxItems(),n.tooManyItems={message:i?"":t.substituteTokens(this.getMessage("tooManyItems"),[this.schema.maxItems]),status:i},i=this._validateMinItems(),n.notEnoughItems={message:i?"":t.substituteTokens(this.getMessage("notEnoughItems"),[this.schema.minItems]),status:i},e&&n.valueNotUnique.status&&n.tooManyItems.status&&n.notEnoughItems.status},_validateEqualMaxItems:function(){return!(this.schema.maxItems&&this.schema.maxItems>=0&&this.getSize()>=this.schema.maxItems)},_validateEqualMinItems:function(){return!(this.schema.minItems&&this.schema.minItems>=0&&this.getSize()<=this.schema.minItems)},_validateMinItems:function(){return!(this.schema.minItems&&this.schema.minItems>=0&&this.getSize()<this.schema.minItems)},_validateMaxItems:function(){return!(this.schema.maxItems&&this.schema.maxItems>=0&&this.getSize()>this.schema.maxItems)},_validateUniqueItems:function(){if(this.schema.items&&this.schema.uniqueItems)for(var e={},t=0;t<this.children.length;t++){var n=this.children[t].getValue();if(n||(n=""),e[n])return!1;e[n]=!0}return!0},findAction:function(t,n){var i=null;return e.each(t,function(e,t){t.action===n&&(i=t)}),i},postRender:function(e){var t=this;this.base(function(){t.updateToolbars(),e()})},getSize:function(){return this.children.length},updatePathAndName:function(){var n=function(i){i.children&&e.each(i.children,function(a,r){i.prePath&&t.startsWith(r.path,i.prePath)&&(r.prePath=r.path,r.path=r.path.replace(i.prePath,i.path)),i.preName&&t.startsWith(r.name,i.preName)&&(r.preName=r.name,r.name=r.name.replace(i.preName,i.name),r.field&&e(r.field).attr("name",r.name)),n(r)})};this.children&&this.children.length>0&&e.each(this.children,function(t,i){var a=i.path.lastIndexOf("/"),r=i.path.substring(a+1);r.indexOf("[")<0&&r.indexOf("]")<0&&(r=r.substring(r.indexOf("[")+1,r.indexOf("]"))),r!==t&&(i.prePath=i.path,i.path=i.path.substring(0,a)+"/["+t+"]"),i.nameCalculated&&(i.preName=i.name,i.parent&&i.parent.name&&i.path?i.name=i.parent.name+"_"+t:i.path&&(i.name=i.path.replace(/\//g,"").replace(/\[/g,"_").replace(/\]/g,"")),this.parent.options.rubyrails?e(i.field).attr("name",i.parent.name):e(i.field).attr("name",i.name)),i.prePath||(i.prePath=i.path),n(i)})},updateToolbars:function(){var t=this;if("display"!==this.view.type&&!this.schema.readonly){t.toolbar&&(t.fireCallback("arrayToolbar",!0),t.fireCallback("arrayToolbar")),t.actionbar&&(t.fireCallback("arrayActionbars",!0),t.fireCallback("arrayActionbars"));var n=e(this.getFieldEl()).find(".alpaca-array-toolbar[data-alpaca-array-toolbar-field-id='"+t.getId()+"']");if(this.children.length>0&&t.options.hideToolbarWithChildren?e(n).hide():(e(n).show(),e(n).find("[data-alpaca-array-toolbar-action]").each(function(){var n=e(this).attr("data-alpaca-array-toolbar-action"),i=t.findAction(t.toolbar.actions,n);i&&e(this).off().click(function(e){e.preventDefault(),i.click.call(t,n,i)})})),"undefined"==typeof this.options.toolbarSticky||null===this.options.toolbarSticky){var i=this.getFieldEl().find(".alpaca-container-item[data-alpaca-container-item-parent-field-id='"+t.getId()+"']");e(i).each(function(n){var i=e(t.getFieldEl()).find(".alpaca-array-actionbar[data-alpaca-array-actionbar-parent-field-id='"+t.getId()+"'][data-alpaca-array-actionbar-item-index='"+n+"']");i&&i.length>0&&(e(this).hover(function(){e(i).show()},function(){e(i).hide()}),e(i).hide())})}else this.options.toolbarSticky?e(t.getFieldEl()).find(".alpaca-array-actionbar[data-alpaca-array-actionbar-parent-field-id='"+t.getId()+"']").css("display","inline-block"):this.options.toolbarSticky||e(t.getFieldEl()).find(".alpaca-array-actionbar[data-alpaca-array-actionbar-parent-field-id='"+t.getId()+"']").hide();var a=e(t.getFieldEl()).find(".alpaca-array-actionbar[data-alpaca-array-actionbar-parent-field-id='"+t.getId()+"']");e(a).each(function(){var n=e(this).attr("data-alpaca-array-actionbar-item-index");"string"==typeof n&&(n=parseInt(n,10)),e(this).children("[data-alpaca-array-actionbar-action]").each(function(){var i=e(this).attr("data-alpaca-array-actionbar-action"),a=t.findAction(t.actionbar.actions,i);a&&e(this).off().click(function(e){e.preventDefault(),a.click.call(t,i,a,n)})}),t._validateEqualMaxItems()?(e(this).children("[data-alpaca-array-toolbar-action='add']").each(function(n){e(this).removeClass("alpaca-button-disabled"),t.fireCallback("enableButton",this)}),e(this).children("[data-alpaca-array-actionbar-action='add']").each(function(n){e(this).removeClass("alpaca-button-disabled"),t.fireCallback("enableButton",this)})):(e(this).children("[data-alpaca-array-toolbar-action='add']").each(function(n){e(this).addClass("alpaca-button-disabled"),t.fireCallback("disableButton",this)}),e(this).children("[data-alpaca-array-actionbar-action='add']").each(function(n){e(this).addClass("alpaca-button-disabled"),t.fireCallback("disableButton",this)})),t._validateEqualMinItems()?e(this).children("[data-alpaca-array-actionbar-action='remove']").each(function(n){e(this).removeClass("alpaca-button-disabled"),t.fireCallback("enableButton",this)}):e(this).children("[data-alpaca-array-actionbar-action='remove']").each(function(n){e(this).addClass("alpaca-button-disabled"),t.fireCallback("disableButton",this)})}),e(a).first().children("[data-alpaca-array-actionbar-action='up']").each(function(){e(this).addClass("alpaca-button-disabled"),t.fireCallback("disableButton",this)}),e(a).last().children("[data-alpaca-array-actionbar-action='down']").each(function(){e(this).addClass("alpaca-button-disabled"),t.fireCallback("disableButton",this)})}},doResolveItemContainer:function(){var t=this;return e(t.container)},handleToolBarAddItemClick:function(e){var n=this;n.resolveItemSchemaOptions(function(i,a,r){if(r)return t.throwErrorWithCallback("Circular reference detected for schema: "+JSON.stringify(i),n.errorCallback);var o=n.children.length,l=t.createEmptyDataInstance(i);n.addItem(o,i,a,l,function(t){e&&e(t)})})},handleActionBarAddItemClick:function(e,n){var i=this;i.resolveItemSchemaOptions(function(a,r,o){if(o)return t.throwErrorWithCallback("Circular reference detected for schema: "+JSON.stringify(a),i.errorCallback);var l=t.createEmptyDataInstance(a);i.addItem(e+1,a,r,l,function(e){n&&n(e)})})},handleActionBarRemoveItemClick:function(e,t){var n=this;n.removeItem(e,function(){t&&t()})},handleActionBarMoveItemUpClick:function(e,t){var n=this;n.swapItem(e,e-1,n.options.animate,function(){t&&t()})},handleActionBarMoveItemDownClick:function(e,t){var n=this;n.swapItem(e,e+1,n.options.animate,function(){t&&t()})},doAddItem:function(n,i,a){var r=this,o=r.doResolveItemContainer();if(0===n)e(o).append(i.containerItemEl);else{var l=o.children("[data-alpaca-container-item-index='"+(n-1)+"']");l&&l.length>0&&l.after(i.containerItemEl)}r.doAfterAddItem(i,function(e){t.fireReady(i),a(e)})},doAfterAddItem:function(e,t){t()},addItem:function(e,t,n,i,a){var r=this;r._validateEqualMaxItems()&&r.createItem(e,t,n,i,function(t){r.registerChild(t,e),r.doAddItem(e,t,function(){r.handleRepositionDOMRefresh(),r.updateToolbars(),r.refreshValidationState(),r.trigger("add",t),r.triggerUpdate(),a&&a(t)})})},doRemoveItem:function(e,t){var n=this,i=n.doResolveItemContainer();i.children(".alpaca-container-item[data-alpaca-container-item-index='"+e+"']").remove(),n.doAfterRemoveItem(e,function(e){t(e)})},doAfterRemoveItem:function(e,t){t()},removeItem:function(e,t){var n=this;this._validateEqualMinItems()&&(n.unregisterChild(e),n.doRemoveItem(e,function(){n.handleRepositionDOMRefresh(),n.updateToolbars(),n.refreshValidationState(),n.trigger("remove",e),n.triggerUpdate(),t&&t()}))},moveItem:function(n,i,a,r){var o=this;if("function"==typeof a&&(r=a,a=o.options.animate),"undefined"==typeof a&&(a=o.options.animate?o.options.animate:!0),"string"==typeof n&&(n=parseInt(n,10)),"string"==typeof i&&(i=parseInt(i,10)),0>i&&(i=0),i>=o.children.length&&(i=o.children.length-1),-1!==i&&n!==i){var l=o.children[i];if(l){var s=function(){var e=i;i>n&&e--;var t=o.children.splice(n,1)[0];o.children.splice(e,0,t),o.data=o.getValue(),o.refresh(function(){o.refreshValidationState(),o.triggerUpdate(),o.trigger("move"),r&&r()})},u=0;if(a&&(u=500),u>0){var c=o.getId(),d=o.getContainerEl().find(".alpaca-container-item[data-alpaca-container-item-index='"+n+"'][data-alpaca-container-item-parent-field-id='"+c+"']"),p=o.getContainerEl().find(".alpaca-container-item[data-alpaca-container-item-index='"+i+"'][data-alpaca-container-item-parent-field-id='"+c+"']"),h=e("<div class='tempMarker1'></div>");d.before(h);var f=e("<div class='tempMarker2'></div>");p.before(f),t.animatedMove(d,p,u,function(){s()})}else s()}}},swapItem:function(n,i,a,r){var o=this;if("function"==typeof a&&(r=a,a=o.options.animate),"undefined"==typeof a&&(a=o.options.animate?o.options.animate:!0),"string"==typeof n&&(n=parseInt(n,10)),"string"==typeof i&&(i=parseInt(i,10)),0>i&&(i=0),i>=o.children.length&&(i=o.children.length-1),-1!==i&&n!==i){var l=o.children[i];if(l){var s=function(){var e=o.children[n],t=o.children[i];o.children[n]=t,o.children[i]=e,o.data=o.getValue(),o.refresh(function(){o.refreshValidationState(),o.triggerUpdate(),o.trigger("move"),r&&r()})},u=0;if(a&&(u=500),u>0){var c=o.getId(),d=o.getContainerEl().find(".alpaca-container-item[data-alpaca-container-item-index='"+n+"'][data-alpaca-container-item-parent-field-id='"+c+"']"),p=o.getContainerEl().find(".alpaca-container-item[data-alpaca-container-item-index='"+i+"'][data-alpaca-container-item-parent-field-id='"+c+"']"),h=e("<div class='tempMarker1'></div>");d.before(h);var f=e("<div class='tempMarker2'></div>");p.before(f),t.animatedSwap(d,p,u,function(){s()})}else s()}}},getType:function(){return"array"},getTitle:function(){return"Array Field"},getDescription:function(){return"Field for list of items with same data type or structure."},getSchemaOfSchema:function(){var e={properties:{items:{title:"Array Items",description:"Schema for array items.",type:"object"},minItems:{title:"Minimum Items",description:"Minimum number of items.",type:"number"},maxItems:{title:"Maximum Items",description:"Maximum number of items.",type:"number"},uniqueItems:{title:"Items Unique",description:"Item values should be unique if true.",type:"boolean","default":!1}}};return this.children&&this.children[0]&&t.merge(e.properties.items.properties,this.children[0].getSchemaOfSchema()),t.merge(this.base(),e)},getOptionsForSchema:function(){return t.merge(this.base(),{fields:{items:{type:"object"},minItems:{type:"integer"},maxItems:{type:"integer"},uniqueItems:{type:"checkbox"}}})},getSchemaOfOptions:function(){var e={properties:{toolbarSticky:{title:"Sticky Toolbar",description:"If true, the array item toolbar will always be enabled. If false, the toolbar is always disabled. If undefined or null, the toolbar will appear when hovered over.",type:"boolean","default":void 0},toolbarStyle:{title:"Toolbar Style",description:"The kind of top-level toolbar to render for the array field. Either 'button' or 'link'.",type:"string","default":"button"},actionbarStyle:{title:"Actionbar Style",description:"The kind of actionbar to render for each item in the array. Either 'top', 'bottom', 'left', or 'right'.",type:"string","default":"top"},toolbar:{type:"object",title:"Toolbar Configuration",properties:{showLabels:{type:"boolean","default":!0,title:"Whether to show labels next to actions"},actions:{type:"array",title:"Toolbar Actions Configuration",items:{action:{type:"string",title:"Action Key"},label:{type:"string",title:"Action Label"},iconClass:{type:"string",title:"Action CSS Classes for Icon"},click:{type:"function",title:"Action Click Handler"},enabled:{type:"boolean",title:"Whether to enable the action","default":!0}}}}},actionbar:{type:"object",properties:{showLabels:{type:"boolean","default":!1,title:"Whether to show labels next to actions"},actions:{type:"array",title:"Actions Bar Actions Configuration",items:{action:{type:"string",title:"Action Key"},label:{type:"string",title:"Action Label"},iconClass:{type:"string",title:"Action CSS Classes for Icon"},click:{type:"function",title:"Action Click Handler"},enabled:{type:"boolean",title:"Whether to enable the action","default":!0}}}}},hideToolbarWithChildren:{type:"boolean",title:"Hide Toolbar with Children",description:"Indicates whether to hide the top toolbar when child elements are available.","default":!0}}};return this.children&&this.children[0]&&t.merge(e.properties.items.properties,this.children[0].getSchemaOfSchema()),t.merge(this.base(),e)},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{toolbarSticky:{type:"checkbox"},items:{type:"object",fields:{}}}})}}),t.registerMessages({notEnoughItems:"The minimum number of items is {0}",tooManyItems:"The maximum number of items is {0}",valueNotUnique:"Values are not unique",notAnArray:"This value is not an Array"}),t.registerFieldClass("array",t.Fields.ArrayField),t.registerDefaultSchemaFieldMapping("array","array"),t.registerMessages({addItemButtonLabel:"Add New Item",addButtonLabel:"Add",removeButtonLabel:"Remove",upButtonLabel:"Up",downButtonLabel:"Down"})}(jQuery),function(e){var t=e.alpaca;t.Fields.ObjectField=t.ContainerField.extend({getFieldType:function(){return"object"},setup:function(){var e=this;this.base();var n=e.resolveContainerItemTemplateType();if(!n){e.resolveContainerItemTemplateType();return t.throwErrorWithCallback("Unable to find template descriptor for container item: "+e.getFieldType())}if(this.containerItemTemplateDescriptor=e.view.getTemplateDescriptor("container-"+n+"-item",e),!t.isEmpty(this.data)&&""!==this.data&&!t.isObject(this.data)){if(!t.isString(this.data))return;try{if(this.data=t.parseJSON(this.data),!t.isObject(this.data))return void t.logWarn("ObjectField parsed data but it was not an object: "+JSON.stringify(this.data))}catch(i){return}}},setValue:function(e){if(e||(e={}),t.isObject(e)){var n={};for(var i in this.childrenById){var a=this.childrenById[i].propertyId;n[a]=this.childrenById[i]}var r={};for(var o in e)e.hasOwnProperty(o)&&(r[o]=e[o]);for(var a in r){var l=n[a];l&&(l.setValue(r[a]),delete n[a],delete r[a])}for(var a in n){var l=n[a];l.setValue(null)}}},getContainerValue:function(){if(0===this.children.length&&!this.isRequired())return{};for(var e={},n=0;n<this.children.length;n++){var i=this.children[n].propertyId,a=this.children[n].getValue();if(a!==a&&(a=void 0),"undefined"!=typeof a&&this.determineAllDependenciesValid(i)){var r=null;"boolean"==typeof a?r=!!a:t.isArray(a)||t.isObject(a)||t.isNumber(a)?r=a:(a||0===a)&&(r=a),null!==r&&(e[i]=r)}}return e},afterRenderContainer:function(e,n){var i=this;this.base(e,function(){if(i.isTopLevel()&&i.view){i.wizardConfigs=i.view.getWizard(),"undefined"!=typeof i.wizardConfigs&&(i.wizardConfigs&&i.wizardConfigs!==!0||(i.wizardConfigs={}));var e=i.view.getLayout().templateDescriptor;i.wizardConfigs&&t.isObject(i.wizardConfigs)&&(!e||i.wizardConfigs.bindings?i.autoWizard():i.wizard())}n()})},createItems:function(e){var n=this,i=[],a={};for(var r in n.data)a[r]=r;var o=n.data;n.schema&&n.schema.properties&&(o=n.schema.properties);var l=function(){var n=[];for(var r in a)n.push(r);n.length>0&&t.logDebug("There were "+n.length+" extra data keys that were not part of the schema "+JSON.stringify(n)),e(i)},s=[];for(var u in o){var c=null;n.data&&n.data.hasOwnProperty(u)&&(c=n.data[u]);var d=function(e,a,r){return function(o){n.resolvePropertySchemaOptions(e,function(l,s,u){return u?t.throwErrorWithCallback("Circular reference detected for schema: "+JSON.stringify(l),n.errorCallback):(l||t.logDebug("Unable to resolve schema for property: "+e),void n.createItem(e,l,s,a,null,function(t){i.push(t),delete r[e],o()}))})}}(u,c,a);s.push(d)}t.nextTick(function(){t.series(s,function(e){for(var t=!1,n=0;n<i.length;n++)if("undefined"!=typeof i[n].options.order){t=!0;break}t&&i.sort(function(e,t){var n=e.options.order;n||(n=0);var i=t.options.order;return i||(i=0),n-i}),l()})})},createItem:function(n,i,a,r,o,l){var s=this,u=e("<div></div>");u.alpaca({data:r,options:a,schema:i,view:this.view.id?this.view.id:this.view,connector:this.connector,error:function(e){s.destroy(),s.errorCallback.call(s,e)},notTopLevel:!0,render:function(e,t){e.parent=s,e.propertyId=n,"/"!==s.path?e.path=s.path+"/"+n:e.path=s.path+n,e.render(null,function(){t()})},postRender:function(n){var i=t.tmpl(s.containerItemTemplateDescriptor,{id:s.getId(),name:n.name,parentFieldId:s.getId(),actionbarStyle:s.options.actionbarStyle,view:s.view,data:r}),a=e(i).find("."+t.MARKER_CLASS_CONTAINER_FIELD_ITEM_FIELD);return 0===a.length&&e(i).hasClass(t.MARKER_CLASS_CONTAINER_FIELD_ITEM_FIELD)&&(a=e(i)),0===a.length?void s.errorCallback.call(s,{message:"Cannot find insertion point for field: "+s.getId()}):(e(a).before(n.getFieldEl()),e(a).remove(),n.containerItemEl=i,t.fieldApplyFieldAndChildren(n,function(e){e.hideInitValidationError=!1}),void(l&&l(n)))}})},resolvePropertySchemaOptions:function(e,n){var i=this,a=function(e,t,a){i.options.readonly&&(t.readonly=!0),n(e,t,a)},r=null;i.schema&&i.schema.properties&&i.schema.properties[e]&&(r=i.schema.properties[e]);var o={};if(i.options&&i.options.fields&&i.options.fields[e]&&(o=i.options.fields[e]),r&&r.$ref){for(var l=r.$ref,s=this,u=[s];s.parent;)s=s.parent,u.push(s);var c=r,d=o;t.loadRefSchemaOptions(s,l,function(e,n){for(var i=0,r=0;r<u.length;r++)u[r].schema&&(u[r].schema.id===l||u[r].schema.id==="#"+l?i++:u[r].schema.$ref===l&&i++);var o=i>1,s={};c&&t.mergeObject(s,c),e&&t.mergeObject(s,e),c&&c.id&&(s.id=c.id);var p={};d&&t.mergeObject(p,d),n&&t.mergeObject(p,n),t.nextTick(function(){a(s,p,o)})})}else t.nextTick(function(){a(r,o)})},applyCreatedItems:function(e,t){var n=this;this.base(e,function(){var i=function(a){if(a===e.items.length)return void t();var r=e.items[a],o=r.propertyId;n.showOrHidePropertyBasedOnDependencies(o),n.bindDependencyFieldUpdateEvent(o),n.refreshDependentFieldStates(o),i(a+1)};i(0)})},handleValidate:function(){var e=this.base(),n=this.validation,i=this._validateMaxProperties();return n.tooManyProperties={message:i?"":t.substituteTokens(this.getMessage("tooManyProperties"),[this.schema.maxProperties]),status:i},i=this._validateMinProperties(),n.tooFewProperties={message:i?"":t.substituteTokens(this.getMessage("tooManyItems"),[this.schema.minProperties]),status:i},e&&n.tooManyProperties.status&&n.tooFewProperties.status},_validateMaxProperties:function(){if("undefined"==typeof this.schema.maxProperties)return!0;var e=this.schema.maxProperties,t=0;for(var n in this.data)t++;return e>=t},_validateMinProperties:function(){if("undefined"==typeof this.schema.minProperties)return!0;var e=this.schema.minProperties,t=0;for(var n in this.data)t++;return t>=e},showOrHidePropertyBasedOnDependencies:function(e){var n=this,i=this.childrenByPropertyId[e];if(!i)return t.throwErrorWithCallback("Missing property: "+e,n.errorCallback);
var a=this.determineAllDependenciesValid(e);a?(i.show(),i.onDependentReveal()):(i.hide(),i.onDependentConceal()),i.getFieldEl().trigger("fieldupdate")},getChildDependencies:function(e){var t=null;if(this.schema.dependencies&&(t=this.schema.dependencies[e]),!t){var n=this.childrenByPropertyId[e];n&&(t=n.schema.dependencies)}return t},getChildConditionalDependencies:function(e){var t=null,n=this.childrenByPropertyId[e];return n&&(t=n.options.dependencies),t},determineAllDependenciesValid:function(n){var i=this,a=this.childrenByPropertyId[n];if(!a)return t.throwErrorWithCallback("Missing property: "+n,i.errorCallback);var r=i.getChildDependencies(n);if(!r)return!0;var o=!0;return t.isString(r)?o=i.determineSingleDependencyValid(n,r):t.isArray(r)&&e.each(r,function(e,t){o=o&&i.determineSingleDependencyValid(n,t)}),o},bindDependencyFieldUpdateEvent:function(n){var i=this,a=this.childrenByPropertyId[n];if(!a)return t.throwErrorWithCallback("Missing property: "+n,i.errorCallback);var r=i.getChildDependencies(n);if(!r)return!0;var o=function(e,n){var r=t.resolveField(i,n);r&&(r.getFieldEl().bind("fieldupdate",function(e,t,n,a){return function(t){i.showOrHidePropertyBasedOnDependencies(n),e.getFieldEl().trigger("fieldupdate")}}(a,r,e,n)),r.getFieldEl().trigger("fieldupdate"))};t.isString(r)?o(n,r):t.isArray(r)&&e.each(r,function(e,t){o(n,t)})},refreshDependentFieldStates:function(n){var i=this,a=this.childrenByPropertyId[n];if(!a)return t.throwErrorWithCallback("Missing property: "+n,i.errorCallback);var r=i.getChildDependencies(n);if(!r)return!0;var o=function(e){var n=t.resolveField(i,e);n&&n.getFieldEl().trigger("fieldupdate")};t.isString(r)?o(r):t.isArray(r)&&e.each(r,function(e,t){o(t)})},determineSingleDependencyValid:function(e,n){var i=this,a=t.resolveField(i,n);if(!a)return!1;var r=a.data,o=!1,l=this.getChildConditionalDependencies(e);if(l&&0!==l.length){"boolean"!==a.getType()||r||(r=!1);var s=l[n];!t.isEmpty(s)&&t.isFunction(s)?o=s.call(this,r):(o=!0,t.isArray(s)?t.anyEquality(r,s)||(o=!1):t.isEmpty(s)||t.anyEquality(s,r)||(o=!1))}else o="boolean"!==a.getType()||this.childrenByPropertyId[e].options.dependencies||r?!t.isValEmpty(a.data):!1;return a&&a.isHidden()&&(o=!1),o},getIndex:function(e){if(t.isEmpty(e))return-1;for(var n=0;n<this.children.length;n++){var i=this.children[n].propertyId;if(i==e)return n}return-1},addItem:function(e,t,n,i,a,r){var o=this;this.createItem(e,t,n,i,a,function(e){var t=null;if(a&&o.childrenById[a])for(var n=0;n<o.children.length;n++)if(o.children[n].getId()==a){t=n;break}o.registerChild(e,null!=t?t+1:0),o.doAddItem(t,e),o.handleRepositionDOMRefresh(),o.refreshValidationState(!0,function(){o.trigger("add",e),o.triggerUpdate(),e.triggerWithPropagation.call(e,"ready","down"),r&&r()})})},doAddItem:function(n,i){var a=this;if(n){var r=a.getContainerEl().children("[data-alpaca-container-item-index='"+n+"']");r&&r.length>0&&r.after(i.containerItemEl)}else e(a.container).prepend(i.containerItemEl);a.doAfterAddItem(i,function(){t.fireReady(i)})},doAfterAddItem:function(e,t){t()},doResolveItemContainer:function(){var t=this;return e(t.container)},removeItem:function(t,n){var i=this,a=this.childrenByPropertyId[t];a?(this.children=e.grep(this.children,function(e,n){return e.propertyId!==t}),delete this.childrenByPropertyId[t],delete this.childrenById[a.getId()],i.doRemoveItem(a),this.refreshValidationState(!0,function(){i.handleRepositionDOMRefresh(),i.trigger("remove",a),i.triggerUpdate(),n&&n()})):n()},doRemoveItem:function(e){var t=this,n=t.doResolveItemContainer();n.children(".alpaca-container-item[data-alpaca-container-item-name='"+e.name+"']").remove(),e.destroy()},wizard:function(){var n=this,i=this.wizardConfigs.steps;i||(i=[]);var a=this.wizardConfigs.title,r=this.wizardConfigs.description,o=this.wizardConfigs.buttons;o||(o={}),o.previous||(o.previous={}),o.previous.title||(o.previous.title="Previous"),o.previous.align||(o.previous.align="left"),o.previous.type||(o.previous.type="button"),o.next||(o.next={}),o.next.title||(o.next.title="Next"),o.next.align||(o.next.align="right"),o.next.type||(o.next.type="button"),this.wizardConfigs.hideSubmitButton||(o.submit||(o.submit={}),o.submit.title||(o.submit.title="Submit"),o.submit.align||(o.submit.align="right"),o.submit.type||(o.submit.type="button"));for(var l in o)o[l].type||(o[l].type="button");var s=this.wizardConfigs.showSteps;"undefined"==typeof s&&(s=!0);var u=this.wizardConfigs.showProgressBar,c=this.wizardConfigs.validation;"undefined"==typeof c&&(c=!0);var a=e(this.field).attr("data-alpaca-wizard-title"),r=e(this.field).attr("data-alpaca-wizard-description"),d=e(this.field).attr("data-alpaca-wizard-validation");"undefined"!=typeof d&&(c=!!d);var p=e(this.field).attr("data-alpaca-wizard-show-steps");"undefined"!=typeof p&&(s=!!p);var h=e(this.field).attr("data-alpaca-wizard-show-progress-bar");"undefined"!=typeof h&&(u=!!h);var f=e(this.field).find("[data-alpaca-wizard-role='step']");0==i.length&&f.each(function(t){var n={},a=e(this).attr("data-alpaca-wizard-step-title");"undefined"!=typeof a&&(n.title=a),n.title||(n.title="Step "+t);var r=e(this).attr("data-alpaca-wizard-step-description");"undefined"!=typeof r&&(n.description=r),n.description||(n.description="Step "+t),i.push(n)}),"undefined"==typeof u&&i.length>1&&(u=!0);var m={};m.wizardTitle=a,m.wizardDescription=r,m.showSteps=s,m.performValidation=c,m.steps=i,m.buttons=o,m.schema=n.schema,m.options=n.options,m.data=n.data,m.showProgressBar=u,m.markAllStepsVisited=this.wizardConfigs.markAllStepsVisited,m.view=n.view;var g=n.view.getTemplateDescriptor("wizard",n);if(g){var v=t.tmpl(g,m);e(n.field).append(v);var b=e(v).find(".alpaca-wizard-nav"),y=e(v).find(".alpaca-wizard-steps"),w=e(v).find(".alpaca-wizard-buttons"),x=e(v).find(".alpaca-wizard-progress-bar");e(y).append(f),function(i,a,r,o){var l=0,s=e(r).find("[data-alpaca-wizard-button-key='previous']"),u=e(r).find("[data-alpaca-wizard-button-key='next']"),c=e(r).find("[data-alpaca-wizard-button-key='submit']"),d=function(){if(o.showSteps){if(o.visits||(o.visits={}),o.markAllStepsVisited)for(var t=e(i).find("[data-alpaca-wizard-step-index]"),n=0;n<t.length;n++)o.visits[n]=!0;o.visits[l]=!0;var t=e(i).find("[data-alpaca-wizard-step-index]");e(t).removeClass("disabled"),e(t).removeClass("completed"),e(t).removeClass("active"),e(t).removeClass("visited");for(var n=0;n<t.length;n++)l>n?e(i).find("[data-alpaca-wizard-step-index='"+n+"']").addClass("completed"):n===l?e(i).find("[data-alpaca-wizard-step-index='"+n+"']").addClass("active"):o.visits&&o.visits[n]||e(i).find("[data-alpaca-wizard-step-index='"+n+"']").addClass("disabled"),o.visits&&o.visits[n]&&e(i).find("[data-alpaca-wizard-step-index='"+n+"']").addClass("visited")}if(o.showProgressBar){var r=l+1,d=o.steps.length+1,p=parseInt(r/d*100,10)+"%";e(x).find(".progress-bar").attr("aria-valuemax",d),e(x).find(".progress-bar").attr("aria-valuenow",r),e(x).find(".progress-bar").css("width",p)}s.hide(),u.hide(),c.hide(),1==o.steps.length?c.show():o.steps.length>1&&(l>0&&s.show(),u.show(),0==l?u.show():l==o.steps.length-1&&(u.hide(),c.show())),e(a).find("[data-alpaca-wizard-role='step']").hide(),e(e(a).find("[data-alpaca-wizard-role='step']")[l]).show()},p=function(i,r){if(!o.performValidation)return void r(!0);var s=[],u=e(e(a).find("[data-alpaca-wizard-role='step']")[l]);e(u).find(".alpaca-field").each(function(){var t=e(this).attr("data-alpaca-field-id");if(t){var i=n.childrenById[t];i&&s.push(i)}});for(var c=[],d=0;d<s.length;d++)c.push(function(e){return function(t){e.refreshValidationState(!0,function(){t()})}}(s[d]));t.series(c,function(){for(var e=!0,t=0;t<s.length;t++)e=e&&s[t].isValid(!0);var a=o.buttons[i];a&&a.validate?a.validate.call(n,function(t){e=e&&t,r(e)}):r(e)})};e(s).click(function(e){if(e.preventDefault(),l>=1){var t=o.buttons.previous;t&&t.click&&t.click.call(n,e),l--,d()}}),e(u).click(function(e){e.preventDefault(),l+1<=o.steps.length-1&&p("next",function(t){if(t){var i=o.buttons.next;i&&i.click&&i.click.call(n,e),l++,d()}else window.setTimeout(function(){n.focus(function(e){})},250)})}),e(c).click(function(e){e.preventDefault(),l===o.steps.length-1&&p("submit",function(t){if(t){var i=o.buttons.submit;i&&(i.click?i.click.call(n,e):n.form&&n.form.submit())}else window.setTimeout(function(){n.focus(function(e){})},250)})}),e(r).find("[data-alpaca-wizard-button-key]").each(function(){var t=e(this).attr("data-alpaca-wizard-button-key");if("submit"!=t&&"next"!=t&&"previous"!=t){var i=o.buttons[t];i&&i.click&&e(this).click(function(e){return function(t){e.click.call(n,t)}}(i))}}),e(i).find("[data-alpaca-wizard-step-index]").click(function(t){t.preventDefault();var n=e(this).attr("data-alpaca-wizard-step-index");n&&(n=parseInt(n,10),(n==l||o.visits&&o.visits[n])&&(l>n?(l=n,d()):n>l&&p(null,function(e){e&&(l=n,d())})))}),n.on("moveToStep",function(e){var t=e.index,n=e.skipValidation;"undefined"!=typeof t&&t<=o.steps.length-1&&(n?(l=t,d()):p(null,function(e){e&&(l=t,d())}))}),n.on("advanceOrSubmit",function(t){p(null,function(t){t&&(l===o.steps.length-1?e(c).click():e(u).click())})}),d()}(b,y,w,m)}},autoWizard:function(){var t=this.wizardConfigs.bindings;t||(t={});for(var n in this.childrenByPropertyId)t.hasOwnProperty(n)||(t[n]=1);var i=!0;e(this.field).find("[data-alpaca-wizard-role='step']").length>0&&(i=!1);var a=1,r=[];do{r=[];for(var n in t)t[n]===a&&this.childrenByPropertyId&&this.childrenByPropertyId[n]&&r.push(this.childrenByPropertyId[n]);if(r.length>0){var o=null;i?(o=e('<div data-alpaca-wizard-role="step"></div>'),e(this.field).append(o)):o=e(e(this.field).find("[data-alpaca-wizard-role='step']")[a-1]);for(var l=!1,s=0;s<r.length;s++)if("undefined"!=typeof r[s].options.order){l=!0;break}l&&r.sort(function(e,t){var n=e.options.order;n||(n=0);var i=t.options.order;return i||(i=0),n-i});for(var s=0;s<r.length;s++)e(o).append(r[s].containerItemEl);a++}}while(r.length>0);this.wizard(),0===e(this.container).children().length&&e(this.container).css("display","none")},getType:function(){return"object"},moveItem:function(n,i,a,r){var o=this;if("function"==typeof a&&(r=a,a=o.options.animate),"undefined"==typeof a&&(a=o.options.animate?o.options.animate:!0),"string"==typeof n&&(n=parseInt(n,10)),"string"==typeof i&&(i=parseInt(i,10)),0>i&&(i=0),i>=o.children.length&&(i=o.children.length-1),-1!==i){var l=o.children[i];if(l){var s=o.getContainerEl().children("[data-alpaca-container-item-index='"+n+"']"),u=o.getContainerEl().children("[data-alpaca-container-item-index='"+i+"']"),c=e("<div class='tempMarker1'></div>");s.before(c);var d=e("<div class='tempMarker2'></div>");u.before(d);var p=function(){for(var t=[],a=0;a<o.children.length;a++)a===n?t[a]=o.children[i]:a===i?t[a]=o.children[n]:t[a]=o.children[a];o.children=t,c.replaceWith(u),d.replaceWith(s),o.handleRepositionDOMRefresh(),e(s).find("[data-alpaca-array-actionbar-item-index='"+n+"']").attr("data-alpaca-array-actionbar-item-index",i),e(u).find("[data-alpaca-array-actionbar-item-index='"+i+"']").attr("data-alpaca-array-actionbar-item-index",n),o.refreshValidationState(),o.triggerUpdate(),o.trigger("move"),r&&r()};a?t.animatedSwap(s,u,500,function(){p()}):p()}}},getTitle:function(){return"Object Field"},getDescription:function(){return"Object field for containing other fields"},getSchemaOfSchema:function(){var e={properties:{properties:{title:"Properties",description:"List of child properties.",type:"object"},maxProperties:{type:"number",title:"Maximum Number Properties",description:"The maximum number of properties that this object is allowed to have"},minProperties:{type:"number",title:"Minimum Number of Properties",description:"The minimum number of properties that this object is required to have"}}},n=e.properties.properties;if(n.properties={},this.children)for(var i=0;i<this.children.length;i++){var a=this.children[i].propertyId;n.properties[a]=this.children[i].getSchemaOfSchema(),n.properties[a].title=a+" :: "+n.properties[a].title}return t.merge(this.base(),e)},getSchemaOfOptions:function(){var e=t.merge(this.base(),{properties:{},order:{type:"number",title:"Order",description:"Allows for optional specification of the index of this field in the properties array."}}),n={properties:{fields:{title:"Field Options",description:"List of options for child fields.",type:"object"}}},i=n.properties.fields;if(i.properties={},this.children)for(var a=0;a<this.children.length;a++){var r=this.children[a].propertyId;i.properties[r]=this.children[a].getSchemaOfOptions(),i.properties[r].title=r+" :: "+i.properties[r].title}return t.merge(e,n)}}),t.registerMessages({tooManyProperties:"The maximum number of properties ({0}) has been exceeded.",tooFewProperties:"There are not enough properties ({0} are required)"}),t.registerFieldClass("object",t.Fields.ObjectField),t.registerDefaultSchemaFieldMapping("object","object")}(jQuery),function(e){var t=e.alpaca;t.Fields.AnyField=t.ControlField.extend({getFieldType:function(){return"any"},setup:function(){this.base()},getControlValue:function(){return this._getControlVal(!0)},setValue:function(e){t.isEmpty(e)?this.control.val(""):this.control.val(e),this.base(e)},disable:function(){this.control.disabled=!0},enable:function(){this.control.disabled=!1},focus:function(e){this.control.focus(),e&&e(this)},getType:function(){return"any"},getTitle:function(){return"Any Field"},getDescription:function(){return"Any field."},getSchemaOfSchema:function(){return t.merge(this.base(),{properties:{}})},getOptionsForSchema:function(){return t.merge(this.base(),{fields:{}})},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{}})}}),t.registerFieldClass("any",t.Fields.AnyField),t.registerDefaultSchemaFieldMapping("any","any")}(jQuery),function(e){var t=e.alpaca;t.Fields.HiddenField=t.ControlField.extend({getFieldType:function(){return"hidden"},setup:function(){this.base()},getControlValue:function(){return this._getControlVal(!0)},setValue:function(e){t.isEmpty(e)?this.getControlEl().val(""):this.getControlEl().val(e),this.base(e)},getType:function(){return"string"},getTitle:function(){return"Hidden"},getDescription:function(){return"Field for a hidden HTML input"}}),t.registerFieldClass("hidden",t.Fields.HiddenField)}(jQuery),function(e){var t=e.alpaca;t.Fields.AddressField=t.Fields.ObjectField.extend({getFieldType:function(){return"address"},setup:function(){this.base(),void 0===this.data&&(this.data={street:["",""]}),this.schema={title:"Home Address",type:"object",properties:{street:{title:"Street",type:"array",items:{type:"string",maxLength:30,minItems:0,maxItems:3}},city:{title:"City",type:"string"},state:{title:"State",type:"string","enum":["AL","AK","AS","AZ","AR","CA","CO","CT","DE","DC","FM","FL","GA","GU","HI","ID","IL","IN","IA","KS","KY","LA","ME","MH","MD","MA","MI","MN","MS","MO","MT","NE","NV","NH","NJ","NM","NY","NC","ND","MP","OH","OK","OR","PW","PA","PR","RI","SC","SD","TN","TX","UT","VT","VI","VA","WA","WV","WI","WY"]},zip:{title:"Zip Code",type:"string",pattern:/^(\d{5}(-\d{4})?)?$/}}},t.merge(this.options,{fields:{zip:{maskString:"99999",size:5},state:{optionLabels:["ALABAMA","ALASKA","AMERICANSAMOA","ARIZONA","ARKANSAS","CALIFORNIA","COLORADO","CONNECTICUT","DELAWARE","DISTRICTOFCOLUMBIA","FEDERATEDSTATESOFMICRONESIA","FLORIDA","GEORGIA","GUAM","HAWAII","IDAHO","ILLINOIS","INDIANA","IOWA","KANSAS","KENTUCKY","LOUISIANA","MAINE","MARSHALLISLANDS","MARYLAND","MASSACHUSETTS","MICHIGAN","MINNESOTA","MISSISSIPPI","MISSOURI","MONTANA","NEBRASKA","NEVADA","NEWHAMPSHIRE","NEWJERSEY","NEWMEXICO","NEWYORK","NORTHCAROLINA","NORTHDAKOTA","NORTHERNMARIANAISLANDS","OHIO","OKLAHOMA","OREGON","PALAU","PENNSYLVANIA","PUERTORICO","RHODEISLAND","SOUTHCAROLINA","SOUTHDAKOTA","TENNESSEE","TEXAS","UTAH","VERMONT","VIRGINISLANDS","VIRGINIA","WASHINGTON","WESTVIRGINIA","WISCONSIN","WYOMING"]}}}),t.isEmpty(this.options.addressValidation)&&(this.options.addressValidation=!0)},isContainer:function(){return!1},getAddress:function(){var t=this.getValue();"view"===this.view.type&&(t=this.data);var n="";return t&&(t.street&&e.each(t.street,function(e,t){n+=t+" "}),t.city&&(n+=t.city+" "),t.state&&(n+=t.state+" "),t.zip&&(n+=t.zip)),n},afterRenderContainer:function(t,n){var i=this;this.base(t,function(){var t=i.getContainerEl();if(e(t).addClass("alpaca-addressfield"),i.options.addressValidation&&!i.isDisplayOnly()){e('<div style="clear:both;"></div>').appendTo(t);var a=e('<div class="alpaca-form-button">Show Google Map</div>').appendTo(t);a.button&&a.button({text:!0}),a.click(function(){if(google&&google.maps){var t=new google.maps.Geocoder,n=i.getAddress();t&&t.geocode({address:n},function(t,n){if(n===google.maps.GeocoderStatus.OK){var a=i.getId()+"-map-canvas";0===e("#"+a).length&&e("<div id='"+a+"' class='alpaca-field-address-mapcanvas'></div>").appendTo(i.getFieldEl());var r=new google.maps.Map(document.getElementById(i.getId()+"-map-canvas"),{zoom:10,center:t[0].geometry.location,mapTypeId:google.maps.MapTypeId.ROADMAP});new google.maps.Marker({map:r,position:t[0].geometry.location})}else i.displayMessage("Geocoding failed: "+n)})}else i.displayMessage("Google Map API is not installed.")}).wrap("<small/>"),i.options.showMapOnLoad&&a.click()}n()})},getType:function(){return"any"},getTitle:function(){return"Address"},getDescription:function(){return"Standard US Address with Street, City, State and Zip. Also comes with support for Google map."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{validateAddress:{title:"Address Validation",description:"Enable address validation if true",type:"boolean","default":!0},showMapOnLoad:{title:"Whether to show the map when first loaded",type:"boolean"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{validateAddress:{helper:"Address validation if checked",rightLabel:"Enable Google Map for address validation?",type:"checkbox"}}})}}),t.registerFieldClass("address",t.Fields.AddressField)}(jQuery),function(e){var t=e.alpaca;t.Fields.CKEditorField=t.Fields.TextAreaField.extend({getFieldType:function(){return"ckeditor"},setup:function(){this.data||(this.data=""),this.base(),"undefined"==typeof this.options.ckeditor&&(this.options.ckeditor={})},afterRenderControl:function(t,n){var i=this;this.base(t,function(){!i.isDisplayOnly()&&i.control&&"undefined"!=typeof CKEDITOR&&i.on("ready",function(){i.editor||(i.editor=CKEDITOR.replace(e(i.control)[0],i.options.ckeditor),i.initCKEditorEvents())}),e(i.control).bind("destroyed",function(){if(i.editor){i.editor.removeAllListeners();try{i.editor.destroy(!1)}catch(e){}i.editor=null}}),n()})},initCKEditorEvents:function(){var e=this;e.editor&&(e.editor.on("click",function(t){e.onClick.call(e,t),e.trigger("click",t)}),e.editor.on("change",function(t){e.onChange(),e.triggerWithPropagation("change",t)}),e.editor.on("blur",function(t){e.onBlur(),e.trigger("blur",t)}),e.editor.on("focus",function(t){e.onFocus.call(e,t),e.trigger("focus",t)}),e.editor.on("key",function(t){e.onKeyPress.call(e,t),e.trigger("keypress",t)}))},setValue:function(e){var t=this;this.base(e),t.editor&&t.editor.setData(e)},getControlValue:function(){var e=this,t=null;return e.editor&&(t=e.editor.getData()),t},destroy:function(){var e=this;e.editor&&(e.editor.destroy(),e.editor=null),this.base()},getTitle:function(){return"CK Editor"},getDescription:function(){return"Provides an instance of a CK Editor control for use in editing HTML."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{ckeditor:{title:"CK Editor options",description:"Use this entry to provide configuration options to the underlying CKEditor plugin.",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{ckeditor:{type:"any"}}})}}),t.registerFieldClass("ckeditor",t.Fields.CKEditorField)}(jQuery),function(e){var t=e.alpaca;t.Fields.ColorField=t.Fields.TextField.extend({setup:function(){var t=this;this.spectrumAvailable=!1,t.isDisplayOnly()||"undefined"==typeof e.fn.spectrum||(this.spectrumAvailable=!0),"undefined"==typeof this.options.spectrum&&t.spectrumAvailable&&(this.inputType="color"),this.base(),"undefined"==typeof this.options.spectrum&&(this.options.spectrum={}),"undefined"==typeof this.options.spectrum.showInput&&(this.options.spectrum.showInput=!0),"undefined"==typeof this.options.spectrum.showPalette&&(this.options.spectrum.showPalette=!0),"undefined"==typeof this.options.spectrum.preferredFormat&&(this.options.spectrum.preferredFormat="hex3"),"undefined"==typeof this.options.spectrum.clickoutFiresChange&&(this.options.spectrum.clickoutFiresChange=!0)},getFieldType:function(){return"color"},getType:function(){return"string"},afterRenderControl:function(t,n){var i=this;this.base(t,function(){i.spectrumAvailable&&i.control&&(setTimeout(function(){e(i.control[0]).spectrum(e.extend({color:this.data},i.options.spectrum))},100),e(i.control).on("change.spectrum",function(e,t){i.setValue(t.toHexString())})),n()})},getTitle:function(){return"Color Field"},getDescription:function(){return"A color picker for selecting hexadecimal color values"}}),t.registerFieldClass("color",t.Fields.ColorField),t.registerDefaultSchemaFieldMapping("color","color")}(jQuery),function(e){var t=e.alpaca;t.Fields.CountryField=t.Fields.SelectField.extend({getFieldType:function(){return"country"},setup:function(){t.isUndefined(this.options.capitalize)&&(this.options.capitalize=!1),this.schema["enum"]=[],this.options.optionLabels=[];var e=this.getMessage("countries");if(e)for(var n in e){this.schema["enum"].push(n);var i=e[n];this.options.capitalize&&(i=i.toUpperCase()),this.options.optionLabels.push(i)}this.base()},getTitle:function(){return"Country Field"},getDescription:function(){return"Provides a dropdown selector of countries keyed by their ISO3 code. The names of the countries are read from the I18N bundle for the current locale."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{capitalize:{title:"Capitalize",description:"Whether the values should be capitalized",type:"boolean","default":!1,readonly:!0}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{capitalize:{type:"checkbox"}}})}}),t.registerFieldClass("country",t.Fields.CountryField),t.registerDefaultFormatFieldMapping("country","country")}(jQuery),function(e){var t=function(){var e={up:Math.ceil,down:function(e){return~~e},nearest:Math.round};return function(t){return e[t]}}(),n=e.alpaca;n.Fields.CurrencyField=n.Fields.TextField.extend({constructor:function(e,t,n,i,a,r,o){n=n||{};var l=this.getSchemaOfPriceFormatOptions().properties;for(var s in l){var u=l[s];s in n||(n[s]=u["default"]||void 0)}"undefined"!=typeof t&&(t=""+parseFloat(t).toFixed(n.centsLimit)),this.base(e,t,n,i,a,r,o)},getFieldType:function(){return"currency"},afterRenderControl:function(t,n){var i=this,a=this.getControlEl();this.base(t,function(){e(a).priceFormat(i.options),n()})},getControlValue:function(){var n=this.getControlEl(),i=e(n).is("input")?n.val():n.html();if(this.options.unmask||"none"!==this.options.round){var a=function(){var e="";for(var t in i){var n=i[t];isNaN(n)?n===this.options.centsSeparator&&(e+="."):e+=n}return parseFloat(e)}.bind(this)();if("none"!==this.options.round&&(a=t(this.options.round)(a),!this.options.unmask)){for(var r=[],o=""+a,l=0,s=0;l<i.length;l++)isNaN(i[l])?r.push(i[l]):r.push(o[s++]||0);return r.join("")}return a}return i},getTitle:function(){return"Currency Field"},getDescription:function(){return"Provides an automatically formatted and configurable input for entering currency amounts."},getSchemaOfPriceFormatOptions:function(){return{properties:{allowNegative:{title:"Allow Negative",description:"Determines if negative numbers are allowed.",type:"boolean","default":!1},centsLimit:{title:"Cents Limit",description:"The limit of fractional digits.",type:"number","default":2,minimum:0},centsSeparator:{title:"Cents Separator",description:"The separator between whole and fractional amounts.",type:"text","default":"."},clearPrefix:{title:"Clear Prefix",description:"Determines if the prefix is cleared on blur.",type:"boolean","default":!1},clearSuffix:{title:"Clear Suffix",description:"Determines if the suffix is cleared on blur.",type:"boolean","default":!1},insertPlusSign:{title:"Plus Sign",description:"Determines if a plus sign should be inserted for positive values.",type:"boolean","default":!1},limit:{title:"Limit",description:"A limit of the length of the field.",type:"number","default":void 0,minimum:0},prefix:{title:"Prefix",description:"The prefix if any for the field.",type:"text","default":"$"},round:{title:"Round",description:"Determines if the field is rounded. (Rounding is done when getValue is called and is not reflected in the UI)",type:"string","enum":["up","down","nearest","none"],"default":"none"},suffix:{title:"Suffix",description:"The suffix if any for the field.",type:"text","default":""},thousandsSeparator:{title:"Thousands Separator",description:"The separator between thousands.",type:"string","default":","},unmask:{title:"Unmask",description:"If true then the resulting value for this field will be unmasked. That is, the resulting value will be a float instead of a string (with the prefix, suffix, etc. removed).",type:"boolean","default":!0}}}},getSchemaOfOptions:function(){return n.merge(this.base(),this.getSchemaOfPriceFormatOptions())},getOptionsForOptions:function(){return n.merge(this.base(),{fields:{allowNegative:{type:"checkbox"},centsLimit:{type:"number"},centsSeparator:{type:"text"},clearPrefix:{type:"checkbox"},clearSuffix:{type:"checkbox"},insertPlusSign:{type:"checkbox"},limit:{type:"number"},prefix:{type:"text"},round:{type:"select"},suffix:{type:"text"},thousandsSeparator:{type:"string"},unmask:{type:"checkbox"}}})}}),n.registerFieldClass("currency",n.Fields.CurrencyField)}(jQuery),function(e){var t=e.alpaca;t.Fields.DateField=t.Fields.TextField.extend({getFieldType:function(){return"date"},getDefaultFormat:function(){return"MM/DD/YYYY"},getDefaultExtraFormats:function(){return[]},setup:function(){var e=this;if(this.base(),e.options.picker||(e.options.picker={}),"undefined"==typeof e.options.picker.useCurrent&&(e.options.picker.useCurrent=!1),e.options.picker.format&&(e.options.dateFormat=e.options.picker.format),e.options.dateFormat||(e.options.dateFormat=e.getDefaultFormat()),e.options.picker.format||(e.options.picker.format=e.options.dateFormat),e.options.picker.locale||(e.options.picker.locale="en_US"),e.options.picker.dayViewHeaderFormat||(e.options.picker.dayViewHeaderFormat="MMMM YYYY"),!e.options.picker.extraFormats){var t=e.getDefaultExtraFormats();t&&(e.options.picker.extraFormats=t)}"undefined"==typeof e.options.manualEntry&&(e.options.manualEntry=!1)},onKeyPress:function(e){return this.options.manualEntry?(e.preventDefault(),void e.stopImmediatePropagation()):void this.base(e)},onKeyDown:function(e){return this.options.manualEntry?(e.preventDefault(),void e.stopImmediatePropagation()):void this.base(e)},beforeRenderControl:function(e,t){this.field.css("position","relative"),t()},afterRenderControl:function(t,n){var i=this;this.base(t,function(){"display"!==i.view.type&&e.fn.datetimepicker&&(i.getControlEl().datetimepicker(i.options.picker),i.picker=i.getControlEl().data("DateTimePicker"),i.picker&&i.options.dateFormat&&i.picker.format(i.options.dateFormat),i.picker&&(i.options.dateFormat=i.picker.format()),i.getFieldEl().on("dp.change",function(e){setTimeout(function(){i.onChange.call(i,e),i.triggerWithPropagation("change",e)},250)}),i.data&&i.picker.date(i.data)),n()})},setManualEntry:function(e){this.options.manualEntry=e},getDate:function(){var e=this,t=null;try{t=e.picker?e.picker.date()?e.picker.date()._d:null:new Date(this.getValue())}catch(n){console.error(n)}return t},date:function(){return this.getDate()},onChange:function(e){this.base(),this.refreshValidationState()},isAutoFocusable:function(){return!1},handleValidate:function(){var e=this.base(),n=this.validation,i=this._validateDateFormat();return n.invalidDate={message:i?"":t.substituteTokens(this.getMessage("invalidDate"),[this.options.dateFormat]),status:i},e&&n.invalidDate.status},_validateDateFormat:function(){var e=this,n=!0;if(e.options.dateFormat){var i=e.getValue();if(i||e.isRequired()){var a=[];if(a.push(e.options.dateFormat),e.options.picker&&e.options.picker.extraFormats)for(var r=0;r<e.options.picker.extraFormats.length;r++)a.push(e.options.picker.extraFormats[r]);for(var r=0;r<a.length;r++)n=n||t.moment(i,e.options.dateFormat,!0).isValid()}}return n},setValue:function(e){var n=this;this.base(e),this.picker&&t.moment(e,n.options.dateFormat,!0).isValid()&&this.picker.date(e)},destroy:function(){this.base(),this.picker=null},getTitle:function(){return"Date Field"},getDescription:function(){return"Date Field"},getSchemaOfSchema:function(){return t.merge(this.base(),{properties:{format:{title:"Format",description:"Property data format",type:"string","default":"date","enum":["date"],readonly:!0}}})},getOptionsForSchema:function(){return t.merge(this.base(),{fields:{format:{type:"text"}}})},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{dateFormat:{title:"Date Format",description:"Date format (using moment.js format)",type:"string"},picker:{title:"DatetimePicker options",description:"Options that are supported by the <a href='http://eonasdan.github.io/bootstrap-datetimepicker/'>Bootstrap DateTime Picker</a>.",type:"any"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{dateFormat:{type:"text"},picker:{type:"any"}}})}}),t.registerMessages({invalidDate:"Invalid date for format {0}"}),t.registerFieldClass("date",t.Fields.DateField),t.registerDefaultFormatFieldMapping("date","date")}(jQuery),function(e){var t=e.alpaca;t.Fields.DatetimeField=t.Fields.DateField.extend({getFieldType:function(){return"datetime"},getDefaultFormat:function(){return"MM/DD/YYYY HH:mm:ss"},getDefaultExtraFormats:function(){return["MM/DD/YYYY hh:mm:ss a","MM/DD/YYYY HH:mm","MM/DD/YYYY"]},setup:function(){this.base()},getTitle:function(){return"Datetime Field"},getDescription:function(){return"Datetime Field based on <a href='http://eonasdan.github.io/bootstrap-datetimepicker/'>Bootstrap DateTime Picker</a>."}}),t.registerFieldClass("datetime",t.Fields.DatetimeField),t.registerDefaultFormatFieldMapping("datetime","datetime"),t.registerDefaultFormatFieldMapping("date-time","datetime")}(jQuery),function(e){var t=e.alpaca;t.Fields.EditorField=t.Fields.TextField.extend({getFieldType:function(){return"editor"},setup:function(){var e=this;this.base(),e.options.aceTheme||(e.options.aceTheme="ace/theme/chrome"),e.options.aceMode||(e.options.aceMode="ace/mode/json"),"undefined"==typeof e.options.beautify&&(e.options.beautify=!0),e.options.beautify&&this.data&&("ace/mode/json"===e.options.aceMode&&(t.isObject(this.data)?this.data=JSON.stringify(this.data,null," "):t.isString(this.data)&&(this.data=JSON.stringify(JSON.parse(this.data),null," "))),"ace/mode/html"===e.options.aceMode&&"undefined"!=typeof html_beautify&&(this.data=html_beautify(this.data)),"ace/mode/css"===e.options.aceMode&&"undefined"!=typeof css_beautify&&(this.data=css_beautify(this.data)),"ace/mode/javascript"===e.options.aceMode&&"undefined"!=typeof js_beautify&&(this.data=js_beautify(this.data))),"ace/mode/json"===e.options.aceMode&&(this.data&&"{}"!==this.data||(this.data="{\n \n}"))},afterRenderControl:function(n,i){var a=this;this.base(n,function(){if(a.control){var n=a.options.aceHeight;n&&e(a.control).css("height",n);var r=a.options.aceWidth;r||(r="100%"),e(a.control).css("width",r)}var o=e(a.control)[0];if(!ace&&window.ace&&(ace=window.ace),ace){a.editor=ace.edit(o),a.editor.setOptions({maxLines:1/0}),a.editor.getSession().setUseWrapMode(!0);var l=a.options.aceTheme;a.editor.setTheme(l);var s=a.options.aceMode;if(a.editor.getSession().setMode(s),a.editor.renderer.setHScrollBarAlwaysVisible(!1),a.editor.setShowPrintMargin(!1),
a.editor.setValue(a.data),a.editor.clearSelection(),a.editor.getSession().getUndoManager().reset(),a.options.aceFitContentHeight){var u=function(){var t=!1;0===a.editor.renderer.lineHeight&&(t=!0,a.editor.renderer.lineHeight=16);var n=a.editor.getSession().getScreenLength()*a.editor.renderer.lineHeight+a.editor.renderer.scrollBar.getWidth();e(a.control).height(n.toString()+"px"),a.editor.resize(),t&&window.setTimeout(function(){a.editor.clearSelection()},100)};u(),a.editor.getSession().on("change",u)}a.schema.readonly&&a.editor.setReadOnly(!0),e(o).bind("destroyed",function(){a.editor&&(a.editor.destroy(),a.editor=null)})}else t.logError("Editor Field is missing the 'ace' Cloud 9 Editor");i()})},destroy:function(){this.editor&&(this.editor.destroy(),this.editor=null),this.base()},getEditor:function(){return this.editor},handleValidate:function(){var e=this.base(),n=this.validation,i=this._validateWordCount();n.wordLimitExceeded={message:i?"":t.substituteTokens(this.getMessage("wordLimitExceeded"),[this.options.wordlimit]),status:i};var a=this._validateEditorAnnotations();return n.editorAnnotationsExist={message:a?"":this.getMessage("editorAnnotationsExist"),status:a},e&&n.wordLimitExceeded.status&&n.editorAnnotationsExist.status},_validateEditorAnnotations:function(){if(this.editor){var e=this.editor.getSession().getAnnotations();if(e&&e.length>0)return!1}return!0},_validateWordCount:function(){if(this.options.wordlimit&&this.options.wordlimit>-1){var e=this.editor.getValue();if(e){var t=e.split(" ").length;if(t>this.options.wordlimit)return!1}}return!0},onDependentReveal:function(){this.editor&&this.editor.resize()},setValue:function(e){var n=this;this.editor&&("object"==n.schema.type&&t.isObject(e)&&(e=JSON.stringify(e,null," ")),this.editor.setValue(e),n.editor.clearSelection()),this.base(e)},getControlValue:function(){var e=null;return this.editor&&(e=this.editor.getValue()),"object"==this.schema.type&&(e=e?JSON.parse(e):{}),e},getTitle:function(){return"Editor"},getDescription:function(){return"Editor"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{aceTheme:{title:"ACE Editor Theme",description:"Specifies the theme to set onto the editor instance",type:"string","default":"ace/theme/twilight"},aceMode:{title:"ACE Editor Mode",description:"Specifies the mode to set onto the editor instance",type:"string","default":"ace/mode/javascript"},aceWidth:{title:"ACE Editor Height",description:"Specifies the width of the wrapping div around the editor",type:"string","default":"100%"},aceHeight:{title:"ACE Editor Height",description:"Specifies the height of the wrapping div around the editor",type:"string","default":"300px"},aceFitContentHeight:{title:"ACE Fit Content Height",description:"Configures the ACE Editor to auto-fit its height to the contents of the editor",type:"boolean","default":!1},wordlimit:{title:"Word Limit",description:"Limits the number of words allowed in the text area.",type:"number","default":-1}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{aceTheme:{type:"text"},aceMode:{type:"text"},wordlimit:{type:"integer"}}})}}),t.registerMessages({wordLimitExceeded:"The maximum word limit of {0} has been exceeded.",editorAnnotationsExist:"The editor has errors in it that must be corrected"}),t.registerFieldClass("editor",t.Fields.EditorField)}(jQuery),function(e){var t=e.alpaca;t.Fields.EmailField=t.Fields.TextField.extend({getFieldType:function(){return"email"},setup:function(){this.inputType="email",this.base(),this.schema.pattern||(this.schema.pattern=t.regexps.email)},handleValidate:function(){var e=this.base(),t=this.validation;return t.invalidPattern.status||(t.invalidPattern.message=this.getMessage("invalidEmail")),e},getTitle:function(){return"Email Field"},getDescription:function(){return"Email Field."},getSchemaOfSchema:function(){var e=this.schema&&this.schema.pattern?this.schema.pattern:t.regexps.email;return t.merge(this.base(),{properties:{pattern:{title:"Pattern",description:"Field Pattern in Regular Expression",type:"string","default":e,"enum":[e],readonly:!0},format:{title:"Format",description:"Property data format",type:"string","default":"email","enum":["email"],readonly:!0}}})},getOptionsForSchema:function(){return t.merge(this.base(),{fields:{format:{type:"text"}}})}}),t.registerMessages({invalidEmail:"Invalid Email address e.g. [email protected]"}),t.registerFieldClass("email",t.Fields.EmailField),t.registerDefaultFormatFieldMapping("email","email")}(jQuery),function(e){var t=e.alpaca;t.Fields.GridField=t.Fields.ArrayField.extend({getFieldType:function(){return"grid"},setup:function(){this.base(),"undefined"==typeof this.options.grid&&(this.options.grid={})},afterRenderContainer:function(t,n){var i=this;this.base(t,function(){var t=[],a=[];for(var r in i.options.fields){var o=i.options.fields[r],l=r;o.label&&(l=o.label),a.push(l)}t.push(a);for(var s=0;s<i.data.length;s++){var u=[];for(var c in i.data[s])u.push(i.data[s][c]);t.push(u)}var d=e(i.container).find(".alpaca-container-grid-holder"),p=i.options.grid;p.data=t,e(d).handsontable(p),n()})},getType:function(){return"array"},getTitle:function(){return"Grid Field"},getDescription:function(){return"Renders array items into a grid"}}),t.registerFieldClass("grid",t.Fields.GridField)}(jQuery),function(e){var t=e.alpaca;t.Fields.ImageField=t.Fields.TextField.extend({getFieldType:function(){return"image"},getTitle:function(){return"Image Field"},getDescription:function(){return"Image Field."}}),t.registerFieldClass("image",t.Fields.ImageField)}(jQuery),function(e){var t=e.alpaca;t.Fields.IntegerField=t.Fields.NumberField.extend({getFieldType:function(){return"integer"},getControlValue:function(){var e=this.base();return"undefined"==typeof e||""==e?e:parseInt(e,10)},onChange:function(e){this.base(),this.slider&&this.slider.slider("value",this.getValue())},postRender:function(n){var i=this;this.base(function(){i.options.slider&&(t.isEmpty(i.schema.maximum)||t.isEmpty(i.schema.minimum)||i.control&&(i.control.after('<div id="slider"></div>'),i.slider=e("#slider",i.control.parent()).slider({value:i.getValue(),min:i.schema.minimum,max:i.schema.maximum,slide:function(e,t){i.setValue(t.value),i.refreshValidationState()}}))),n()})},handleValidate:function(){var e=this.base(),t=this.validation,n=this._validateInteger();return t.stringNotANumber={message:n?"":this.getMessage("stringNotAnInteger"),status:n},e},_validateInteger:function(){var e=this._getControlVal();if("number"==typeof e&&(e=""+e),t.isValEmpty(e))return!0;var n=t.testRegex(t.regexps.integer,e);if(!n)return!1;var i=this.getValue();return!isNaN(i)},getType:function(){return"integer"},getTitle:function(){return"Integer Field"},getDescription:function(){return"Field for integers."},getSchemaOfSchema:function(){return t.merge(this.base(),{properties:{minimum:{title:"Minimum",description:"Minimum value of the property.",type:"integer"},maximum:{title:"Maximum",description:"Maximum value of the property.",type:"integer"},divisibleBy:{title:"Divisible By",description:"Property value must be divisible by this number.",type:"integer"}}})},getOptionsForSchema:function(){return t.merge(this.base(),{fields:{minimum:{helper:"Minimum value of the field.",type:"integer"},maximum:{helper:"Maximum value of the field.",type:"integer"},divisibleBy:{helper:"Property value must be divisible by this number.",type:"integer"}}})},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{slider:{title:"Slider",description:"Generate jQuery UI slider control with the field if true.",type:"boolean","default":!1}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{slider:{rightLabel:"Slider control ?",helper:"Generate slider control if selected.",type:"checkbox"}}})}}),t.registerMessages({stringNotAnInteger:"This value is not an integer."}),t.registerFieldClass("integer",t.Fields.IntegerField),t.registerDefaultSchemaFieldMapping("integer","integer")}(jQuery),function(e){var t=e.alpaca;t.Fields.IPv4Field=t.Fields.TextField.extend({getFieldType:function(){return"ipv4"},setup:function(){this.base(),this.schema.pattern||(this.schema.pattern=t.regexps.ipv4)},handleValidate:function(){var e=this.base(),t=this.validation;return t.invalidPattern.status||(t.invalidPattern.message=this.getMessage("invalidIPv4")),e},getTitle:function(){return"IP Address Field"},getDescription:function(){return"IP Address Field."},getSchemaOfSchema:function(){var e=this.schema&&this.schema.pattern?this.schema.pattern:t.regexps.ipv4;return t.merge(this.base(),{properties:{pattern:{title:"Pattern",description:"Field Pattern in Regular Expression",type:"string","default":e,readonly:!0},format:{title:"Format",description:"Property data format",type:"string","enum":["ip-address"],"default":"ip-address",readonly:!0}}})},getOptionsForSchema:function(){return t.merge(this.base(),{fields:{format:{type:"text"}}})}}),t.registerMessages({invalidIPv4:"Invalid IPv4 address, e.g. 192.168.0.1"}),t.registerFieldClass("ipv4",t.Fields.IPv4Field),t.registerDefaultFormatFieldMapping("ip-address","ipv4")}(jQuery),function(e){function t(e){if("string"==typeof e.data){var t=e.handler,n=e.data.toLowerCase().split(" ");e.handler=function(e){if(this===e.target||!/textarea|select/i.test(e.target.nodeName)&&"text"!==e.target.type){var i="keypress"!==e.type&&jQuery.hotkeys.specialKeys[e.which],a=String.fromCharCode(e.which).toLowerCase(),r="",o={};e.altKey&&"alt"!==i&&(r+="alt+"),e.ctrlKey&&"ctrl"!==i&&(r+="ctrl+"),e.metaKey&&!e.ctrlKey&&"meta"!==i&&(r+="meta+"),e.shiftKey&&"shift"!==i&&(r+="shift+"),i?o[r+i]=!0:(o[r+a]=!0,o[r+jQuery.hotkeys.shiftNums[a]]=!0,"shift+"===r&&(o[jQuery.hotkeys.shiftNums[a]]=!0));for(var l=0,s=n.length;s>l;l++)if(o[n[l]])return t.apply(this,arguments)}}}}var n=e.alpaca;n.Fields.JSONField=n.Fields.TextAreaField.extend({getFieldType:function(){return"json"},setValue:function(e){(n.isObject(e)||"object"==typeof e)&&(e=JSON.stringify(e,null,3)),this.base(e)},getControlValue:function(){var e=this.base();return e&&n.isString(e)&&(e=JSON.parse(e)),e},handleValidate:function(){var e=this.base(),t=this.validation,n=this._validateJSON();return t.stringNotAJSON={message:n.status?"":this.getMessage("stringNotAJSON")+" "+n.message,status:n.status},e&&t.stringNotAJSON.status},_validateJSON:function(){var e=this.control.val();if(n.isValEmpty(e))return{status:!0};try{var t=JSON.parse(e);return this.setValue(JSON.stringify(t,null,3)),{status:!0}}catch(i){return{status:!1,message:i.message}}},afterRenderControl:function(e,t){var n=this;this.base(e,function(){n.control&&(n.control.bind("keypress",function(e){var t=e.keyCode||e.wich;34===t&&n.control.insertAtCaret('"'),123===t&&n.control.insertAtCaret("}"),91===t&&n.control.insertAtCaret("]")}),n.control.bind("keypress","Ctrl+l",function(){n.getFieldEl().removeClass("alpaca-field-focused"),n.refreshValidationState()}),n.control.attr("title","Type Ctrl+L to format and validate the JSON string.")),t()})},getTitle:function(){return"JSON Editor"},getDescription:function(){return"Editor for JSON objects with basic validation and formatting."}}),n.registerMessages({stringNotAJSON:"This value is not a valid JSON string."}),n.registerFieldClass("json",n.Fields.JSONField),e.fn.insertAtCaret=function(e){return this.each(function(){if(document.selection)this.focus(),sel=document.selection.createRange(),sel.text=e,this.focus();else if(this.selectionStart||"0"==this.selectionStart){var t=this.selectionStart,n=this.selectionEnd,i=this.scrollTop;this.value=this.value.substring(0,t)+e+this.value.substring(n,this.value.length),this.focus(),this.selectionStart=t,this.selectionEnd=t,this.scrollTop=i}else this.value+=e,this.focus()})},jQuery.hotkeys={version:"0.8",specialKeys:{8:"backspace",9:"tab",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",191:"/",224:"meta"},shiftNums:{"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":": ","'":'"',",":"<",".":">","/":"?","\\":"|"}},jQuery.each(["keydown","keyup","keypress"],function(){jQuery.event.special[this]={add:t}})}(jQuery),function(e){var t=e.alpaca;t.Fields.LowerCaseField=t.Fields.TextField.extend({getFieldType:function(){return"lowercase"},setup:function(){this.base(),this.data&&(this.data=this.data.toLowerCase())},setValue:function(e){if(!e)return this.base(e);var t=e.toLowerCase();t!=this.getValue()&&this.base(t)},onKeyPress:function(e){this.base(e);var n=this;t.later(25,this,function(){var e=n.getValue();n.setValue(e)})},getTitle:function(){return"Lowercase Text"},getDescription:function(){return"Text field for lowercase text."}}),t.registerFieldClass("lowercase",t.Fields.LowerCaseField),t.registerDefaultFormatFieldMapping("lowercase","lowercase")}(jQuery),function(e){var t=e.alpaca;t.Fields.MapField=t.Fields.ArrayField.extend({getFieldType:function(){return"map"},getType:function(){return"object"},setup:function(){if(this.data&&t.isObject(this.data)){var n=[];e.each(this.data,function(e,i){var a=t.copyOf(i);a._key=e,n.push(a)}),this.data=n}this.base(),t.mergeObject(this.options,{forceRevalidation:!0}),t.isEmpty(this.data)},getContainerValue:function(){if(0!==this.children.length||this.isRequired()){for(var e={},t=0;t<this.children.length;t++){var n=this.children[t].getValue(),i=n._key;i&&(delete n._key,e[i]=n)}return e}},handleValidate:function(){var e=this.base(),t=this.validation,n=this._validateMapKeysNotEmpty();t.keyMissing={message:n?"":this.getMessage("keyMissing"),status:n};var i=this._validateMapKeysUnique();return t.keyNotUnique={message:i?"":this.getMessage("keyNotUnique"),status:i},e&&t.keyMissing.status&&t.keyNotUnique.status},_validateMapKeysNotEmpty:function(){for(var e=!0,t=0;t<this.children.length;t++){var n=this.children[t].getValue(),i=n._key;if(!i){e=!1;break}}return e},_validateMapKeysUnique:function(){for(var e=!0,t={},n=0;n<this.children.length;n++){var i=this.children[n].getValue(),a=i._key;t[a]&&(e=!1),t[a]=a}return e},getTitle:function(){return"Map Field"},getDescription:function(){return"Field for objects with key/value pairs that share the same schema for values."}}),t.registerFieldClass("map",t.Fields.MapField),t.registerMessages({keyNotUnique:"Keys of map field are not unique.",keyMissing:"Map contains an empty key."})}(jQuery),function(e){var t=e.alpaca;t.Fields.OptionTreeField=t.Fields.TextField.extend({getFieldType:function(){return"optiontree"},setup:function(){var e=this;this.base(),this.options.tree||(this.options.tree={}),this.options.tree.selectors||(this.options.tree.selectors={}),this.options.tree.order||(this.options.tree.order=[]);for(var n in this.options.tree.selectors){if(!this.options.tree.selectors[n].schema)return void t.logError("OptionTree selector for: "+n+" is missing schema");this.options.tree.selectors[n].options||(this.options.tree.selectors[n].options={})}this.options.tree.data||(this.options.tree.data=[]);for(var i=0;i<this.options.tree.data.length;i++){var a=this.options.tree.data[i];if(a.attributes)for(var n in a.attributes)this.options.tree.selectors[n]||(this.options.tree.selectors[n]={}),this.options.tree.selectors[n].label||(this.options.tree.selectors[n].options.noneLabel="Choose..."),this.options.tree.selectors[n].type||(this.options.tree.selectors[n].options.type="select")}if(!e.options.tree.order){e.options.tree.order=[];for(var n in e.options.tree.selectors)e.options.tree.order.push(e.options.tree.selectors[n])}"undefined"==typeof e.options.tree.horizontal&&(e.options.tree.horizontal=!0),this.locationValueLists={},this.locationValues={};for(var i=0;i<e.options.tree.data.length;i++)if(e.options.tree.data[i].attributes){var r="root";for(var n in e.options.tree.data[i].attributes){var o=e.options.tree.data[i].attributes[n],l=this.locationValueLists[r];l||(l=[],this.locationValueLists[r]=l);for(var s=!1,u=0;u<l.length;u++)if(l[u].value===o){s=!0;break}s||l.push({text:o,value:o}),r.length>0&&(r+="~"),r+=n+"="+o}this.locationValues[r]=e.options.tree.data[i].value}this.currentAttributes={},this.controls={}},toLocation:function(e){var t="root";for(var n in e){var i=e[n];t.length>0&&(t+="~"),t+=n+"="+i}return t},existsLocationWithPrefix:function(e){var t=!1;for(var n in this.locationValueLists)if(n.indexOf(e)>-1){t=!0;break}return t},afterRenderControl:function(t,n){var i=this;i.optionTreeHolder=e(i.field).find(".optiontree"),i.options.tree.horizontal&&e(i.field).addClass("optiontree-horizontal"),this.base(t,function(){i.refreshOptionTreeControls(function(){n()})})},refreshOptionTreeControls:function(n){var i=this;for(var a in i.controls)i.controls[a].hide();for(var r=0,o=0;o<i.options.tree.order.length;o++){var l=i.options.tree.order[o];"undefined"!=typeof i.currentAttributes[l]&&null!==i.currentAttributes[l]&&""!==i.currentAttributes[l]&&r++}var s="root",u=[],c=0,o=0;do{if(o<i.options.tree.order.length){var l=i.options.tree.order[o],d=o==i.options.tree.order.length-1||i.existsLocationWithPrefix(s+"~"+l+"=");if(d)if(r>=c){if(i.controls[l])i.controls[l].show(),s+="~"+l+"="+i.currentAttributes[l];else{var p=i.options.tree.selectors[l],h=o+1===i.options.tree.order.length,f=function(t,n,a,r,o,l){return function(s){var u=a.schema,c=a.options;c||(c={}),c.type||(c.type="select"),"select"===c.type&&(c.dataSource=function(e){var t=i.toLocation(i.currentAttributes),n=i.locationValueLists[t];e(n)});var d=e("<div class='optiontree-selector'></div>");e(d).alpaca({schema:u,options:c,postRender:function(a){r[n]=a,e(o).append(d),a.selectorId=n,a.on("change",function(){var e=this.selectorId;i.currentAttributes[e]=this.getValue();for(var n=0;n<i.options.tree.order.length;n++)if(n>t){var e=i.options.tree.order[n];delete i.currentAttributes[e],r[e]&&(r[e].destroy(),delete r[e])}if(l){for(var a=null,n=0;n<i.options.tree.data.length;n++){var o=!0,s=i.options.tree.data[n].attributes;for(var u in i.currentAttributes)if(s[u]!==i.currentAttributes[u]){o=!1;break}o&&(a=i.options.tree.data[n].value)}a&&i.setValue(a)}i.refreshOptionTreeControls()}),a.show(),s()}})}}(o,l,p,i.controls,i.optionTreeHolder,h);u.push(f),s+="~"+l+"="+i.currentAttributes[l]}c++}else i.controls[l]&&(i.controls[l].destroy(),delete i.controls[l]);else i.controls[l]&&(i.controls[l].destroy(),delete i.controls[l])}o++}while(o<i.options.tree.order.length);t.series(u,function(){n&&n()})},getType:function(){return"any"},getTitle:function(){return"Option Tree"},getDescription:function(){return"Option Tree"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{tree:{type:"object",properties:{options:{type:"object"},order:{type:"array",items:{type:"string"}},data:{type:"array",items:{type:"object",properties:{value:{type:"any"},attributes:{type:"object"}}}},horizontal:{type:"boolean"}}}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{}})}}),t.registerFieldClass("optiontree",t.Fields.OptionTreeField)}(jQuery),function(e){var t=e.alpaca;t.Fields.PasswordField=t.Fields.TextField.extend({getFieldType:function(){return"password"},setup:function(){this.base(),this.schema.pattern||(this.schema.pattern=t.regexps.password)},handleValidate:function(){var e=this.base(),t=this.validation;return t.invalidPattern.status||(t.invalidPattern.message=this.getMessage("invalidPassword")),e},getTitle:function(){return"Password Field"},getDescription:function(){return"Password Field."},getSchemaOfSchema:function(){var e=this.schema&&this.schema.pattern?this.schema.pattern:/^[0-9a-zA-Z\x20-\x7E]*$/;return t.merge(this.base(),{properties:{pattern:{title:"Pattern",description:"Field Pattern in Regular Expression",type:"string","default":this.schema.pattern,"enum":[e],readonly:!0},format:{title:"Format",description:"Property data format",type:"string","default":"password","enum":["password"],readonly:!0}}})},getOptionsForSchema:function(){return t.merge(this.base(),{fields:{format:{type:"text"}}})}}),t.registerMessages({invalidPassword:"Invalid Password"}),t.registerFieldClass("password",t.Fields.PasswordField),t.registerDefaultFormatFieldMapping("password","password")}(jQuery),function(e){var t=e.alpaca;t.Fields.PersonalNameField=t.Fields.TextField.extend({getFieldType:function(){return"personalname"},setValue:function(e){if(!e)return this.base(e);for(var t="",n=0;n<e.length;n++)t+=0===n?e.charAt(n).toUpperCase():" "===e.charAt(n-1)||"-"===e.charAt(n-1)||"'"===e.charAt(n-1)?e.charAt(n).toUpperCase():e.charAt(n);t!=this.getValue()&&this.base(t)},onKeyPress:function(e){this.base(e);var n=this;t.later(25,this,function(){var e=n.getValue();n.setValue(e)})},getTitle:function(){return"Personal Name"},getDescription:function(){return"Text Field for personal name with captical letter for first letter & after hyphen, space or apostrophe."}}),t.registerFieldClass("personalname",t.Fields.PersonalNameField)}(jQuery),function(e){var t=e.alpaca;t.Fields.PhoneField=t.Fields.TextField.extend({setup:function(){this.inputType="tel",this.base(),this.schema.pattern||(this.schema.pattern=t.regexps.phone),t.isEmpty(this.options.maskString)&&(this.options.maskString="(999) 999-9999")},postRender:function(e){this.base(function(){e()})},handleValidate:function(){var e=this.base(),t=this.validation;return t.invalidPattern.status||(t.invalidPattern.message=this.getMessage("invalidPhone")),e},getFieldType:function(){return"phone"},getTitle:function(){return"Phone Field"},getDescription:function(){return"Phone Field."},getSchemaOfSchema:function(){var e=this.schema&&this.schema.pattern?this.schema.pattern:t.regexps.phone;return t.merge(this.base(),{properties:{pattern:{title:"Pattern",description:"Field Pattern in Regular Expression",type:"string","default":e,"enum":[e],readonly:!0},format:{title:"Format",description:"Property data format",type:"string","default":"phone","enum":["phone"],readonly:!0}}})},getOptionsForSchema:function(){return t.merge(this.base(),{fields:{format:{type:"text"}}})},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{maskString:{title:"Field Mask String",description:"Expression for field mask",type:"string","default":"(999) 999-9999"}}})}}),t.registerMessages({invalidPhone:"Invalid Phone Number, e.g. (123) 456-9999"}),t.registerFieldClass("phone",t.Fields.PhoneField),t.registerDefaultFormatFieldMapping("phone","phone")}(jQuery),function(e){var t=e.alpaca;t.Fields.SearchField=t.Fields.TextField.extend({setup:function(){this.inputType="search",this.base(),this.options.attributes.results=5},getFieldType:function(){return"search"},getType:function(){return"string"},getTitle:function(){return"Search Field"},getDescription:function(){return"A search box field"}}),t.registerFieldClass("search",t.Fields.SearchField),t.registerDefaultSchemaFieldMapping("search","search")}(jQuery),function(e){var t=e.alpaca;t.usHoldings={},t.usHoldings.territories={"American Samoa":"AS","District Of Columbia":"DC","Federated States Of Micronesia":"FM",Guam:"GU","Marshall Islands":"MH","Northern Mariana Islands":"MP",Palau:"PW","Puerto Rico":"PR","Virgin Islands":"VI"},t.usHoldings.states={Alabama:"AL",Alaska:"AK",Arizona:"AZ",Arkansas:"AR",California:"CA",Colorado:"CO",Connecticut:"CT",Delaware:"DE",Florida:"FL",Georgia:"GA",Hawaii:"HI",Idaho:"ID",Illinois:"IL",Indiana:"IN",Iowa:"IA",Kansas:"KS",Kentucky:"KY",Louisiana:"LA",Maine:"ME",Maryland:"MD",Massachusetts:"MA",Michigan:"MI",Minnesota:"MN",Mississippi:"MS",Missouri:"MO",Montana:"MT",Nebraska:"NE",Nevada:"NV","New Hampshire":"NH","New Jersey":"NJ","New Mexico":"NM","New York":"NY","North Carolina":"NC","North Dakota":"ND",Ohio:"OH",Oklahoma:"OK",Oregon:"OR",Pennsylvania:"PA","Rhode Island":"RI","South Carolina":"SC","South Dakota":"SD",Tennessee:"TN",Texas:"TX",Utah:"UT",Vermont:"VT",Virginia:"VA",Washington:"WA","West Virginia":"WV",Wisconsin:"WI",Wyoming:"WY"},t.Fields.StateField=t.Fields.SelectField.extend({getFieldType:function(){return"state"},setup:function(){t.isUndefined(this.options.capitalize)&&(this.options.capitalize=!1),t.isUndefined(this.options.includeStates)&&(this.options.includeStates=!0),t.isUndefined(this.options.includeTerritories)&&(this.options.includeTerritories=!0),t.isUndefined(this.options.format)&&(this.options.format="name"),"name"===this.options.format||"code"===this.options.format||(t.logError("The configured state format: "+this.options.format+" is not a legal value [name, code]"),this.options.format="name");var e=t.retrieveUSHoldings(this.options.includeStates,this.options.includeTerritories,"code"===this.options.format,this.options.capitalize);this.schema["enum"]=e.keys,this.options.optionLabels=e.values,this.base()},getTitle:function(){return"State Field"},getDescription:function(){return"Provides a dropdown selector of states and/or territories in the United States, keyed by their two-character code."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{format:{title:"Format",description:"How to represent the state values in the selector",type:"string","default":"name","enum":["name","code"],readonly:!0},capitalize:{title:"Capitalize",description:"Whether the values should be capitalized",type:"boolean","default":!1,readonly:!0},includeStates:{title:"Include States",description:"Whether to include the states of the United States",type:"boolean","default":!0,readonly:!0},includeTerritories:{title:"Include Territories",description:"Whether to include the territories of the United States",type:"boolean","default":!0,readonly:!0}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{format:{type:"text"},capitalize:{type:"checkbox"},includeStates:{type:"checkbox"},includeTerritories:{type:"checkbox"}}})}}),t.registerFieldClass("state",t.Fields.StateField),t.registerDefaultFormatFieldMapping("state","state"),t.retrieveUSHoldings=function(){return function(n,i,a,r){var o={keys:[],values:[]},l=e.extend({},n?t.usHoldings.states:{},i?t.usHoldings.territories:{}),s=Object.keys(l);s.sort();for(var u in s){var c=s[u],d=l[c],p=a?d:c;r&&(p=p.toUpperCase()),o.keys.push(d),o.values.push(p)}return o}}()}(jQuery),function(e){var t=e.alpaca;t.Fields.TableField=t.Fields.ArrayField.extend({setup:function(){var n=this;n.options||(n.options={}),"undefined"==typeof n.options.animate&&(n.options.animate=!1),"undefined"==typeof this.options.toolbarSticky&&(this.options.toolbarSticky=!0),this.base(),this.options.items.type||(this.options.items.type="tablerow"),this.options.datatable&&(this.options.datatables=this.options.datatable),"undefined"==typeof this.options.datatables&&(this.options.datatables={paging:!1,lengthChange:!1,info:!1,searching:!1,ordering:!0},"undefined"==typeof this.options.dragRows&&(this.options.dragRows=!1),this.options.readonly&&(this.options.dragRows=!1),this.isDisplayOnly()&&(this.options.dragRows=!1)),"undefined"==typeof this.options.showActionsColumn&&(this.options.showActionsColumn=!0,this.options.readonly&&(this.options.showActionsColumn=!1),this.isDisplayOnly()&&(this.options.showActionsColumn=!1)),this.options.datatables.columns=[],e.fn.dataTableExt&&!e.fn.DataTable.ext.type.search.alpaca&&(e.fn.DataTable.ext.order.alpaca=function(n,i){return this.api().column(i,{order:"index"}).nodes().map(function(n,i){var a=e(n).children().attr("data-alpaca-field-id");return t.fieldInstances[a].getValue()})},e.fn.dataTableExt.afnFiltering.push(function(n,i,a,r,o){var l=e(n.nTableWrapper).find(".dataTables_filter input[type='search']").val();if(!l)return!0;l=""+l,l=e.trim(l),l=l.toLowerCase();for(var s=!1,u=0;u<r.length;u++){var c=r[u];if(c){var d=c.indexOf("data-alpaca-field-id=");if(d>-1){var p=e(c).attr("data-alpaca-field-id"),h=t.fieldInstances[p].getValue();if(h&&(h=""+h,h=h.toLowerCase(),h.indexOf(l)>-1)){s=!0;break}}}}return s}))},getFieldType:function(){return"table"},prepareContainerModel:function(e){var t=this;t.base(function(n){if(n.headers=[],t.schema.items&&t.schema.items.properties)for(var i in t.schema.items.properties){var a={};a.id=i,a.title=t.schema.items.properties[i].title,a.hidden=!1,t.options.items&&t.options.items.fields&&t.options.items.fields[i]&&(t.options.items.fields[i].label&&(a.title=t.options.items.fields[i].label),"hidden"===t.options.items.fields[i].type&&(a.hidden=!0)),n.headers.push(a)}e(n)})},afterRenderContainer:function(t,n){var i=this;this.base(t,function(){i.cleanupDomInjections();var t=e(this.container).find("table");if(i.applyStyle("table",t),i.options.datatables&&e.fn.DataTable){i.options.dragRows&&(i.options.datatables.columns.push({orderable:!1,name:"dragRowsIndex",hidden:!0}),i.options.datatables.columns.push({orderable:!1,name:"dragRowsDraggable"}));for(var a in i.schema.items.properties)i.options.datatables.columns.push({orderable:!0,orderDataType:"alpaca"});i.options.showActionsColumn&&i.options.datatables.columns.push({orderable:!1,name:"actions"}),i.options.dragRows&&(i.options.datatables.rowReorder={selector:"tr td.alpaca-table-reorder-draggable-cell",dataSrc:0,snapX:!0,update:!0}),i.off("ready"),i.on("ready",function(){i._dt&&(i._dt.destroy(),i._dt=void 0);var t=e(i.container).find("table");i._dt=e(t).DataTable(i.options.datatables),i._dt.on("row-reorder",function(e,t,n){i._dt._disableAlpacaHandlers||t.length>0&&t[0].oldPosition!==t[0].newPosition&&(i._dt._disableAlpacaHandlers=!0,i.moveItem(t[0].oldPosition,t[0].newPosition,!1,function(){}))}),e(i.container).bind("destroyed",function(){i._dt&&(i._dt.destroy(),i._dt=void 0)}),i._dt.on("order",function(e,t,n,a){if(!i._dt._disableAlpacaHandlers){if(!i._dt._originalChildren){i._dt._originalChildren=[];for(var r=0;r<i.children.length;r++)i._dt._originalChildren.push(i.children[r])}for(var o=[],l=0;l<t.aiDisplay.length;l++){var s=t.aiDisplay[l];o.push(i._dt._originalChildren[s])}i.children=o,i._dt._disableAlpacaHandlers=!1}})})}e(t).find("thead > tr > th[data-header-id]").each(function(){var t=e(this).attr("data-header-id"),n=i.schema.items.properties[t],a=null;i.options.items.fields&&i.options.items.fields[t]&&(a=i.options.items.fields[t]),n.required||a&&a.required?i.fireCallback("tableHeaderRequired",n,a,this):i.fireCallback("tableHeaderOptional",n,a,this)}),n()}.bind(i))},cleanupDomInjections:function(){var n=function(t){var n=e(t).parent(),i=e(t).children(),a=e(t).attr("class").split(/\s+/);e.each(a,function(t,i){"alpaca-merge-up"===i||e(n).addClass(i)}),e.each(e(t)[0].attributes,function(){this.name&&0===this.name.indexOf("data-")&&e(n).attr(this.name,this.value)}),i.length>0?e(t).replaceWith(i):e(t).remove()};this.getFieldEl().find("tr > .alpaca-field").each(function(){n(this)}),this.getFieldEl().find("tr > .alpaca-container").each(function(){n(this)});var i=this.getFieldEl().find("."+t.MARKER_CLASS_ARRAY_ITEM_ACTIONBAR);i.length>0&&i.each(function(){var t=e("<td class='actionbar' nowrap='nowrap'></td>");e(this).before(t),e(t).append(this)});var a=this.getFieldEl().find(".alpaca-table-reorder-draggable-cell");a.length>0&&a.each(function(){var t=e("<td class='alpaca-table-reorder-draggable-cell'></td>");e(this).before(t),e(t).append(e(this).children()),e(this).remove()});var r=this.getFieldEl().find(".alpaca-table-reorder-index-cell");r.length>0&&r.each(function(t){var n=e("<td class='alpaca-table-reorder-index-cell'>"+t+"</td>");e(this).before(n),e(this).remove()}),this.getFieldEl().find(".alpaca-merge-up").each(function(){n(this)})},doResolveItemContainer:function(){var t=this;return e(t.container).find("table tbody")},doAfterAddItem:function(t,n){var i=this;i.data=i.getValue(),i.cleanupDomInjections();var a=i.options.datatables&&e.fn.DataTable;i.options.dragRows||a&&1===i.data.length?i.refresh(function(){n()}):n()},doAfterRemoveItem:function(t,n){var i=this;i.data=i.getValue(),i.cleanupDomInjections();var a=i.options.datatables&&e.fn.DataTable;
i.options.dragRows||a&&0===i.data.length?(i.refresh(function(){n()}),n()):n()},getType:function(){return"array"},getTitle:function(){return"Table Field"},getDescription:function(){return"Renders array items into a table"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{datatables:{title:"DataTables Configuration",description:"Optional configuration to be passed to the underlying DataTables Plugin.",type:"object"},showActionsColumn:{title:"Show Actions Column","default":!0,description:"Whether to show or hide the actions column.",type:"boolean"},dragRows:{title:"Drag Rows","default":!1,description:"Whether to enable the dragging of rows via a draggable column. This requires DataTables and the DataTables Row Reorder Plugin.",type:"boolean"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{datatables:{type:"object"},showActionsColumn:{type:"checkbox"},dragRows:{type:"checkbox"}}})}}),t.registerFieldClass("table",t.Fields.TableField)}(jQuery),function(e){var t=e.alpaca;t.Fields.TableRowField=t.Fields.ObjectField.extend({prepareContainerModel:function(e){var t=this;this.base(function(n){n.options.showActionsColumn=t.parent.options.showActionsColumn,n.options.dragRows=t.parent.options.dragRows;for(var i=0;i<n.items.length;i++)"hidden"===n.items[i].options.type&&(n.items[i].hidden=!0);e(n)})},getFieldType:function(){return"tablerow"},getType:function(){return"object"},getTitle:function(){return"Table Row Field"},getDescription:function(){return"Renders object items into a table row"}}),t.registerFieldClass("tablerow",t.Fields.TableRowField)}(jQuery),function(e){var t=e.alpaca;t.Fields.TagField=t.Fields.LowerCaseField.extend({getFieldType:function(){return"tag"},setup:function(){this.base(),this.options.separator||(this.options.separator=",")},getControlValue:function(){var e=this.base();return""===e?[]:e.split(this.options.separator)},setValue:function(e){return""!==e?e?void this.base(e.join(this.options.separator)):this.base(""):void 0},onBlur:function(t){this.base(t);var n=this.getValue(),i=[];e.each(n,function(e,t){""!==t.trim()&&i.push(t.trim())}),this.setValue(i)},getTitle:function(){return"Tag Field"},getDescription:function(){return"Text field for entering list of tags separated by delimiter."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{separator:{title:"Separator",description:"Separator used to split tags.",type:"string","default":","}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{separator:{type:"text"}}})}}),t.registerFieldClass("tag",t.Fields.TagField)}(jQuery),function(e){var t=e.alpaca;t.Fields.TimeField=t.Fields.DateField.extend({getFieldType:function(){return"time"},getDefaultFormat:function(){return"h:mm:ss a"},setup:function(){this.base()},getTitle:function(){return"Time Field"},getDescription:function(){return"Time Field"}}),t.registerMessages({invalidTime:"Invalid time"}),t.registerFieldClass("time",t.Fields.TimeField),t.registerDefaultFormatFieldMapping("time","time")}(jQuery),function(e){var t=e.alpaca;t.Fields.TinyMCEField=t.Fields.TextAreaField.extend({getFieldType:function(){return"tinymce"},setup:function(){var e=this;this.data||(this.data=""),e.options.toolbar||(e.options.toolbar="insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image"),this.base()},setValue:function(e){var t=this;this.base(e),t.editor&&t.editor.setContent(e)},getControlValue:function(){var e=this,t=null;return e.editor&&(t=e.editor.getContent()),t},initTinyMCEEvents:function(){var e=this;e.editor&&(e.editor.on("click",function(t){e.onClick.call(e,t),e.trigger("click",t)}),e.editor.on("change",function(t){e.onChange(),e.triggerWithPropagation("change",t)}),e.editor.on("blur",function(t){e.onBlur(),e.trigger("blur",t)}),e.editor.on("focus",function(t){e.onFocus.call(e,t),e.trigger("focus",t)}),e.editor.on("keypress",function(t){e.onKeyPress.call(e,t),e.trigger("keypress",t)}),e.editor.on("keyup",function(t){e.onKeyUp.call(e,t),e.trigger("keyup",t)}),e.editor.on("keydown",function(t){e.onKeyDown.call(e,t),e.trigger("keydown",t)}))},afterRenderControl:function(t,n){var i=this;this.base(t,function(){!i.isDisplayOnly()&&i.control&&"undefined"!=typeof tinyMCE&&i.on("ready",function(){if(!i.editor){var t=e(i.control)[0].id;tinyMCE.init({init_instance_callback:function(e){i.editor=e,i.initTinyMCEEvents()},selector:"#"+t,toolbar:i.options.toolbar})}}),n()})},destroy:function(){var e=this;e.editor&&(e.editor.remove(),e.editor=null),this.base()},getTitle:function(){return"TinyMCE Editor"},getDescription:function(){return"Provides an instance of a TinyMCE control for use in editing HTML."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{toolbar:{title:"TinyMCE toolbar options",description:"Toolbar options for TinyMCE plugin.",type:"string"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{toolbar:{type:"text"}}})}}),t.registerFieldClass("tinymce",t.Fields.TinyMCEField)}(jQuery),function(e){var t=e.alpaca;t.Fields.TokenField=t.Fields.TextField.extend({getFieldType:function(){return"token"},setup:function(){this.base(),this.options.separator||(this.options.separator=","),"undefined"==typeof this.options.tokenfield&&(this.options.tokenfield={}),"undefined"==typeof this.options.tokenfield.showAutocompleteOnFocus&&(this.options.tokenfield.showAutocompleteOnFocus=!0)},getControlValue:function(){return this.base()},setValue:function(e){this.base(e)},onBlur:function(e){this.base(e)},afterRenderControl:function(t,n){var i=this;this.base(t,function(){!i.isDisplayOnly()&&i.control&&"undefined"!=typeof e.fn.tokenfield&&i.on("ready",function(){e(i.control).tokenfield(i.options.tokenfield)}),n()})},getTitle:function(){return"Token Field"},getDescription:function(){return"Token field for entering list of tokens separated by delimiter."},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{separator:{title:"Separator",description:"Separator used to split tokens.",type:"string","default":","},tokenfield:{title:"Token Field options",description:"Settings to pass into the underlying bootstrap-tokenfield control",type:"object","default":void 0}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{separator:{type:"text"}}})}}),t.registerFieldClass("token",t.Fields.TokenField)}(jQuery),function(e){var t=e.alpaca;t.Fields.UploadField=t.Fields.TextField.extend({constructor:function(n,i,a,r,o,l){var s=this;this.base(n,i,a,r,o,l),this.wrapTemplate=function(n){return function(i){for(var a=i.files,r=i.formatFileSize,o=i.options,l=[],u=0;u<a.length;u++){var c={};c.options=s.options,c.file=t.cloneObject(a[u]),c.size=r(c.size),c.buttons=s.options.buttons,c.view=s.view,c.fileIndex=u;var d=t.tmpl(s.view.getTemplateDescriptor(n),c,s);l.push(d[0])}return l=e(l),e(l).each(function(){o.fileupload&&o.fileupload.autoUpload&&e(this).find("button.start").css("display","none"),s.handleWrapRow(this,o);var t=e(this);e(this).find("button.delete").on("click",function(){var n=e(t).find("button.delete"),i=e(n).attr("data-file-index"),r=a[i];s.onFileDelete.call(s,t,n,r),s.triggerWithPropagation("change"),setTimeout(function(){s.refreshUIState()},200)})}),e(l)}}},getFieldType:function(){return"upload"},setup:function(){var e=this;this.base(),e.options.renderButtons=!1,e.options.buttons||(e.options.buttons=[]),e.options.hideDeleteButton||e.options.buttons.push({key:"delete",isDelete:!0}),"undefined"==typeof e.options.multiple&&(e.options.multiple=!1),"undefined"==typeof e.options.showUploadPreview&&(e.options.showUploadPreview=!0),"undefined"==typeof e.options.showHeaders&&(e.options.showHeaders=!0),e.data||(e.data=[]),e.options.upload||(e.options.upload={}),"undefined"==typeof e.options.maxNumberOfFiles&&(e.options.upload.maxNumberOfFiles?(e.options.maxNumberOfFiles=e.options.upload.maxNumberOfFiles,1===e.options.maxNumberOfFiles?e.options.multiple=!1:e.options.maxNumberOfFiles>1&&(e.options.multiple=!0)):(e.options.maxNumberOfFiles=1,"boolean"==typeof e.options.multiple&&e.options.multiple&&(e.options.maxNumberOfFiles=-1)),e.options.maxNumberOfFiles&&(e.options.upload.maxNumberOfFiles=e.options.maxNumberOfFiles)),"undefined"==typeof e.options.maxFileSize&&(e.options.upload.maxFileSize?e.options.maxFileSize=e.options.upload.maxFileSize:e.options.maxFileSize=-1,e.options.maxFileSize&&(e.options.upload.maxFileSize=e.options.maxFileSize)),"undefined"==typeof e.options.fileTypes&&(e.options.upload.acceptFileTypes?e.options.fileTypes=e.options.upload.acceptFileTypes:e.options.fileTypes=null,e.options.fileTypes&&(e.options.upload.acceptFileTypes=e.options.fileTypes)),e.options.errorHandler||(e.options.errorHandler=function(e){alert(e.join("\n"))});var n=e.determineCsrfToken();n&&(e.options.upload||(e.options.upload={}),e.options.upload.headers||(e.options.upload.headers={}),e.options.upload.headers[t.CSRF_HEADER_NAME]=n)},determineCsrfToken:function(){var e=t.CSRF_TOKEN;if(!e)for(var n=0;n<t.CSRF_COOKIE_NAMES.length;n++){var i=t.CSRF_COOKIE_NAMES[n],a=t.readCookie(i);if(a){e=a;break}}return e},prepareControlModel:function(e){var t=this;t.base(function(n){n.chooseButtonLabel=t.options.chooseButtonLabel,n.chooseButtonLabel||(n.chooseButtonLabel=t.getMessage("chooseFiles"),1===t.options.maxNumberOfFiles&&(n.chooseButtonLabel=t.getMessage("chooseFile"))),n.dropZoneMessage=t.options.dropZoneMessage,n.dropZoneMessage||(n.dropZoneMessage=t.getMessage("dropZoneSingle"),1===n.maxNumberOfFiles&&(n.dropZoneMessage=t.getMessage("dropZoneMultiple"))),e(n)})},afterRenderControl:function(t,n){var i=this;this.base(t,function(){i.handlePostRender(function(){i.isDisplayOnly()&&(e(i.control).find("button").hide(),e(i.control).find(".btn").hide(),e(i.control).find(".alpaca-fileupload-chooserow").hide(),e(i.control).find(".dropzone-message").hide()),n()})})},getUploadTemplate:function(){return this.wrapTemplate("control-upload-partial-upload")},getDownloadTemplate:function(){return this.wrapTemplate("control-upload-partial-download")},handlePostRender:function(t){var n=this,i=this.control,a={};if(a.dataType="json",a.uploadTemplateId=null,a.uploadTemplate=this.getUploadTemplate(),a.downloadTemplateId=null,a.downloadTemplate=this.getDownloadTemplate(),a.filesContainer=e(i).find(".files"),a.dropZone=e(i).find(".fileupload-active-zone"),a.url="/",a.method="post",a.showUploadPreview=n.options.showUploadPreview,n.options.upload)for(var r in n.options.upload)a[r]=n.options.upload[r];n.options.multiple&&(e(i).find(".alpaca-fileupload-input").attr("multiple",!0),e(i).find(".alpaca-fileupload-input").attr("name",n.name+"_files[]")),e(i).find(".progress").css("display","none"),a.progressall=function(t,n){var a=!1;if(n.loaded<n.total&&(a=!0),a){e(i).find(".progress").css("display","block");var r=parseInt(n.loaded/n.total*100,10);e("#progress .progress-bar").css("width",r+"%")}else e(i).find(".progress").css("display","none")},a.add=function(e,t){var i=[],a=0;do{var r=!1;if(a<t.originalFiles.length){if(n.options.fileTypes){var o=n.options.fileTypes;"string"==typeof n.options.fileTypes&&(o=new RegExp(n.options.fileTypes)),o.test(t.originalFiles[a].type)||(i.push("Not an accepted file type: "+t.originalFiles[a].type),r=!0)}n.options.maxFileSize>-1&&t.originalFiles[a].size>n.options.maxFileSize&&(i.push("Filesize is too big: "+t.originalFiles[a].size),r=!0)}r?a++:a++}while(a<t.originalFiles.length);i.length>0?n.options.errorHandler(i):t.submit()},n.applyConfiguration(a);var o=n.fileUpload=e(i).find(".alpaca-fileupload-input").fileupload(a);o.bindFirst("fileuploaddone",function(e,t){var i=n.options.enhanceFiles;i?i(a,t):n.enhanceFiles(a,t),t.files=t.result.files,setTimeout(function(){n.refreshUIState()},250)}),o.bindFirst("fileuploadsubmit",function(t,i){n.options.properties&&e.each(i.files,function(e,t){for(var a in n.options.properties){var r="property"+e+"__"+a,o=n.options.properties[a];o=n.applyTokenSubstitutions(o,e,t),i.formData||(i.formData={}),i.formData[r]=o}}),n.options.parameters&&e.each(i.files,function(e,t){for(var a in n.options.parameters){var r="param"+e+"__"+a,o=n.options.parameters[a];o=n.applyTokenSubstitutions(o,e,t),i.formData||(i.formData={}),i.formData[r]=o}})}),o.bind("fileuploaddone",function(e,t){var i=n.getValue(),a=function(e){return e===t.files.length?void n.setValue(i):void n.convertFileToDescriptor(t.files[e],function(t,n){n&&i.push(n),a(e+1)})};a(0)}),o.bind("fileuploadfail",function(e,t){t.errorThrown&&n.onUploadFail(t)}),o.bind("fileuploadalways",function(e,t){n.refreshUIState()}),n.applyBindings(o,i),n.preload(o,i,function(a){if(a){var r=e(n.control).find(".alpaca-fileupload-input");e(r).fileupload("option","done").call(r,e.Event("done"),{result:{files:a}}),n.afterPreload(o,i,a,function(){t()})}else t()}),"undefined"!=typeof document&&e(document).bind("drop dragover",function(e){e.preventDefault()})},handleWrapRow:function(e,t){},applyTokenSubstitutions:function(e,t,n){var i={index:t,name:n.name,size:n.size,url:n.url,thumbnailUrl:n.thumbnailUrl},a=-1,r=0;do if(a=e.indexOf("{",r),a>-1){var o=e.indexOf("}",a);if(o>-1){var l=e.substring(a+car.length,o),s=i[l];s&&(e=e.substring(0,a)+s+e.substring(o+1)),r=o+1}}while(a>-1);return e},removeValue:function(e){for(var t=this,n=t.getValue(),i=0;i<n.length;i++)if(n[i].id==e){n.splice(i,1);break}t.setValue(n)},applyConfiguration:function(e){},applyBindings:function(e){},convertFileToDescriptor:function(e,t){var n={id:e.id,name:e.name,size:e.size,url:e.url,thumbnailUrl:e.thumbnailUrl,deleteUrl:e.deleteUrl,deleteType:e.deleteType};t(null,n)},convertDescriptorToFile:function(e,t){var n={id:e.id,name:e.name,size:e.size,url:e.url,thumbnailUrl:e.thumbnailUrl,deleteUrl:e.deleteUrl,deleteType:e.deleteType};t(null,n)},enhanceFiles:function(e,t){},preload:function(e,t,n){var i=this,a=[],r=i.getValue(),o=function(e){return e==r.length?void n(a):void i.convertDescriptorToFile(r[e],function(t,n){n&&a.push(n),o(e+1)})};o(0)},afterPreload:function(e,t,n,i){var a=this;a.refreshUIState(),i()},getControlValue:function(){return this.data},setValue:function(e){e||(e=[]),this.data=e,this.updateObservable(),this.triggerUpdate()},reload:function(t){var n=this,i=this.getValue(),a=[],r=function(o){if(o===i.length){var l=e(n.control).find(".alpaca-fileupload-input");return e(l).fileupload("option","done").call(l,e.Event("done"),{result:{files:a}}),n.refreshValidationState(),void t()}n.convertDescriptorToFile(i[o],function(e,t){t&&a.push(t),r(o+1)})};r(0)},plugin:function(){var t=this;return e(t.control).find(".alpaca-fileupload-input").data().blueimpFileupload},refreshUIState:function(){var e=this,t=e.plugin();if(t){var n=e.options.maxNumberOfFiles;t.options.getNumberOfFiles&&t.options.getNumberOfFiles()>=n?e.refreshButtons(!1):e.refreshButtons(!0)}},refreshButtons:function(t){var n=this;e(n.control).find(".btn.fileinput-button").prop("disabled",!0),e(n.control).find(".btn.fileinput-button").attr("disabled","disabled"),e(n.control).find(".fileupload-active-zone p.dropzone-message").css("display","none"),t&&(e(n.control).find(".btn.fileinput-button").prop("disabled",!1),e(n.control).find(".btn.fileinput-button").attr("disabled",null),e(n.control).find(".fileupload-active-zone p.dropzone-message").css("display","block"))},onFileDelete:function(n,i,a){var r=this,o=a.deleteUrl,l=a.deleteType,s={method:l,url:o,headers:{}},u=r.determineCsrfToken();u&&(s.headers[t.CSRF_HEADER_NAME]=u),e.ajax(s)},onUploadFail:function(e){for(var t=this,n=0;n<e.files.length;n++)e.files[n].error=e.errorThrown;t.options.uploadFailHandler&&t.options.uploadFailHandler.call(t,e)},disable:function(){e(this.field).find(".fileinput-button").prop("disabled",!0),e(this.field).find(".fileinput-button").attr("disabled","disabled"),e(this.field).find(".alpaca-fileupload-well").css("visibility","hidden")},enable:function(){e(this.field).find(".fileinput-button").prop("disabled",!1),e(this.field).find(".fileinput-button").removeAttr("disabled"),e(this.field).find(".alpaca-fileupload-well").css("visibility","visible")},getTitle:function(){return"Upload Field"},getDescription:function(){return"Provides an upload field with support for thumbnail preview"},getType:function(){return"array"},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{maxNumberOfFiles:{title:"Maximum Number of Files",description:"The maximum number of files to allow to be uploaded. If greater than zero, the maximum number will be constrained. If -1, then no limit is imposed.",type:"number","default":1},maxFileSize:{title:"Maximum File Size (in bytes)",description:"The maximum file size allowed per upload. If greater than zero, the maximum file size will be limited to the given size in bytes. If -1, then no limit is imposed.",type:"number","default":-1},fileTypes:{title:"File Types",description:"A regular expression limiting the file types that can be uploaded based on filename",type:"string"},multiple:{title:"Multiple",description:"Whether to allow multiple file uploads. If maxNumberOfFiles is not specified, multiple will toggle between 1 and unlimited.",type:"boolean","default":!1},showUploadPreview:{title:"Show Upload Preview",description:"Whether to show thumbnails for uploaded assets (requires preview support)",type:"boolean","default":!0},errorHandler:{title:"Error Handler",description:"Optional function handler to be called when there is an error uploading one or more files. This handler is typically used to instantiate a modal or other UI element to inform the end user.",type:"function"},uploadFailHandler:{title:"Upload Fail Handler",description:"Optional function handler to be called when one or more files fails to upload. This function is responsible for parsing the underlying xHR request and populating the error message state.",type:"function"}}})}}),t.registerFieldClass("upload",t.Fields.UploadField),t.registerMessages({chooseFile:"Choose file...",chooseFiles:"Choose files...",dropZoneSingle:"Click the Choose button or Drag and Drop a file here to upload...",dropZoneMultiple:"Click the Choose button or Drag and Drop files here to upload..."}),function(e){function t(t){return l?t.data("events"):e._data(t[0]).events}function n(e,n,i){var a=t(e),r=a[n];if(!l){var o=i?r.splice(r.delegateCount-1,1)[0]:r.pop();return void r.splice(i?0:r.delegateCount||0,0,o)}i?a.live.unshift(a.live.pop()):r.unshift(r.pop())}function i(t,i,a){var r=i.split(/\s+/);t.each(function(){for(var t=0;t<r.length;++t){var i=e.trim(r[t]).match(/[^\.]+/i)[0];n(e(this),i,a)}})}var a=e.fn.jquery.split("."),r=parseInt(a[0]),o=parseInt(a[1]),l=1>r||1===r&&7>o;e.fn.bindFirst=function(){var t=e.makeArray(arguments),n=t.shift();return n&&(e.fn.bind.apply(this,arguments),i(this,n)),this}}(e)}(jQuery),function(e){var t=e.alpaca;t.Fields.UpperCaseField=t.Fields.TextField.extend({getFieldType:function(){return"uppercase"},setup:function(){this.base(),this.data&&(this.data=this.data.toUpperCase())},setValue:function(e){if(!e)return this.base(e);var n=null;e&&t.isString(e)&&(n=e.toUpperCase()),n!=this.getValue()&&this.base(n)},onKeyPress:function(e){this.base(e);var n=this;t.later(25,this,function(){var e=n.getValue();n.setValue(e)})},getTitle:function(){return"Uppercase Text"},getDescription:function(){return"Text field for uppercase text."}}),t.registerFieldClass("uppercase",t.Fields.UpperCaseField),t.registerDefaultFormatFieldMapping("uppercase","uppercase")}(jQuery),function(e){var t=e.alpaca;t.Fields.URLField=t.Fields.TextField.extend({getFieldType:function(){return"url"},setup:function(){this.inputType="url",this.base(),"undefined"==typeof this.options.allowIntranet&&(this.options.allowIntranet=!1),this.options.allowIntranet?this.schema.pattern=t.regexps["intranet-url"]:this.schema.pattern=t.regexps.url,this.schema.format="uri"},handleValidate:function(){var e=this.base(),t=this.validation;return t.invalidPattern.status||(t.invalidPattern.message=this.getMessage("invalidURLFormat")),e},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{allowIntranet:{title:"Allow intranet",description:"Allows URLs with unqualified hostnames"}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{allowIntranet:{type:"checkbox"}}})},getTitle:function(){return"URL Field"},getDescription:function(){return"Provides a text control with validation for an internet web address."}}),t.registerMessages({invalidURLFormat:"The URL provided is not a valid web address."}),t.registerFieldClass("url",t.Fields.URLField),t.registerDefaultFormatFieldMapping("url","url")}(jQuery),function(e){var t=e.alpaca;t.Fields.ZipcodeField=t.Fields.TextField.extend({getFieldType:function(){return"zipcode"},setup:function(){this.base(),this.options.format=this.options.format?this.options.format:"nine","nine"===this.options.format?this.schema.pattern=t.regexps["zipcode-nine"]:"five"===this.options.format?this.schema.pattern=t.regexps["zipcode-five"]:(t.logError("The configured zipcode format: "+this.options.format+" is not a legal value [five, nine]"),this.options.format="nine",this.schema.pattern=t.regexps["zipcode-nine"]),"nine"===this.options.format?this.options.maskString="99999-9999":"five"===this.options.format&&(this.options.maskString="99999")},handleValidate:function(){var e=this.base(),t=this.validation;return t.invalidPattern.status||("nine"===this.options.format?t.invalidPattern.message=this.getMessage("invalidZipcodeFormatNine"):"five"===this.options.format&&(t.invalidPattern.message=this.getMessage("invalidZipcodeFormatFive"))),e},getSchemaOfOptions:function(){return t.merge(this.base(),{properties:{format:{title:"Format",description:"How to represent the zipcode field",type:"string","default":"five","enum":["five","nine"],readonly:!0}}})},getOptionsForOptions:function(){return t.merge(this.base(),{fields:{format:{type:"text"}}})},getTitle:function(){return"Zipcode Field"},getDescription:function(){return"Provides a five or nine-digital US zipcode control with validation."}}),t.registerMessages({invalidZipcodeFormatFive:"Invalid Five-Digit Zipcode (#####)",invalidZipcodeFormatNine:"Invalid Nine-Digit Zipcode (#####-####)"}),t.registerFieldClass("zipcode",t.Fields.ZipcodeField),t.registerDefaultFormatFieldMapping("zipcode","zipcode")}(jQuery),function(e){var t=e.alpaca;t.registerView({id:"base",title:"Abstract base view",messages:{countries:{afg:"Afghanistan",ala:"Aland Islands",alb:"Albania",dza:"Algeria",asm:"American Samoa",and:"Andorra",ago:"Angola",aia:"Anguilla",ata:"Antarctica",atg:"Antigua and Barbuda",arg:"Argentina",arm:"Armenia",abw:"Aruba",aus:"Australia",aut:"Austria",aze:"Azerbaijan",bhs:"Bahamas",bhr:"Bahrain",bgd:"Bangladesh",brb:"Barbados",blr:"Belarus",bel:"Belgium",blz:"Belize",ben:"Benin",bmu:"Bermuda",btn:"Bhutan",bol:"Bolivia",bih:"Bosnia and Herzegovina",bwa:"Botswana",bvt:"Bouvet Island",bra:"Brazil",iot:"British Indian Ocean Territory",brn:"Brunei Darussalam",bgr:"Bulgaria",bfa:"Burkina Faso",bdi:"Burundi",khm:"Cambodia",cmr:"Cameroon",can:"Canada",cpv:"Cape Verde",cym:"Cayman Islands",caf:"Central African Republic",tcd:"Chad",chl:"Chile",chn:"China",cxr:"Christmas Island",cck:"Cocos (Keeling), Islands",col:"Colombia",com:"Comoros",cog:"Congo",cod:"Congo, the Democratic Republic of the",cok:"Cook Islands",cri:"Costa Rica",hrv:"Croatia",cub:"Cuba",cyp:"Cyprus",cze:"Czech Republic",civ:"Cote d'Ivoire",dnk:"Denmark",dji:"Djibouti",dma:"Dominica",dom:"Dominican Republic",ecu:"Ecuador",egy:"Egypt",slv:"El Salvador",gnq:"Equatorial Guinea",eri:"Eritrea",est:"Estonia",eth:"Ethiopia",flk:"Falkland Islands (Malvinas),",fro:"Faroe Islands",fji:"Fiji",fin:"Finland",fra:"France",guf:"French Guiana",pyf:"French Polynesia",atf:"French Southern Territories",gab:"Gabon",gmb:"Gambia",geo:"Georgia",deu:"Germany",gha:"Ghana",gib:"Gibraltar",grc:"Greece",grl:"Greenland",grd:"Grenada",glp:"Guadeloupe",gum:"Guam",gtm:"Guatemala",ggy:"Guernsey",gin:"Guinea",gnb:"Guinea-Bissau",guy:"Guyana",hti:"Haiti",hmd:"Heard Island and McDonald Islands",vat:"Holy See (Vatican City State),",hnd:"Honduras",hkg:"Hong Kong",hun:"Hungary",isl:"Iceland",ind:"India",idn:"Indonesia",irn:"Iran, Islamic Republic of",irq:"Iraq",irl:"Ireland",imn:"Isle of Man",isr:"Israel",ita:"Italy",jam:"Jamaica",jpn:"Japan",jey:"Jersey",jor:"Jordan",kaz:"Kazakhstan",ken:"Kenya",kir:"Kiribati",prk:"Korea, Democratic People's Republic of",kor:"Korea, Republic of",kwt:"Kuwait",kgz:"Kyrgyzstan",lao:"Lao People's Democratic Republic",lva:"Latvia",lbn:"Lebanon",lso:"Lesotho",lbr:"Liberia",lby:"Libyan Arab Jamahiriya",lie:"Liechtenstein",ltu:"Lithuania",lux:"Luxembourg",mac:"Macao",mkd:"Macedonia, the former Yugoslav Republic of",mdg:"Madagascar",mwi:"Malawi",mys:"Malaysia",mdv:"Maldives",mli:"Mali",mlt:"Malta",mhl:"Marshall Islands",mtq:"Martinique",mrt:"Mauritania",mus:"Mauritius",myt:"Mayotte",mex:"Mexico",fsm:"Micronesia, Federated States of",mda:"Moldova, Republic of",mco:"Monaco",mng:"Mongolia",mne:"Montenegro",msr:"Montserrat",mar:"Morocco",moz:"Mozambique",mmr:"Myanmar",nam:"Namibia",nru:"Nauru",npl:"Nepal",nld:"Netherlands",ant:"Netherlands Antilles",ncl:"New Caledonia",nzl:"New Zealand",nic:"Nicaragua",ner:"Niger",nga:"Nigeria",niu:"Niue",nfk:"Norfolk Island",mnp:"Northern Mariana Islands",nor:"Norway",omn:"Oman",pak:"Pakistan",plw:"Palau",pse:"Palestinian Territory, Occupied",pan:"Panama",png:"Papua New Guinea",pry:"Paraguay",per:"Peru",phl:"Philippines",pcn:"Pitcairn",pol:"Poland",prt:"Portugal",pri:"Puerto Rico",qat:"Qatar",rou:"Romania",rus:"Russian Federation",rwa:"Rwanda",reu:"Reunion",blm:"Saint Barthelemy",shn:"Saint Helena",kna:"Saint Kitts and Nevis",lca:"Saint Lucia",maf:"Saint Martin (French part)",spm:"Saint Pierre and Miquelon",vct:"Saint Vincent and the Grenadines",wsm:"Samoa",smr:"San Marino",stp:"Sao Tome and Principe",sau:"Saudi Arabia",sen:"Senegal",srb:"Serbia",syc:"Seychelles",sle:"Sierra Leone",sgp:"Singapore",svk:"Slovakia",svn:"Slovenia",slb:"Solomon Islands",som:"Somalia",zaf:"South Africa",sgs:"South Georgia and the South Sandwich Islands",esp:"Spain",lka:"Sri Lanka",sdn:"Sudan",sur:"Suriname",sjm:"Svalbard and Jan Mayen",swz:"Swaziland",swe:"Sweden",che:"Switzerland",syr:"Syrian Arab Republic",twn:"Taiwan, Province of China",tjk:"Tajikistan",tza:"Tanzania, United Republic of",tha:"Thailand",tls:"Timor-Leste",tgo:"Togo",tkl:"Tokelau",ton:"Tonga",tto:"Trinidad and Tobago",tun:"Tunisia",tur:"Turkey",tkm:"Turkmenistan",tca:"Turks and Caicos Islands",tuv:"Tuvalu",uga:"Uganda",ukr:"Ukraine",are:"United Arab Emirates",gbr:"United Kingdom",usa:"United States",umi:"United States Minor Outlying Islands",ury:"Uruguay",uzb:"Uzbekistan",vut:"Vanuatu",ven:"Venezuela",vnm:"Viet Nam",vgb:"Virgin Islands, British",vir:"Virgin Islands, U.S.",wlf:"Wallis and Futuna",esh:"Western Sahara",yem:"Yemen",zmb:"Zambia",zwe:"Zimbabwe"},empty:"",required:"This field is required",valid:"",invalid:"This field is invalid",months:["January","February","March","April","May","June","July","August","September","October","November","December"],timeUnits:{SECOND:"seconds",MINUTE:"minutes",HOUR:"hours",DAY:"days",MONTH:"months",YEAR:"years"}}})}(jQuery),function(e){var t=e.alpaca;t.registerView({id:"base",messages:{cs_CZ:{required:"Toto pole je vyžadováno",invalid:"Toto pole je neplatné",months:["Leden","Únor","Březen","Duben","Květen","Červen","Červenec","Srpen","Září","Říjen","Listopad","Prosinec"],timeUnits:{SECOND:"sekundy",MINUTE:"minuty",HOUR:"hodiny",DAY:"dny",MONTH:"měsíce",YEAR:"roky"},invalidValueOfEnum:"Toto pole musí obsahovat jednu hodnotu z {0}. Aktuální hodnota je: {1}",notOptional:"Toto pole není volitelné",disallowValue:"{0} jsou zakázané hodnoty.",notEnoughItems:"Minimální počet položek je {0}",tooManyItems:"Maximální počet položek je {0}",valueNotUnique:"Hodnoty nejsou unikátní",notAnArray:"Tato hodnota není pole",addItemButtonLabel:"Přidat novou položku",addButtonLabel:"Přidat",removeButtonLabel:"Odebrat",upButtonLabel:"Nahoru",downButtonLabel:"Dolů",noneLabel:"Žádný",stringValueTooSmall:"Minimální hodnota tohoto pole je {0}",stringValueTooLarge:"Maximální hodnota tohoto pole je {0}",stringValueTooSmallExclusive:"Hodnota tohoto pole musí být větší než {0}",stringValueTooLargeExclusive:"Hodnota tohoto pole musí být menší než {0}",stringDivisibleBy:"Hodnota musí být dělitelná {0}",stringNotANumber:"Hodnota není číslo.",stringValueNotMultipleOf:"Číslo není násobkem {0}",tooManyProperties:"Maximální počet vlastností ({0}) byl překročen.",tooFewProperties:"Není dostatek vlastností (je požadováno {0})",wordLimitExceeded:"Maximální počet slov ({0}) byl překročen.",invalidPattern:"Toto pole má mít vzor {0}",stringTooShort:"Toto pole musí obsahovat nejmeně {0} znaků",stringTooLong:"Toto pole musí obsahovat maximálně {0} znaků",invalidDate:"Nesprávné datum pro formát {0}",editorAnnotationsExist:"Editor má v sobě chyby, které musí být opraveny",invalidEmail:"Chybná e-mailová adresa, př.: [email protected]",stringNotAnInteger:"Tato hodnota není číslo.",invalidIPv4:"Chybná IPv4 adresa, ex: 192.168.0.1",stringNotAJSON:"Tato hodnota není platný JSON text.",keyMissing:"Mapa obsahuje prázdný klíč.",keyNotUnique:"Klíče nejsou jedinečné.",invalidPassword:"Špatné heslo",invalidPhone:"Špatné telefonní číslo, př.: (123) 456-9999",chooseFile:"Vyberte soubor...",chooseFiles:"Vyberte soubory...",dropZoneSingle:"Vyberte soubor nebo jej přetáhněte sem pro nahrání...",dropZoneMultiple:"Vyberte soubory nebo je přetáhněte sem pro nahrání...",invalidURLFormat:"Uvedená URL není platna webová adresa.",invalidZipcodeFormatFive:"Chybné poštovní směrovací číslo (#####)",invalidZipcodeFormatNine:"Chybné devíti-místné poštovní směrovací číslo (#####-####)"}}})}(jQuery),function(e){var t=e.alpaca;t.registerView({id:"base",messages:{de_AT:{required:"Eingabe erforderlich",invalid:"Eingabe invalid",months:["Jänner","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],timeUnits:{SECOND:"Sekunden",MINUTE:"Minuten",HOUR:"Stunden",DAY:"Tage",MONTH:"Monate",YEAR:"Jahre"},notOptional:"Dieses Feld ist nicht optional",disallowValue:"Diese Werte sind nicht erlaubt: {0}",invalidValueOfEnum:"Diese Feld sollte einen der folgenden Werte enthalten: {0}. [{1}]",notEnoughItems:"Die Mindestanzahl von Elementen ist {0}",tooManyItems:"Die Maximalanzahl von Elementen ist {0}",valueNotUnique:"Diese Werte sind nicht eindeutig",notAnArray:"Keine Liste von Werten",invalidDate:"Falsches Datumsformat: {0}",invalidEmail:"Ungültige e-Mail Adresse, z.B.: [email protected]",stringNotAnInteger:"Eingabe ist keine Ganz Zahl.",invalidIPv4:"Ungültige IPv4 Adresse, z.B.: 192.168.0.1",stringValueTooSmall:"Die Mindestanzahl von Zeichen ist {0}",stringValueTooLarge:"Die Maximalanzahl von Zeichen ist {0}",stringValueTooSmallExclusive:"Die Anzahl der Zeichen muss größer sein als {0}",stringValueTooLargeExclusive:"Die Anzahl der Zeichen muss kleiner sein als {0}",stringDivisibleBy:"Der Wert muss durch {0} dividierbar sein",stringNotANumber:"Die Eingabe ist keine Zahl",invalidPassword:"Ungültiges Passwort.",invalidPhone:"Ungültige Telefonnummer, z.B.: (123) 456-9999",invalidPattern:"Diese Feld stimmt nicht mit folgender Vorgabe überein {0}",stringTooShort:"Dieses Feld sollte mindestens {0} Zeichen enthalten",stringTooLong:"Dieses Feld sollte höchstens {0} Zeichen enthalten"}}})}(jQuery),function(e){var t=e.alpaca;t.registerView({id:"base",messages:{de_DE:{required:"Eingabe erforderlich",invalid:"Eingabe ungültig",months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],timeUnits:{SECOND:"Sekunden",MINUTE:"Minuten",HOUR:"Stunden",DAY:"Tage",MONTH:"Monate",YEAR:"Jahre"},notOptional:"Dieses Feld ist nicht optional",disallowValue:"Diese Werte sind nicht erlaubt: {0}",invalidValueOfEnum:"Diese Feld sollte einen der folgenden Werte enthalten: {0}. [{1}]",notEnoughItems:"Die Mindestanzahl von Elementen ist {0}",tooManyItems:"Die Maximalanzahl von Elementen ist {0}",valueNotUnique:"Diese Werte sind nicht eindeutig",
notAnArray:"Keine Liste von Werten",invalidDate:"Falsches Datumsformat: {0}",invalidEmail:"Keine gültige E-Mail Adresse",stringNotAnInteger:"Keine Ganze Zahl",invalidIPv4:"Ungültige IPv4 Adresse",stringValueTooSmall:"Die Mindestanzahl von Zeichen ist {0}",stringValueTooLarge:"Die Maximalanzahl von Zeichen ist {0}",stringValueTooSmallExclusive:"Die Anzahl der Zeichen muss größer sein als {0}",stringValueTooLargeExclusive:"Die Anzahl der Zeichen muss kleiner sein als {0}",stringDivisibleBy:"Der Wert muss durch {0} dividierbar sein",stringNotANumber:"Die Eingabe ist keine Zahl",invalidPassword:"Ungültiges Passwort",invalidPhone:"Ungültige Telefonnummer",invalidPattern:"Diese Feld stimmt nicht mit folgender Vorgabe überein {0}",stringTooShort:"Dieses Feld sollte mindestens {0} Zeichen enthalten",stringTooLong:"Dieses Feld sollte höchstens {0} Zeichen enthalten"}}})}(jQuery),function(e){var t=e.alpaca;t.registerView({id:"base",messages:{es_ES:{required:"Este campo es obligatorio",invalid:"Este campo es inválido",months:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],timeUnits:{SECOND:"segundos",MINUTE:"minutos",HOUR:"horas",DAY:"días",MONTH:"meses",YEAR:"años"},notOptional:"Este campo no es opcional.",disallowValue:"{0} son los valores rechazados.",invalidValueOfEnum:"Este campo debe tener uno de los valores adentro {0}. [{1}]",notEnoughItems:"El número mínimo de artículos es {0}",tooManyItems:"El número máximo de artículos es {0}",valueNotUnique:"Los valores no son únicos",notAnArray:"Este valor no es un arsenal",invalidDate:"Fecha inválida para el formato {0}",invalidEmail:"Email address inválido, ex: [email protected]",stringNotAnInteger:"Este valor no es un número entero.",invalidIPv4:"Dirección inválida IPv4, ex: 192.168.0.1",stringValueTooSmall:"El valor mínimo para este campo es {0}",stringValueTooLarge:"El valor máximo para este campo es {0}",stringValueTooSmallExclusive:"El valor de este campo debe ser mayor que {0}",stringValueTooLargeExclusive:"El valor de este campo debe ser menos que {0}",stringDivisibleBy:"El valor debe ser divisible cerca {0}",stringNotANumber:"Este valor no es un número.",invalidPassword:"Contraseña inválida",invalidPhone:"Número de teléfono inválido, ex: (123) 456-9999",invalidPattern:"Este campo debe tener patrón {0}",stringTooShort:"Este campo debe contener por lo menos {0} números o caracteres",stringTooLong:"Este campo debe contener a lo más {0} números o caracteres",noneLabel:"Ninguno",addItemButtonLabel:"Añadir",addButtonLabel:"Añadir",removeButtonLabel:"Quitar",upButtonLabel:"Arriba",downButtonLabel:"Abajo"}}})}(jQuery),function(e){var t=e.alpaca;t.registerView({id:"base",messages:{fr_FR:{required:"Ce champ est requis",invalid:"Ce champ est invalide",months:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],timeUnits:{SECOND:"secondes",MINUTE:"minutes",HOUR:"heures",DAY:"jours",MONTH:"mois",YEAR:"années"},notOptional:"Ce champ n'est pas optionnel.",disallowValue:"{0} sont des valeurs interdites.",invalidValueOfEnum:"Ce champ doit prendre une des valeurs suivantes : {0}. [{1}]",notEnoughItems:"Le nombre minimum d'éléments est {0}",tooManyItems:"Le nombre maximum d'éléments est {0}",valueNotUnique:"Les valeurs sont uniques",notAnArray:"Cette valeur n'est pas une liste",invalidDate:"Cette date ne correspond pas au format {0}",invalidEmail:"Adresse de courriel invalide, ex: [email protected]",stringNotAnInteger:"Cette valeur n'est pas un nombre entier.",invalidIPv4:"Adresse IPv4 invalide, ex: 192.168.0.1",stringValueTooSmall:"La valeur minimale pour ce champ est {0}",stringValueTooLarge:"La valeur maximale pour ce champ est {0}",stringValueTooSmallExclusive:"La valeur doit-être supérieure à {0}",stringValueTooLargeExclusive:"La valeur doit-être inférieure à {0}",stringDivisibleBy:"La valeur doit-être divisible par {0}",stringNotANumber:"Cette valeur n'est pas un nombre.",invalidPassword:"Mot de passe invalide",invalidPhone:"Numéro de téléphone invalide, ex: (123) 456-9999",invalidPattern:"Ce champ doit correspondre au motif {0}",stringTooShort:"Ce champ doit contenir au moins {0} caractères",stringTooLong:"Ce champ doit contenir au plus {0} caractères"}}})}(jQuery),function(e){var t=e.alpaca;t.registerView({id:"base",messages:{hr_HR:{required:"Polje je obavezno",invalid:"Pogrešna vrijednost",months:["Siječanj","Veljača","Ožujak","Travanj","Svibanj","Lipanj","Srpanj","Kolovoz","Rujan","Listopad","Studeni","Prosinac"],timeUnits:{SECOND:"sekunda",MINUTE:"minuta",HOUR:"sati",DAY:"dan",MONTH:"mjesec",YEAR:"godina"},notOptional:"Polje nije opciono.",disallowValue:"{0} vrijednost nije dozvoljena.",invalidValueOfEnum:"Moguće vrijednosti : {0}. [{1}]",notEnoughItems:"Odaberite najmanje {0}",tooManyItems:"Odaberite najviše {0}",valueNotUnique:"Vrijednost nije jedinstvena",notAnArray:"Vrijednost nije popis",invalidDate:"Datum nije u formatu {0}",invalidEmail:"E-mail adresa nije u ispravnom formatu, npr: [email protected]",stringNotAnInteger:"Vrijednost nije cijeli broj.",invalidIPv4:"IPv4 adresa nije ispravna, npr: 192.168.0.1",stringValueTooSmall:"Vrijednost je ispod dopuštenog {0}",stringValueTooLarge:"Vrijednost je iznad dopuštenog {0}",stringValueTooSmallExclusive:"Vrijednost mora biti veća od {0}",stringValueTooLargeExclusive:"Vrijednost mora biti manja od {0}",stringDivisibleBy:"Vrijednost mora biti djeljiva sa {0}",stringNotANumber:"Vrijednost nije broj.",invalidPassword:"Neispravna lozinka",invalidPhone:"Telefon nije ispravan, npr: (123) 456-9999",invalidPattern:"Pogrešan uzorak {0}",stringTooShort:"Polje mora imati namjanje {0} znakova",stringTooLong:"Polje mora imati najviše {0} znakova"}}})}(jQuery),function(e){var t=e.alpaca;t.registerView({id:"base",messages:{it_IT:{required:"Questo campo è obbligatorio",invalid:"Questo campo è invalido",months:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],timeUnits:{SECOND:"secondi",MINUTE:"minuti",HOUR:"ore",DAY:"giorni",MONTH:"mesi",YEAR:"anni"},notOptional:"Questo campo non è opzionale",disallowValue:"{0} sono valori invalidi",invalidValueOfEnum:"Questo campo deve avere uno dei seguenti valori {0} (valore attuale: {1})",notEnoughItems:"Il numero minimo di elementi richiesti è {0}",tooManyItems:"Il numero massimo di elementi ammessi è {0}",valueNotUnique:"I valori non sono univoci",notAnArray:"Questo valore non è di tipo array",invalidDate:"Data invalida per il formato {0}",invalidEmail:"Indirizzo email invalido, si attendono valori del tipo: [email protected]",stringNotAnInteger:"Questo valore non è un numero intero",invalidIPv4:"Indirizzo IPv4 invalido, si attendono valori del tipo: 192.168.0.1",stringValueTooSmall:"Il valore minimo per questo campo è {0}",stringValueTooLarge:"Il valore massimo per questo campo è {0}",stringValueTooSmallExclusive:"Il valore di questo campo deve essere maggiore di {0}",stringValueTooLargeExclusive:"Il valore di questo campo deve essere minore di {0}",stringDivisibleBy:"Il valore di questo campo deve essere divisibile per {0}",stringNotANumber:"Questo valore non è un numero",invalidPassword:"Password invalida",invalidPhone:"Numero di telefono invalido, si attendono valori del tipo: (123) 456-9999",invalidPattern:"Questo campo deve avere la seguente struttura: {0}",stringTooShort:"Questo campo non deve contenere meno di {0} caratteri",stringTooLong:"Questo campo non deve contenere più di {0} caratteri",noneLabel:"Nessuno",addItemButtonLabel:"Aggiungi",addButtonLabel:"Aggiungi",removeButtonLabel:"Rimuovi",upButtonLabel:"Su",downButtonLabel:"Giù"}}})}(jQuery),function(e){var t=e.alpaca;t.registerView({id:"base",messages:{ja_JP:{required:"この項目は必須です",invalid:"この項目は正しい値ではありません",months:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],timeUnits:{SECOND:"秒",MINUTE:"分",HOUR:"時",DAY:"日",MONTH:"月",YEAR:"年"},notOptional:"この項目は任意の回答項目ではありません",disallowValue:"{0} は禁止されている値です",invalidValueOfEnum:"この項目は {0} の中から選ばなければなりません。現在の値は {1} です",notEnoughItems:"項目数は {0} 以上必要です",tooManyItems:"項目数は {0} 以下でなければなりません",valueNotUnique:"値が一意ではありません",notAnArray:"この項目の値が配列でありません",stringValueTooSmall:"この項目の最小値は {0} です",stringValueTooLarge:"この項目の最大値は {0} です",stringValueTooSmallExclusive:"この項目の値は {0} より小さくなければなりません",stringValueTooLargeExclusive:"この項目の値は {0} より大きくなければなりません",stringDivisibleBy:"値は {0} によって割り切れなければなりません",stringNotANumber:"この項目の値が数値ではありません",stringValueNotMultipleOf:"値が {0} の倍数ではありません",stringNotAnInteger:"この項目の値が整数ではありません",stringNotAJSON:"値が正しい JSON 形式の文字列ではありません",stringTooShort:"この項目は {0} 文字以上必要です",stringTooLong:"この項目は {0} 文字以下でなければなりません",invalidTime:"時間が正しくありません",invalidDate:"日付が {0} ではありません",invalidEmail:"メールアドレスが正しくありません。例えば [email protected] のような形式です",invalidIPv4:"IPv4 アドレスが正しくありません。例えば 192.168.0.1 のような形式です",invalidPassword:"パスワードが正しくありません",invalidPhone:"電話番号が正しくありません。例えば (123) 456-9999 のような形式です",invalidPattern:"この項目は {0} のパターンでなければなりません",invalidURLFormat:"URL が正しい形式ではありません",keyMissing:"地図が空のキーを含んでいます",keyNotUnique:"地図のキーが一意ではありません",ObjecttooFewProperties:"プロパティが足りません ({0} が必要です)",tooManyProperties:"プロパティ ({0}) の最大数を超えています",wordLimitExceeded:"{0} の単語数の制限を超えています",editorAnnotationsExist:"エディタが修正すべきエラーを報告しています",invalidZipcodeFormatFive:"5桁の Zipcode (#####) ではありません",invalidZipcodeFormatNine:"9桁の Zipcode (#####-####) ではありません"}}})}(jQuery),function(e){var t=e.alpaca;t.registerView({id:"base",messages:{nl_BE:{required:"Dit veld is verplicht",invalid:"Dit veld is ongeldig",months:["Januari","Februari","Maart","April","Mei","Juni","July","Augustus","September","Oktober","November","December"],timeUnits:{SECOND:"seconden",MINUTE:"minuten",HOUR:"uren",DAY:"dagen",MONTH:"maanden",YEAR:"jaren"},notOptional:"Dit veld is niet optioneel.",disallowValue:"{0} zijn verboden waarden.",invalidValueOfEnum:"Dit veld moet één van volgende bevatten : {0}. [{1}]",notEnoughItems:"Het minimum aantal elementen is {0}",tooManyItems:"Het maximum aantal elementen is {0}",valueNotUnique:"De waarden zijn uniek",notAnArray:"Deze waarde is geen lijst",invalidDate:"De datum komt niet overeen met formaat {0}",invalidEmail:"Ongeldig e-mailadres, vb.: [email protected]",stringNotAnInteger:"Deze waarde is geen geheel getal.",invalidIPv4:"Ongeldig IPv4 adres, vb.: 192.168.0.1",stringValueTooSmall:"De minimale waarde voor dit veld is {0}",stringValueTooLarge:"De maximale waarde voor dit veld is {0}",stringValueTooSmallExclusive:"De waarde moet groter zijn dan {0}",stringValueTooLargeExclusive:"De waarde moet kleiner zijn dan {0}",stringDivisibleBy:"De waarde moet deelbaar zijn door {0}",stringNotANumber:"Deze waarde is geen getal.",invalidPassword:"Ongeldig wachtwoord",invalidPhone:"Ongeldig telefoonnummer, vb: (123) 456-9999",invalidPattern:"Dit veld moet overeenkomen met patroon {0}",stringTooShort:"Dit veld moet minstens {0} tekens bevatten",stringTooLong:"Dit veld moet minder dan {0} tekens bevatten"}}})}(jQuery),function(e){var t=e.alpaca;t.registerView({id:"base",messages:{pl_PL:{required:"To pole jest wymagane",invalid:"To pole jest nieprawidłowe",months:["Styczeń","Luty","Marzec","Kwiecień","Maj","Czerwiec","Lipiec","Sierpień","Wrzesień","Październik","Listopad","Grudzień"],timeUnits:{SECOND:"sekundy",MINUTE:"minuty",HOUR:"godziny",DAY:"dni",MONTH:"miesiące",YEAR:"lata"},notOptional:"To pole nie jest opcjonalne",disallowValue:"Ta wartość nie jest dozwolona: {0}",invalidValueOfEnum:"To pole powinno zawierać jedną z następujących wartości: {0}. [{1}]",notEnoughItems:"Minimalna liczba elementów wynosi {0}",tooManyItems:"Maksymalna liczba elementów wynosi {0}",valueNotUnique:"Te wartości nie są unikalne",notAnArray:"Ta wartość nie jest tablicą",invalidDate:"Niepoprawny format daty: {0}",invalidEmail:"Niepoprawny adres email, n.p.: [email protected]",stringNotAnInteger:"Ta wartość nie jest liczbą całkowitą",invalidIPv4:"Niepoprawny adres IPv4, n.p.: 192.168.0.1",stringValueTooSmall:"Minimalna wartość dla tego pola wynosi {0}",stringValueTooLarge:"Maksymalna wartość dla tego pola wynosi {0}",stringValueTooSmallExclusive:"Wartość dla tego pola musi być większa niż {0}",stringValueTooLargeExclusive:"Wartość dla tego pola musi być mniejsza niż {0}",stringDivisibleBy:"Wartość musi być podzielna przez {0}",stringNotANumber:"Wartość nie jest liczbą",invalidPassword:"Niepoprawne hasło",invalidPhone:"Niepoprawny numer telefonu, n.p.: (123) 456-9999",invalidPattern:"To pole powinno mieć format {0}",stringTooShort:"To pole powinno zawierać co najmniej {0} znaków",stringTooLong:"To pole powinno zawierać najwyżej {0} znaków"}}})}(jQuery),function(e){var t=e.alpaca;t.registerView({id:"base",messages:{pt_BR:{required:"Este campo é obrigatório",invalid:"Este campo é inválido",months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],timeUnits:{SECOND:"segundos",MINUTE:"minutos",HOUR:"horas",DAY:"dias",MONTH:"meses",YEAR:"anos"},notOptional:"Este campo não é opcional.",disallowValue:"{0} são valores proibidas.",invalidValueOfEnum:"Este campo deve ter um dos seguintes valores: {0}. [{1}]",notEnoughItems:"O número mínimo de elementos é {0}",tooManyItems:"O número máximo de elementos é {0}",valueNotUnique:"Os valores não são únicos",notAnArray:"Este valor não é uma lista",invalidDate:"Esta data não tem o formato {0}",invalidEmail:"Endereço de email inválida, ex: [email protected]",stringNotAnInteger:"Este valor não é um número inteiro.",invalidIPv4:"Endereço IPv4 inválida, ex: 192.168.0.1",stringValueTooSmall:"O valor mínimo para este campo é {0}",stringValueTooLarge:"O valor máximo para este campo é {0}",stringValueTooSmallExclusive:"O valor deste campo deve ser maior que {0}",stringValueTooLargeExclusive:"O valor deste campo deve ser menor que {0}",stringDivisibleBy:"O valor deve ser divisível por {0}",stringNotANumber:"Este valor não é um número.",invalidPassword:"Senha inválida",invalidPhone:"Número de telefone inválido, ex: (123) 456-9999",invalidPattern:"Este campo deve ter o padrão {0}",stringTooShort:"Este campo deve incluir pelo menos {0} caracteres",stringTooLong:"Este campo pode incluir no máximo {0} caracteres"}}})}(jQuery),function(e){var t=e.alpaca;t.registerView({id:"base",messages:{zh_CN:{required:"此域必须",invalid:"此域不合格",months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],timeUnits:{SECOND:"秒",MINUTE:"分",HOUR:"时",DAY:"日",MONTH:"月",YEAR:"年"},notOptional:"此域非任选",disallowValue:"非法输入包括 {0}.",invalidValueOfEnum:"允许输入包括 {0}. [{1}]",notEnoughItems:"最小个数 {0}",tooManyItems:"最大个数 {0}",valueNotUnique:"输入值不独特",notAnArray:"不是数组",invalidDate:"日期格式因该是 {0}",invalidEmail:"伊妹儿格式不对, ex: [email protected]",stringNotAnInteger:"不是整数.",invalidIPv4:"不是合法IP地址, ex: 192.168.0.1",stringValueTooSmall:"最小值是 {0}",stringValueTooLarge:"最大值是 {0}",stringValueTooSmallExclusive:"值必须大于 {0}",stringValueTooLargeExclusive:"值必须小于 {0}",stringDivisibleBy:"值必须能被 {0} 整除",stringNotANumber:"不是数字.",invalidPassword:"非法密码",invalidPhone:"非法电话号码, ex: (123) 456-9999",invalidPattern:"此域须有格式 {0}",stringTooShort:"此域至少长度 {0}",stringTooLong:"此域最多长度 {0}"}}})}(jQuery),function(e){var t=e.alpaca,n={};n.field=function(){},n.control=function(){},n.container=function(){},n.form=function(){},n.required=function(){},n.optional=function(){},n.readonly=function(){},n.disabled=function(){},n.enabled=function(){},n.clearValidity=function(){},n.invalid=function(e){},n.valid=function(){},n.addMessage=function(e,t,n,i){},n.removeMessages=function(){},n.enableButton=function(e){},n.disableButton=function(e){},n.arrayToolbar=function(n){var i=this;if(n){var a=e(i.getFieldEl()).find(".alpaca-array-toolbar[data-alpaca-array-toolbar-field-id='"+i.getId()+"']");if(a.length>0){var r=e("<div class='"+t.MARKER_CLASS_ARRAY_TOOLBAR+"' "+t.MARKER_DATA_ARRAY_TOOLBAR_FIELD_ID+"='"+i.getId()+"'></div>");a.before(r),a.remove()}}else{var r=e(i.getContainerEl()).find("."+t.MARKER_CLASS_ARRAY_TOOLBAR+"["+t.MARKER_DATA_ARRAY_TOOLBAR_FIELD_ID+"='"+i.getId()+"']");if(r.length>0){var o=i.view.getTemplateDescriptor("container-array-toolbar",i);if(o){var l=t.tmpl(o,{actions:i.toolbar.actions,id:i.getId(),toolbarStyle:i.options.toolbarStyle,view:i.view});e(r).before(l),e(r).remove()}}}},n.arrayActionbars=function(n){for(var i=this,a=0;a<i.children.length;a++){var r=i.children[a],o=r.getId();if(n){var l=e(i.getFieldEl()).find(".alpaca-array-actionbar[data-alpaca-array-actionbar-field-id='"+o+"']");if(l.length>0){var s=e("<div class='"+t.MARKER_CLASS_ARRAY_ITEM_ACTIONBAR+"' "+t.MARKER_DATA_ARRAY_ITEM_KEY+"='"+r.name+"'></div>");l.before(s),l.remove()}}else{var s=e(i.getFieldEl()).find("."+t.MARKER_CLASS_ARRAY_ITEM_ACTIONBAR+"["+t.MARKER_DATA_ARRAY_ITEM_KEY+"='"+r.name+"']");if(s.length>0){var u=i.view.getTemplateDescriptor("container-array-actionbar",i);if(u){var c=t.tmpl(u,{actions:i.actionbar.actions,name:r.name,parentFieldId:i.getId(),fieldId:r.getId(),itemIndex:a,actionbarStyle:i.options.actionbarStyle,view:i.view});e(s).before(c),e(s).remove()}}}}},n.autocomplete=function(){};var i={};i.button="",i.smallButton="",i.addIcon="",i.removeIcon="",i.upIcon="",i.downIcon="",i.expandedIcon="",i.collapsedIcon="",i.table="",t.registerView({id:"web-display",parent:"base",type:"display",ui:"web",title:"Default HTML5 display view",displayReadonly:!0,templates:{},callbacks:n,styles:i,horizontal:!1}),t.registerView({id:"web-display-horizontal",parent:"web-display",horizontal:!0}),t.registerView({id:"web-edit",parent:"base",type:"edit",ui:"web",title:"Default HTML5 edit view",displayReadonly:!0,templates:{},callbacks:n,styles:i,horizontal:!1}),t.registerView({id:"web-edit-horizontal",parent:"web-edit",horizontal:!0}),t.registerView({id:"web-create",parent:"web-edit",type:"create",title:"Default HTML5 create view",displayReadonly:!1,templates:{},horizontal:!1}),t.registerView({id:"web-create-horizontal",parent:"web-create",horizontal:!0})}(jQuery),function(e){var t=e.alpaca,n={};n.button="btn btn-default",n.smallButton="btn btn-default btn-sm",n.addIcon="glyphicon glyphicon-plus-sign",n.removeIcon="glyphicon glyphicon-minus-sign",n.upIcon="glyphicon glyphicon-chevron-up",n.downIcon="glyphicon glyphicon-chevron-down",n.expandedIcon="glyphicon glyphicon-circle-arrow-down",n.collapsedIcon="glyphicon glyphicon-circle-arrow-right",n.table="table table-striped table-bordered table-hover";var i={};i.required=function(){var t=this.getFieldEl(),n=e(t).find("label.alpaca-control-label");e('<span class="alpaca-icon-required glyphicon glyphicon-star"></span>').prependTo(n)},i.invalid=function(){this.isControlField&&e(this.getFieldEl()).addClass("has-error")},i.valid=function(){e(this.getFieldEl()).removeClass("has-error")},i.control=function(){var t=this.getFieldEl(),n=this.getControlEl();if(e(t).find("input").addClass("form-control"),e(t).find("textarea").addClass("form-control"),e(t).find("select").addClass("form-control"),e(t).find("input[type=checkbox]").removeClass("form-control"),e(t).find("input[type=file]").removeClass("form-control"),e(t).find("input[type=radio]").removeClass("form-control"),"color"===this.inputType&&e(t).find("input").removeClass("form-control"),e(t).find("input[type=checkbox]").parent().parent().addClass("checkbox"),e(t).find("input[type=radio]").parent().parent().addClass("radio"),e(t).parents("form").hasClass("form-inline")&&(e(t).find("input[type=checkbox]").parent().addClass("checkbox-inline"),e(t).find("input[type=radio]").parent().addClass("radio-inline")),e(t).find("label.alpaca-control-label").addClass("control-label"),this.view.horizontal){e(t).find("label.alpaca-control-label").addClass("col-sm-3");var i=e("<div></div>");i.addClass("col-sm-9"),e(n).after(i),i.append(n),e(t).append("<div style='clear:both;'></div>")}},i.container=function(){var t=this.getContainerEl();this.view.horizontal&&e(t).addClass("form-horizontal")},i.form=function(){this.getFormEl()},i.enableButton=function(t){e(t).removeAttr("disabled")},i.disableButton=function(t){e(t).attr("disabled","disabled")},i.collapsible=function(){var n=this.getFieldEl(),i=e(n).find("legend").first(),a=e("[data-toggle='collapse']",i);if(e(a).length>0){var r=this.getContainerEl(),o=e(r).attr("id");o||(o=t.generateId(),e(r).attr("id",o)),e(r).addClass("collapse in"),e(a).attr("data-target")||e(a).attr("data-target","#"+o),e(a).mouseover(function(t){e(this).css("cursor","pointer")})}},i.tableHeaderRequired=function(t,n,i){e('<span class="alpaca-icon-required glyphicon glyphicon-star"></span>').prependTo(i)},i.tableHeaderOptional=function(e,t,n){},t.registerView({id:"bootstrap-display",parent:"web-display",type:"display",ui:"bootstrap",title:"Display View for Bootstrap 3",displayReadonly:!0,callbacks:i,styles:n,templates:{}}),t.registerView({id:"bootstrap-display-horizontal",parent:"bootstrap-display",horizontal:!0}),t.registerView({id:"bootstrap-edit",parent:"web-edit",type:"edit",ui:"bootstrap",title:"Edit View for Bootstrap 3",displayReadonly:!0,callbacks:i,styles:n,templates:{}}),t.registerView({id:"bootstrap-edit-horizontal",parent:"bootstrap-edit",horizontal:!0}),t.registerView({id:"bootstrap-create",parent:"bootstrap-edit",title:"Create View for Bootstrap 3",type:"create",displayReadonly:!1}),t.registerView({id:"bootstrap-create-horizontal",parent:"bootstrap-create",horizontal:!0})}(jQuery),Alpaca.defaultView="bootstrap",Alpaca}); | ( |
parse_and_replace.rs | #![cfg(not(windows))] // TODO: should fix these tests on Windows
use anyhow::{anyhow, ensure, Context, Error};
use log::{debug, info, warn};
use rustfix::apply_suggestions;
use std::collections::HashSet;
use std::env;
use std::ffi::OsString;
use std::fs;
use std::path::{Path, PathBuf};
use std::process::Output;
use tempfile::tempdir;
mod fixmode {
pub const EVERYTHING: &str = "yolo";
pub const EDITION: &str = "edition";
}
mod settings {
// can be set as env var to debug
pub const CHECK_JSON: &str = "RUSTFIX_TEST_CHECK_JSON";
pub const RECORD_JSON: &str = "RUSTFIX_TEST_RECORD_JSON";
pub const RECORD_FIXED_RUST: &str = "RUSTFIX_TEST_RECORD_FIXED_RUST";
}
fn compile(file: &Path, mode: &str) -> Result<Output, Error> {
let tmp = tempdir()?;
let mut args: Vec<OsString> = vec![
file.into(),
"--error-format=pretty-json".into(),
"-Zunstable-options".into(),
"--emit=metadata".into(),
"--crate-name=rustfix_test".into(),
"--out-dir".into(),
tmp.path().into(),
];
if mode == fixmode::EDITION {
args.push("--edition=2018".into());
}
let res = duct::cmd(env::var_os("RUSTC").unwrap_or("rustc".into()), &args)
.env("CLIPPY_DISABLE_DOCS_LINKS", "true")
.env_remove("RUST_LOG")
.stdout_capture()
.stderr_capture()
.unchecked()
.run()?;
Ok(res)
}
fn compile_and_get_json_errors(file: &Path, mode: &str) -> Result<String, Error> {
let res = compile(file, mode)?;
let stderr = String::from_utf8(res.stderr)?;
if stderr.contains("is only accepted on the nightly compiler") {
panic!("rustfix tests require a nightly compiler");
}
match res.status.code() {
Some(0) | Some(1) | Some(101) => Ok(stderr),
_ => Err(anyhow!(
"failed with status {:?}: {}",
res.status.code(),
stderr
)),
}
}
fn compiles_without_errors(file: &Path, mode: &str) -> Result<(), Error> {
let res = compile(file, mode)?;
match res.status.code() {
Some(0) => Ok(()),
_ => {
info!(
"file {:?} failed to compile:\n{}",
file,
String::from_utf8(res.stderr)?
);
Err(anyhow!(
"failed with status {:?} (`env RUST_LOG=parse_and_replace=info` for more info)",
res.status.code(),
))
}
}
}
fn | (path: &Path) -> Result<String, Error> {
use std::io::Read;
let mut buffer = String::new();
let mut file = fs::File::open(path)?;
file.read_to_string(&mut buffer)?;
Ok(buffer)
}
fn diff(expected: &str, actual: &str) -> String {
use similar::text::{ChangeTag, TextDiff};
use std::fmt::Write;
let mut res = String::new();
let diff = TextDiff::from_lines(expected.trim(), actual.trim());
let mut different = false;
for op in diff.ops() {
for change in diff.iter_changes(op) {
let prefix = match change.tag() {
ChangeTag::Equal => continue,
ChangeTag::Insert => "+",
ChangeTag::Delete => "-",
};
if !different {
write!(
&mut res,
"differences found (+ == actual, - == expected):\n"
)
.unwrap();
different = true;
}
write!(&mut res, "{} {}", prefix, change.value()).unwrap();
}
}
if different {
write!(&mut res, "").unwrap();
}
res
}
fn test_rustfix_with_file<P: AsRef<Path>>(file: P, mode: &str) -> Result<(), Error> {
let file: &Path = file.as_ref();
let json_file = file.with_extension("json");
let fixed_file = file.with_extension("fixed.rs");
let filter_suggestions = if mode == fixmode::EVERYTHING {
rustfix::Filter::Everything
} else {
rustfix::Filter::MachineApplicableOnly
};
debug!("next up: {:?}", file);
let code = read_file(file).context(format!("could not read {}", file.display()))?;
let errors = compile_and_get_json_errors(file, mode)
.context(format!("could compile {}", file.display()))?;
let suggestions =
rustfix::get_suggestions_from_json(&errors, &HashSet::new(), filter_suggestions)
.context("could not load suggestions")?;
if std::env::var(settings::RECORD_JSON).is_ok() {
use std::io::Write;
let mut recorded_json = fs::File::create(&file.with_extension("recorded.json")).context(
format!("could not create recorded.json for {}", file.display()),
)?;
recorded_json.write_all(errors.as_bytes())?;
}
if std::env::var(settings::CHECK_JSON).is_ok() {
let expected_json = read_file(&json_file).context(format!(
"could not load json fixtures for {}",
file.display()
))?;
let expected_suggestions =
rustfix::get_suggestions_from_json(&expected_json, &HashSet::new(), filter_suggestions)
.context("could not load expected suggestions")?;
ensure!(
expected_suggestions == suggestions,
"got unexpected suggestions from clippy:\n{}",
diff(
&format!("{:?}", expected_suggestions),
&format!("{:?}", suggestions)
)
);
}
let fixed = apply_suggestions(&code, &suggestions)
.context(format!("could not apply suggestions to {}", file.display()))?;
if std::env::var(settings::RECORD_FIXED_RUST).is_ok() {
use std::io::Write;
let mut recorded_rust = fs::File::create(&file.with_extension("recorded.rs"))?;
recorded_rust.write_all(fixed.as_bytes())?;
}
let expected_fixed =
read_file(&fixed_file).context(format!("could read fixed file for {}", file.display()))?;
ensure!(
fixed.trim() == expected_fixed.trim(),
"file {} doesn't look fixed:\n{}",
file.display(),
diff(fixed.trim(), expected_fixed.trim())
);
compiles_without_errors(&fixed_file, mode)?;
Ok(())
}
fn get_fixture_files(p: &str) -> Result<Vec<PathBuf>, Error> {
Ok(fs::read_dir(&p)?
.into_iter()
.map(|e| e.unwrap().path())
.filter(|p| p.is_file())
.filter(|p| {
let x = p.to_string_lossy();
x.ends_with(".rs") && !x.ends_with(".fixed.rs") && !x.ends_with(".recorded.rs")
})
.collect())
}
fn assert_fixtures(dir: &str, mode: &str) {
let files = get_fixture_files(&dir)
.context(format!("couldn't load dir `{}`", dir))
.unwrap();
let mut failures = 0;
for file in &files {
if let Err(err) = test_rustfix_with_file(file, mode) {
println!("failed: {}", file.display());
warn!("{:?}", err);
failures += 1;
}
info!("passed: {:?}", file);
}
if failures > 0 {
panic!(
"{} out of {} fixture asserts failed\n\
(run with `env RUST_LOG=parse_and_replace=info` to get more details)",
failures,
files.len(),
);
}
}
#[test]
fn everything() {
let _ = env_logger::try_init();
assert_fixtures("./tests/everything", fixmode::EVERYTHING);
}
#[test]
#[ignore = "Requires custom rustc build"]
fn edition() {
let _ = env_logger::try_init();
assert_fixtures("./tests/edition", fixmode::EDITION);
}
| read_file |
namespace_disaster_recovery_config_id.go | package validate
// NOTE: this file is generated via 'go:generate' - manual changes will be overwritten
import (
"fmt"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/servicebus/parse"
)
func NamespaceDisasterRecoveryConfigID(input interface{}, key string) (warnings []string, errors []error) {
v, ok := input.(string)
if !ok {
errors = append(errors, fmt.Errorf("expected %q to be a string", key))
return
}
if _, err := parse.NamespaceDisasterRecoveryConfigID(v); err != nil |
return
}
| {
errors = append(errors, err)
} |
models.py | from django.db import models
# Create your models here.
class Notes(models.Model):
title = models.CharField(max_length=255)
content = models.TextField(blank=True, null=True) | created_at = models.DateTimeField(auto_now_add=True)
modified_at = models.DateTimeField(auto_now=True)
class Meta:
ordering = ('title',) | |
shared.go | package server
import (
"encoding/json"
"io/ioutil"
"net/http"
"os"
"time"
"github.com/m1cr0man/steampump/pkg/steammesh"
)
func serveJSON(res http.ResponseWriter, data interface{}) {
res.Header().Set("Content-Type", "application/json")
err := json.NewEncoder(res).Encode(data)
if err != nil {
http.Error(res, err.Error(), http.StatusInternalServerError)
}
}
// Adapted from http.checkIfModifiedSince
// Returns true unless If-Modified-Since matches modtime
func checkModified(req *http.Request, modtime time.Time) bool {
ims := req.Header.Get("If-Modified-Since")
if ims == "" {
return true
}
t, err := http.ParseTime(ims)
if err != nil {
return true
}
modtime = modtime.Truncate(time.Second)
return !modtime.Equal(t)
}
func sendDirJSON(res http.ResponseWriter, dirpath string) {
files, _ := ioutil.ReadDir(dirpath)
fileJSON := make([]steammesh.TransferItem, len(files))
for i, file := range files {
fileJSON[i] = steammesh.TransferItem{
Path: file.Name(),
Mode: file.Mode(),
Mtime: file.ModTime(),
Size: file.Size(),
}
}
res.Header().Set("Content-Type", "application/json; charset=utf-8")
err := json.NewEncoder(res).Encode(fileJSON) | http.Error(res, err.Error(), http.StatusInternalServerError)
}
}
func serveFile(res http.ResponseWriter, req *http.Request, fullPath string) {
stat, err := os.Stat(fullPath)
if os.IsNotExist(err) {
http.NotFound(res, req)
return
}
if err != nil {
http.Error(res, err.Error(), http.StatusInternalServerError)
return
}
// Override ServeFile for application/json requests to send better dir info
if stat.IsDir() && (req.Header.Get("Content-Type") == "application/json" || req.Header.Get("Accept") == "application/json") {
// Check modified date correctly
mtime := stat.ModTime()
if checkModified(req, mtime) == false {
res.WriteHeader(http.StatusNotModified)
return
}
res.Header().Set("Last-Modified", mtime.UTC().Format(http.TimeFormat))
sendDirJSON(res, fullPath)
return
}
http.ServeFile(res, req, fullPath)
} | if err != nil { |
base.py | import socket
class | :
PROTOCOL = {
"TCP": socket.SOCK_STREAM,
"UDP": socket.SOCK_DGRAM
}
| BaseConnection |
exponentiated_quadratic.py | # Copyright 2018 The TensorFlow Probability Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
"""The ExponentiatedQuadratic kernel."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow.compat.v2 as tf
from tensorflow_probability.python.internal import assert_util
from tensorflow_probability.python.internal import tensor_util
from tensorflow_probability.python.math.psd_kernels import positive_semidefinite_kernel as psd_kernel
from tensorflow_probability.python.math.psd_kernels.internal import util
__all__ = ['ExponentiatedQuadratic']
class ExponentiatedQuadratic(psd_kernel.AutoCompositeTensorPsdKernel):
| """The ExponentiatedQuadratic kernel.
Sometimes called the "squared exponential", "Gaussian" or "radial basis
function", this kernel function has the form
```none
k(x, y) = amplitude**2 * exp(-||x - y||**2 / (2 * length_scale**2))
```
where the double-bars represent vector length (ie, Euclidean, or L2 norm).
"""
def __init__(self,
amplitude=None,
length_scale=None,
feature_ndims=1,
validate_args=False,
name='ExponentiatedQuadratic'):
"""Construct an ExponentiatedQuadratic kernel instance.
Args:
amplitude: floating point `Tensor` that controls the maximum value
of the kernel. Must be broadcastable with `length_scale` and inputs to
`apply` and `matrix` methods. Must be greater than zero. A value of
`None` is treated like 1.
Default value: None
length_scale: floating point `Tensor` that controls how sharp or wide the
kernel shape is. This provides a characteristic "unit" of length against
which `||x - y||` can be compared for scale. Must be broadcastable with
`amplitude` and inputs to `apply` and `matrix` methods. A value of
`None` is treated like 1.
Default value: None
feature_ndims: Python `int` number of rightmost dims to include in the
squared difference norm in the exponential.
validate_args: If `True`, parameters are checked for validity despite
possibly degrading runtime performance
name: Python `str` name prefixed to Ops created by this class.
"""
parameters = dict(locals())
with tf.name_scope(name):
dtype = util.maybe_get_common_dtype(
[amplitude, length_scale])
self._amplitude = tensor_util.convert_nonref_to_tensor(
amplitude, name='amplitude', dtype=dtype)
self._length_scale = tensor_util.convert_nonref_to_tensor(
length_scale, name='length_scale', dtype=dtype)
super(ExponentiatedQuadratic, self).__init__(
feature_ndims,
dtype=dtype,
name=name,
validate_args=validate_args,
parameters=parameters)
@property
def amplitude(self):
"""Amplitude parameter."""
return self._amplitude
@property
def length_scale(self):
"""Length scale parameter."""
return self._length_scale
def _batch_shape(self):
scalar_shape = tf.TensorShape([])
return tf.broadcast_static_shape(
scalar_shape if self.amplitude is None else self.amplitude.shape,
scalar_shape if self.length_scale is None else self.length_scale.shape)
def _batch_shape_tensor(self):
return tf.broadcast_dynamic_shape(
[] if self.amplitude is None else tf.shape(self.amplitude),
[] if self.length_scale is None else tf.shape(self.length_scale))
def _apply_with_distance(
self, x1, x2, pairwise_square_distance, example_ndims=0):
exponent = -0.5 * pairwise_square_distance
if self.length_scale is not None:
length_scale = tf.convert_to_tensor(self.length_scale)
length_scale = util.pad_shape_with_ones(
length_scale, example_ndims)
exponent = exponent / length_scale**2
if self.amplitude is not None:
amplitude = tf.convert_to_tensor(self.amplitude)
amplitude = util.pad_shape_with_ones(amplitude, example_ndims)
exponent = exponent + 2. * tf.math.log(amplitude)
return tf.exp(exponent)
def _apply(self, x1, x2, example_ndims=0):
pairwise_square_distance = util.sum_rightmost_ndims_preserving_shape(
tf.math.squared_difference(x1, x2), self.feature_ndims)
return self._apply_with_distance(
x1, x2, pairwise_square_distance, example_ndims=example_ndims)
def _matrix(self, x1, x2):
pairwise_square_distance = util.pairwise_square_distance_matrix(
x1, x2, self.feature_ndims)
return self._apply_with_distance(
x1, x2, pairwise_square_distance, example_ndims=2)
def _tensor(self, x1, x2, x1_example_ndims, x2_example_ndims):
pairwise_square_distance = util.pairwise_square_distance_tensor(
x1, x2, self.feature_ndims, x1_example_ndims, x2_example_ndims)
return self._apply_with_distance(
x1, x2, pairwise_square_distance,
example_ndims=(x1_example_ndims + x2_example_ndims))
def _parameter_control_dependencies(self, is_init):
if not self.validate_args:
return []
assertions = []
for arg_name, arg in dict(amplitude=self.amplitude,
length_scale=self.length_scale).items():
if arg is not None and is_init != tensor_util.is_ref(arg):
assertions.append(assert_util.assert_positive(
arg,
message='{} must be positive.'.format(arg_name)))
return assertions |
|
demo04.py | ### 多个函数间的配合
## 变量的作用域
rent = 3000
variable_cost = 0
def cost():
global variable_cost # 使用全局的变量
utilities = int(input('请输入本月的水电费用'))
food_cost = int(input('请输入本月的食材费用'))
variable_cost = utilities + food_cost
print('本月的变动成本费用是' + str(variable_cost))
def sum_cost():
sum = rent + variable_cost
print('本月的总成本是' + str(sum))
cost()
sum_cost()
| ||
harvest.py | """
tulflow.harvest
~~~~~~~~~~~~~~~
This module contains objects to harvest data from one given location to another.
"""
import hashlib
import io
import logging
import pandas
import sickle
from lxml import etree
from sickle import Sickle
from sickle.models import xml_to_dict
from sickle.oaiexceptions import NoRecordsMatch
from tulflow import process
NS = {
"marc21": "http://www.loc.gov/MARC21/slim",
"oai": "http://www.openarchives.org/OAI/2.0/"
}
def oai_to_s3(**kwargs):
"""Wrapper function for using OAI Harvest, Default Processor, and S3 Writer."""
kwargs["harvest_params"] = {
"metadataPrefix": kwargs.get("metadata_prefix"),
"from": kwargs.get("harvest_from_date"),
"until": kwargs.get("harvest_until_date")
}
dag_id = kwargs["dag"].dag_id
dag_start_date = kwargs["timestamp"]
oai_sets = generate_oai_sets(**kwargs)
all_processed = []
sets_with_no_records = []
if oai_sets:
for oai_set in oai_sets:
kwargs["harvest_params"]["set"] = oai_set
data = harvest_oai(**kwargs)
if data == []:
sets_with_no_records.append(oai_set)
logging.info("Skipping processing % set because it has no data.", oai_set)
continue
outdir = dag_s3_prefix(dag_id, dag_start_date)
processed = process_xml(data, dag_write_string_to_s3, outdir, **kwargs)
all_processed.append(processed)
else:
data = harvest_oai(**kwargs)
if data == []:
sets_with_no_records.append(oai_set)
outdir = dag_s3_prefix(dag_id, dag_start_date)
processed = process_xml(data, dag_write_string_to_s3, outdir, **kwargs)
all_processed.append(processed)
all_updated = sum([set['updated'] for set in all_processed])
all_deleted = sum([set['deleted'] for set in all_processed])
logging.info("Total OAI Records Harvested & Processed: %s", all_updated)
logging.info("Total OAI Records Harvest & Marked for Deletion: %s", all_deleted)
logging.info("Total sets with no records: %s", len(sets_with_no_records))
logging.info("Sets with no records %s", sets_with_no_records)
return {"updated": all_updated, "deleted": all_deleted, "sets_with_no_records": sets_with_no_records}
def generate_oai_sets(**kwargs):
"""Generate the oai sets we want to harvest."""
all_sets = bool(kwargs.get("all_sets"))
included_sets = kwargs.get("included_sets")
excluded_sets = kwargs.get("excluded_sets")
oai_endpoint = kwargs.get("oai_endpoint")
if all_sets:
logging.info("Seeing All Sets Needed.")
return []
elif included_sets:
logging.info("Seeing SetSpec List.")
if not isinstance(included_sets, list):
return [included_sets]
return included_sets
elif excluded_sets:
logging.info("Seeing Excluded SetSpec List.")
if not isinstance(excluded_sets, list):
excluded_sets = [excluded_sets]
list_sets = Sickle(oai_endpoint).ListSets()
all_sets = [oai_set.xml.find("oai:setSpec", namespaces=NS).text for oai_set in list_sets]
remaining_sets = list(set(all_sets) - set(excluded_sets))
logging.info(remaining_sets)
return remaining_sets
return []
class | (sickle.iterator.OAIItemIterator):
def next(self):
"""Return the next record/header/set."""
while True:
for item in self._items:
mapped = self.mapper(item)
if self.ignore_deleted and mapped.deleted:
continue
if hasattr(mapped, 'metadata') and mapped.metadata == None:
logging.info("Skipping record with no metadata: %s", mapped.header.identifier)
continue
return mapped
if self.resumption_token and self.resumption_token.token:
self._next_response()
else:
raise StopIteration
pass
# TODO: Remove if https://github.com/mloesch/sickle/pull/47 gets merged.
class HarvestRecord(sickle.models.Record):
def get_metadata(self):
# We want to get record/metadata/<container>/*
# <container> would be the element ``dc``
# in the ``oai_dc`` case.
meta_data = self.xml.find('.//' + self._oai_namespace + 'metadata')
if meta_data != None:
return xml_to_dict(meta_data.getchildren()[0], strip_ns=self._strip_ns)
pass
def harvest_oai(**kwargs):
"""Create OAI ListRecords Iterator for Harvesting Data."""
oai_endpoint = kwargs.get("oai_endpoint")
harvest_params = kwargs.get("harvest_params")
logging.info("Harvesting from %s", oai_endpoint)
logging.info("Harvesting %s", harvest_params)
sickle = Sickle(oai_endpoint, retry_status_codes=[500,503], max_retries=3)
class_mapping = harvest_params.get("class_mapping", {
"ListRecords": HarvestRecord,
})
iterator = harvest_params.get("iterator", HarvestIterator)
for key in class_mapping:
sickle.class_mapping[key] = class_mapping[key]
sickle.iterator = iterator
try:
return sickle.ListRecords(**harvest_params)
except NoRecordsMatch:
logging.info("No records found.")
return []
class OaiXml:
"""oai-pmh xml etree wrapper"""
def __init__(self, dag_id, timestamp):
etree.register_namespace("oai", "http://www.openarchives.org/OAI/2.0/")
etree.register_namespace("marc21", "http://www.loc.gov/MARC21/slim")
self.root = etree.Element("{http://www.openarchives.org/OAI/2.0/}collection")
self.root.attrib["dag-id"] = dag_id
self.root.attrib["dag-timestamp"] = timestamp
def append(self, record):
self.root.append(record)
def tostring(self):
return etree.tostring(self.root, encoding="utf-8").decode("utf-8")
def process_xml(data, writer, outdir, **kwargs):
"""Process & Write XML data to S3."""
parser = kwargs.get("parser")
records_per_file = kwargs.get("records_per_file")
if kwargs.get("dag"):
run_id = kwargs.get("dag").dag_id
else:
run_id = "no-dag-provided"
if kwargs.get("timestamp"):
timestamp = kwargs.get("timestamp")
else:
timestamp = "no-timestamp-provided"
if not records_per_file:
records_per_file = 1000
count = deleted_count = 0
oai_updates = OaiXml(run_id, timestamp)
oai_deletes = OaiXml(run_id, timestamp)
logging.info("Processing XML")
for record in data:
record_id = record.header.identifier
record = record.xml
record.attrib["airflow-record-id"] = record_id
if parser:
record = parser(record, **kwargs)
if record.xpath(".//oai:header[@status='deleted']", namespaces=NS):
logging.info("Added record %s to deleted xml file(s)", record_id)
deleted_count += 1
oai_deletes.append(record)
if deleted_count % int(records_per_file) == 0:
writer(oai_deletes.tostring(), outdir + "/deleted", **kwargs)
oai_deletes = OaiXml(run_id, timestamp)
else:
logging.info("Added record %s to new-updated xml file", record_id)
count += 1
oai_updates.append(record)
if count % int(records_per_file) == 0:
writer(oai_updates.tostring(), outdir + "/new-updated", **kwargs)
oai_updates = OaiXml(run_id, timestamp)
writer(oai_updates.tostring(), outdir + "/new-updated", **kwargs)
writer(oai_deletes.tostring(), outdir + "/deleted", **kwargs)
logging.info("OAI Records Harvested & Processed: %s", count)
logging.info("OAI Records Harvest & Marked for Deletion: %s", deleted_count)
return {"updated": count, "deleted": deleted_count}
def perform_xml_lookup_with_cache():
cache = {}
def perform_xml_lookup(oai_record, **kwargs):
"""Parse additions/updates & add boundwiths."""
if len(cache) == 0:
logging.info("*** Fetching CSV lookup file from s3 ***")
access_id = kwargs.get("access_id")
access_secret = kwargs.get("access_secret")
bucket = kwargs.get("bucket_name")
lookup_key = kwargs.get("lookup_key")
csv_data = process.get_s3_content(bucket, lookup_key, access_id, access_secret)
cache["value"] = pandas.read_csv(io.BytesIO(csv_data), header=0)
lookup_csv = cache["value"]
for record in oai_record.xpath(".//marc21:record", namespaces=NS):
record_id = process.get_record_001(record)
logging.info("Reading in Record %s", record_id)
parent_txt = lookup_csv.loc[lookup_csv.child_id == int(record_id), "parent_xml"].values
if len(set(parent_txt)) >= 1:
logging.info("Child XML record found %s", record_id)
for parent_node in parent_txt[0].split("||"):
try:
record.append(etree.fromstring(parent_node))
except etree.XMLSyntaxError as error:
logging.error("Problem with string syntax:")
logging.error(error)
logging.error(parent_node)
return oai_record
return perform_xml_lookup
def dag_write_string_to_s3(string, prefix, **kwargs):
"""Push a string in memory to s3 with a defined prefix"""
access_id = kwargs.get("access_id")
access_secret = kwargs.get("access_secret")
bucket_name = kwargs.get("bucket_name")
logging.info("Writing to S3 Bucket %s", bucket_name)
our_hash = hashlib.md5(string.encode("utf-8")).hexdigest()
filename = "{}/{}".format(prefix, our_hash)
process.generate_s3_object(string, bucket_name, filename, access_id, access_secret)
def write_log(string, prefix, **kwargs):
"""Write the data to logging info."""
prefix = prefix
logging.info(prefix)
string = string
logging.info(string)
def dag_s3_prefix(dag_id, timestamp):
"""Define the prefix that will be prepended to all files created by this dag run"""
return "{}/{}".format(dag_id, timestamp)
| HarvestIterator |
website.reducer.spec.ts | import { WebsiteModel, WebsitePageModel } from '../core/models/website.model';
import * as fromActions from './website.actions';
import * as fromReducer from './website.reducer';
describe('Website Reducer', () => {
const initialState = fromReducer.initialState;
const thrownError = 'some bad error';
let state: fromReducer.WebsiteState;
describe('on unknown action', () => {
it('Should return the default state', () => {
const action = { type: 'unknown' };
const state = fromReducer.websiteReducer(initialState, action);
expect(state).toEqual(initialState);
});
});
describe('On Begin actions', () => {
const expectedOnBeginActionsState: fromReducer.WebsiteState = {
...initialState,
error: null,
success: null,
isLoading: true,
};
const siteId = 123;
it('should set State.isLoading = true', () => {
const payload = { } as any;
const loadWebsiteAction = fromActions.LoadWebsiteBeginAction();
state = fromReducer.websiteReducer(initialState, loadWebsiteAction);
expect(state).toEqual(expectedOnBeginActionsState);
const updateWebsiteAction = fromActions.UpdateWebsiteBeginAction({ siteId, payload });
state = fromReducer.websiteReducer(initialState, updateWebsiteAction);
expect(state).toEqual(expectedOnBeginActionsState);
const updateBusinessAction = fromActions.UpdateBusinessBeginAction({ siteId, payload });
state = fromReducer.websiteReducer(initialState, updateBusinessAction);
expect(state).toEqual(expectedOnBeginActionsState);
});
});
describe('On Success actions', () => {
it('LoadWebsiteSuccessAction should set the expected State.data', () => {
const expectedPayload = {
websiteList: [WebsiteModel.empty()]
} as WebsitePageModel;
const expectedOnLoadWebsiteState: fromReducer.WebsiteState = {
...initialState,
isLoading: false,
hasBeenFetched: true,
data: expectedPayload,
success: { after: 'GET' }
};
const loadWebsiteSuccessAction = fromActions.LoadWebsiteSuccessAction({ payload: expectedPayload });
state = fromReducer.websiteReducer(initialState, loadWebsiteSuccessAction);
expect(state).toEqual(expectedOnLoadWebsiteState);
});
it('UpdateWebsiteSuccessAction should set the expected State.data', () => {
| const expectedPayload = {
websiteList: [WebsiteModel.empty()]
} as WebsitePageModel;
const expectedOnUpdateWebsiteState: fromReducer.WebsiteState = {
...initialState,
isLoading: false,
data: expectedPayload,
success: { after: 'UPDATE' }
};
const updateWebsiteSuccessAction = fromActions.UpdateWebsiteSuccessAction({ payload: expectedPayload });
state = fromReducer.websiteReducer(initialState, updateWebsiteSuccessAction);
expect(state).toEqual(expectedOnUpdateWebsiteState);
});
it('UpdateBusinessSuccessAction should set the expected State.data', () => {
const expectedPayload = {
websiteList: [WebsiteModel.empty()]
} as WebsitePageModel;
const expectedOnUpdateBusinessState: fromReducer.WebsiteState = {
...initialState,
isLoading: false,
data: expectedPayload,
success: { after: 'UPDATE' }
};
const updateBusinessSuccessAction = fromActions.UpdateWebsiteSuccessAction({ payload: expectedPayload });
state = fromReducer.websiteReducer(initialState, updateBusinessSuccessAction);
expect(state).toEqual(expectedOnUpdateBusinessState);
});
});
describe('On Fail actions', () => {
it('LoadWebsiteFailAction should set State.error { after: \'GET\', error: any }', () => {
const expectedFailState: fromReducer.WebsiteState = {
...initialState,
isLoading: false,
error: { after: 'GET', error: thrownError }
};
const loadWebsiteFailAction = fromActions.LoadWebsiteFailAction({ errors: thrownError });
state = fromReducer.websiteReducer(initialState, loadWebsiteFailAction);
expect(state).toEqual(expectedFailState);
});
it('UpdateWebsiteFailAction should set State.error { after: \'UPDATE\', error: any }', () => {
const expectedFailState: fromReducer.WebsiteState = {
...initialState,
isLoading: false,
error: { after: 'UPDATE', error: thrownError }
};
const updateWebsiteFailAction = fromActions.UpdateWebsiteFailAction({ errors: thrownError });
state = fromReducer.websiteReducer(initialState, updateWebsiteFailAction);
expect(state).toEqual(expectedFailState);
});
it('UpdateBusinessFailAction should set State.error { after: \'UPDATE\', error: any }', () => {
const expectedFailState: fromReducer.WebsiteState = {
...initialState,
isLoading: false,
error: { after: 'UPDATE', error: thrownError }
};
const updateBusinessFailAction = fromActions.UpdateBusinessFailAction({ errors: thrownError });
state = fromReducer.websiteReducer(initialState, updateBusinessFailAction);
expect(state).toEqual(expectedFailState);
});
});
}); | |
dynamo-client.js | 'use strict';
const AWS = require('aws-sdk');
const isTest = process.env.JEST_WORKER_ID;
const isDevelopment = process.env.NODE_ENV !== 'production';
const setupLocal = isTest || isDevelopment;
const config = {
convertEmptyValues: true,
region: "sa-east-1",
...(setupLocal && {
sslEnabled: false,
region: 'local-env',
secretAccessKey: 'secr3tKey'
}),
...(isDevelopment && {
accessKeyId: 'mYlOc4lK3y-dev', | accessKeyId: 'mYlOc4lK3y-test',
endpoint: 'localhost:5000'
})
};
AWS.config.update(config);
const dynamoDbClient = new AWS.DynamoDB();
const documentClient = new AWS.DynamoDB.DocumentClient();
module.exports = {
dynamoDbClient,
documentClient
}; | endpoint: 'localhost:8000'
}),
...(isTest && { |
version.py | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2015-2019 CERN.
#
# Invenio is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Version information for Invenio-Logging.
| """
from __future__ import absolute_import, print_function
__version__ = '1.2.0' | This file is imported by ``invenio_logging.__init__``,
and parsed by ``setup.py``. |
process-env.js | "use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var path_1 = __importDefault(require("path"));
var dotenv = __importStar(require("dotenv"));
var dotenv_expand_1 = __importDefault(require("dotenv-expand"));
/**
* @param {string} dir The directory containing the .env files to load.
*/
function | (dir) {
// replicate Next.js handling/behavior, but without a default NODE_ENV
// https://github.com/vercel/next.js/blob/v10.0.5/packages/next-env/index.ts#L80-L90
var mode = process.env.NODE_ENV;
var dotenvFiles = [
mode && ".env." + mode + ".local",
// Don't include `.env.local` for `test` environment
// since normally you expect tests to produce the same
// results for everyone
mode !== 'test' && '.env.local',
mode && ".env." + mode,
'.env',
].filter(Boolean);
// inspired by https://github.com/entropitor/dotenv-cli/blob/v4.0.0/cli.js#L53-L55
dotenvFiles.forEach(function (env) {
dotenv_expand_1.default(dotenv.config({ path: path_1.default.resolve(dir, env) }));
});
}
exports.default = processEnv;
| processEnv |
parser.py | import nodes
from parsers import parse
"""
This file contains a function to parse a query.
It will have to return a rootnode.
"""
BINARY_OPERATOR, UNARY_OPERATOR, MODIFIER, TERM = range(4)
# Contains a tuple : The first element is the node, the second is the priority of the operator (the bigger it is, the more the operator have a big priority)
OPERATORS = {
'AND': (nodes.AndNode, 5, BINARY_OPERATOR),
'OR': (nodes.OrNode, 10, BINARY_OPERATOR),
'&&': (nodes.AndNode, 5, BINARY_OPERATOR),
'||': (nodes.OrNode, 10, BINARY_OPERATOR),
#' -': (nodes.NotNode, 20, UNARY_OPERATOR),
'NOT': (nodes.NotNode, 20, UNARY_OPERATOR),
}
MODIFIERS = {
'"': nodes.ExactNode,
'`': nodes.ApproxNode,
'[': nodes.ApproxNode,
']': nodes.ApproxNode,
}
def get_type(term):
if term in OPERATORS:
return OPERATORS[term][2]
elif term in MODIFIERS:
return MODIFIER
return TERM
def parse_query(query):
def append_operator(term):
assert not(lastType in (BINARY_OPERATOR, UNARY_OPERATOR) and get_type(term) == BINARY_OPERATOR)
if get_type(term) == UNARY_OPERATOR and lastType == TERM:
operators.append('AND')
while len(operators) > 0 and OPERATORS[term][1] < OPERATORS[operators[-1]][1]:
if get_type(operators[-1]) == UNARY_OPERATOR:
terms.append( OPERATORS[ operators.pop() ][0](terms.pop()) )
else:
assert get_type(operators[-1]) == BINARY_OPERATOR
terms.append( OPERATORS[ operators.pop() ][0] ( terms.pop(), terms.pop() ) )
operators.append(term)
for r in list(OPERATORS.keys()) + list(MODIFIERS.keys()) + ['(',')']:
query = query.replace(r, ' ' + r + ' ')
query = query.split(' ')
terms = []
operators = []
lastType = BINARY_OPERATOR
parenthesis_level = 0
parenthesis_start = -1
modifier = None
modifier_terms = []
for pos, term in enumerate(query):
if not term:
continue
# Parenthesis
if term == '(':
parenthesis_level += 1
if parenthesis_level == 1:
parenthesis_start = pos + 1
elif term == ')':
parenthesis_level -= 1
if parenthesis_level == 0:
if lastType == TERM:
append_operator('AND')
terms.append( parse_query(' '.join(query[parenthesis_start:pos])) )
lastType = TERM
continue
if parenthesis_level > 0:
continue
# Modifier
if get_type(term) == MODIFIER:
if modifier is None:
modifier = MODIFIERS[term]
else:
assert MODIFIERS[term] == modifier | if lastType == TERM:
append_operator('AND')
terms.append(modifier(modifier_terms))
lastType = TERM
modifier = None
modifier_terms = []
continue
if modifier is not None:
term_list = parse(term)
modifier_terms.extend(nodes.KwNode(i) for i in term_list)
continue
# Operator or terms
if get_type(term) in (BINARY_OPERATOR, UNARY_OPERATOR):
append_operator(term)
else:
term_list = tuple(parse(term))
if len(term_list) == 0:
continue
elif len(term_list) == 1:
terms.append(nodes.KwNode(term_list[0]))
else:
terms.append(nodes.ExactNode([nodes.KwNode(i) for i in term_list]))
if lastType == TERM:
append_operator('AND')
lastType = get_type(term)
assert len(terms) > 0
while len(terms) > 1:
if get_type(operators[-1]) == UNARY_OPERATOR:
terms.append( OPERATORS[ operators.pop() ][0](terms.pop()) )
else:
assert get_type(operators[-1]) == BINARY_OPERATOR
terms.append( OPERATORS[ operators.pop() ][0] ( terms.pop(), terms.pop() ) )
return terms[0] | |
interface.py | class Interface:
def __init__(
self,
number: int,
name: str,
disabled: bool,
running: bool,
slave: bool,
dynamic: bool,
comment: str,
) -> None:
self.number = number
self.name = name
self.disabled = disabled
self.running = running
self.slave = slave
self.dynamic = dynamic | self.comment = comment |
|
effect.rs | // Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
//! Enforces the Rust effect system. Currently there is just one effect,
/// `unsafe`.
use self::UnsafeContext::*;
use middle::def;
use middle::ty::{self, Ty};
use middle::ty::MethodCall;
use util::ppaux;
use syntax::ast;
use syntax::ast_util::PostExpansionMethod;
use syntax::codemap::Span;
use syntax::visit;
use syntax::visit::Visitor;
#[derive(Copy, PartialEq)]
enum UnsafeContext {
SafeContext,
UnsafeFn,
UnsafeBlock(ast::NodeId),
}
fn type_is_unsafe_function(ty: Ty) -> bool {
match ty.sty {
ty::ty_bare_fn(_, ref f) => f.unsafety == ast::Unsafety::Unsafe,
_ => false,
}
}
struct EffectCheckVisitor<'a, 'tcx: 'a> {
tcx: &'a ty::ctxt<'tcx>,
/// Whether we're in an unsafe context.
unsafe_context: UnsafeContext,
}
impl<'a, 'tcx> EffectCheckVisitor<'a, 'tcx> {
fn require_unsafe(&mut self, span: Span, description: &str) {
match self.unsafe_context {
SafeContext => {
// Report an error.
span_err!(self.tcx.sess, span, E0133,
"{} requires unsafe function or block",
description);
}
UnsafeBlock(block_id) => {
// OK, but record this.
debug!("effect: recording unsafe block as used: {}", block_id);
self.tcx.used_unsafe.borrow_mut().insert(block_id);
}
UnsafeFn => {}
}
}
fn check_str_index(&mut self, e: &ast::Expr) {
let base_type = match e.node {
ast::ExprIndex(ref base, _) => ty::node_id_to_type(self.tcx, base.id),
_ => return
};
debug!("effect: checking index with base type {}",
ppaux::ty_to_string(self.tcx, base_type));
match base_type.sty {
ty::ty_uniq(ty) | ty::ty_rptr(_, ty::mt{ty, ..}) => if ty::ty_str == ty.sty {
span_err!(self.tcx.sess, e.span, E0134,
"modification of string types is not allowed");
},
ty::ty_str => {
span_err!(self.tcx.sess, e.span, E0135,
"modification of string types is not allowed");
}
_ => {}
}
}
}
impl<'a, 'tcx, 'v> Visitor<'v> for EffectCheckVisitor<'a, 'tcx> {
fn visit_fn(&mut self, fn_kind: visit::FnKind<'v>, fn_decl: &'v ast::FnDecl,
block: &'v ast::Block, span: Span, _: ast::NodeId) {
let (is_item_fn, is_unsafe_fn) = match fn_kind {
visit::FkItemFn(_, _, fn_style, _) =>
(true, fn_style == ast::Unsafety::Unsafe),
visit::FkMethod(_, _, method) =>
(true, method.pe_unsafety() == ast::Unsafety::Unsafe),
_ => (false, false),
};
let old_unsafe_context = self.unsafe_context;
if is_unsafe_fn {
self.unsafe_context = UnsafeFn
} else if is_item_fn {
self.unsafe_context = SafeContext
}
visit::walk_fn(self, fn_kind, fn_decl, block, span);
self.unsafe_context = old_unsafe_context
}
fn visit_block(&mut self, block: &ast::Block) {
let old_unsafe_context = self.unsafe_context;
match block.rules {
ast::DefaultBlock => {}
ast::UnsafeBlock(source) => {
// By default only the outermost `unsafe` block is
// "used" and so nested unsafe blocks are pointless
// (the inner ones are unnecessary and we actually
// warn about them). As such, there are two cases when
// we need to create a new context, when we're
// - outside `unsafe` and found a `unsafe` block
// (normal case)
// - inside `unsafe`, found an `unsafe` block
// created internally to the compiler
//
// The second case is necessary to ensure that the
// compiler `unsafe` blocks don't accidentally "use"
// external blocks (e.g. `unsafe { println("") }`,
// expands to `unsafe { ... unsafe { ... } }` where
// the inner one is compiler generated).
if self.unsafe_context == SafeContext || source == ast::CompilerGenerated {
self.unsafe_context = UnsafeBlock(block.id)
}
}
}
visit::walk_block(self, block);
self.unsafe_context = old_unsafe_context
}
fn visit_expr(&mut self, expr: &ast::Expr) {
match expr.node {
ast::ExprMethodCall(_, _, _) => {
let method_call = MethodCall::expr(expr.id);
let base_type = (*self.tcx.method_map.borrow())[method_call].ty;
debug!("effect: method call case, base type is {}",
ppaux::ty_to_string(self.tcx, base_type));
if type_is_unsafe_function(base_type) {
self.require_unsafe(expr.span,
"invocation of unsafe method")
}
}
ast::ExprCall(ref base, _) => {
let base_type = ty::node_id_to_type(self.tcx, base.id);
debug!("effect: call case, base type is {}",
ppaux::ty_to_string(self.tcx, base_type));
if type_is_unsafe_function(base_type) {
self.require_unsafe(expr.span, "call to unsafe function")
}
}
ast::ExprUnary(ast::UnDeref, ref base) => {
let base_type = ty::node_id_to_type(self.tcx, base.id);
debug!("effect: unary case, base type is {}",
ppaux::ty_to_string(self.tcx, base_type));
if let ty::ty_ptr(_) = base_type.sty {
self.require_unsafe(expr.span, "dereference of unsafe pointer")
}
}
ast::ExprAssign(ref base, _) | ast::ExprAssignOp(_, ref base, _) => {
self.check_str_index(&**base);
}
ast::ExprAddrOf(ast::MutMutable, ref base) => {
self.check_str_index(&**base);
}
ast::ExprInlineAsm(..) => {
self.require_unsafe(expr.span, "use of inline assembly");
}
ast::ExprPath(..) => {
if let def::DefStatic(_, true) = ty::resolve_expr(self.tcx, expr) {
self.require_unsafe(expr.span, "use of mutable static");
}
}
_ => {}
}
visit::walk_expr(self, expr);
}
}
pub fn | (tcx: &ty::ctxt) {
let mut visitor = EffectCheckVisitor {
tcx: tcx,
unsafe_context: SafeContext,
};
visit::walk_crate(&mut visitor, tcx.map.krate());
}
| check_crate |
read.d.ts | import { ReadOptions, ReadSaveObject } from './types'; | export default function readBrs(rawBytes: Uint8Array, options?: ReadOptions): ReadSaveObject; | |
example2_client.go | /*
Copyright 2018 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1
import (
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
rest "github.com/hyperhq/client-go/rest"
v1 "k8s.io/code-generator/_examples/crd/apis/example2/v1"
"k8s.io/code-generator/_examples/crd/clientset/versioned/scheme"
)
type SecondExampleV1Interface interface {
RESTClient() rest.Interface
TestTypesGetter
}
// SecondExampleV1Client is used to interact with features provided by the example.test.crd.code-generator.k8s.io group.
type SecondExampleV1Client struct {
restClient rest.Interface
}
func (c *SecondExampleV1Client) TestTypes(namespace string) TestTypeInterface {
return newTestTypes(c, namespace)
}
// NewForConfig creates a new SecondExampleV1Client for the given config.
func NewForConfig(c *rest.Config) (*SecondExampleV1Client, error) {
config := *c
if err := setConfigDefaults(&config); err != nil {
return nil, err
}
client, err := rest.RESTClientFor(&config)
if err != nil {
return nil, err
}
return &SecondExampleV1Client{client}, nil
}
// NewForConfigOrDie creates a new SecondExampleV1Client for the given config and
// panics if there is an error in the config.
func NewForConfigOrDie(c *rest.Config) *SecondExampleV1Client |
// New creates a new SecondExampleV1Client for the given RESTClient.
func New(c rest.Interface) *SecondExampleV1Client {
return &SecondExampleV1Client{c}
}
func setConfigDefaults(config *rest.Config) error {
gv := v1.SchemeGroupVersion
config.GroupVersion = &gv
config.APIPath = "/apis"
config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
if config.UserAgent == "" {
config.UserAgent = rest.DefaultKubernetesUserAgent()
}
return nil
}
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *SecondExampleV1Client) RESTClient() rest.Interface {
if c == nil {
return nil
}
return c.restClient
}
| {
client, err := NewForConfig(c)
if err != nil {
panic(err)
}
return client
} |
mutex.rs | //vim: tw=80
use futures::{FutureExt, stream};
#[cfg(feature = "tokio")]
use futures::future::ready;
use futures::stream::StreamExt;
use std::sync::Arc;
#[cfg(feature = "tokio")]
use std::rc::Rc;
use tokio::{self, sync::Barrier};
#[cfg(feature = "tokio")]
use tokio::runtime;
use tokio_test::task::spawn;
use tokio_test::{assert_pending, assert_ready};
use futures_locks::*;
// Create a MutexWeak and then upgrade it to Mutex
#[test]
fn mutex_weak_some() {
let mutex = Mutex::<u32>::new(0);
let mutex_weak = Mutex::downgrade(&mutex);
assert!(mutex_weak.upgrade().is_some())
}
// Create a MutexWeak and drop the mutex so that MutexWeak::upgrade return None
#[test]
fn mutex_weak_none() {
let mutex = Mutex::<u32>::new(0);
let mutex_weak = Mutex::downgrade(&mutex);
drop(mutex);
assert!(mutex_weak.upgrade().is_none())
}
// Compare Mutexes if it point to the same value
#[test]
fn mutex_eq_ptr_true() {
let mutex = Mutex::<u32>::new(0);
let mutex_other = mutex.clone();
assert!(Mutex::ptr_eq(&mutex, &mutex_other));
}
// Compare Mutexes if it point to the same value
#[test]
fn mutex_eq_ptr_false() {
let mutex = Mutex::<u32>::new(0);
let mutex_other = Mutex::<u32>::new(0);
assert!(!Mutex::ptr_eq(&mutex, &mutex_other));
}
// When a Mutex gets dropped after gaining ownership but before being polled, it
// should drain its channel and relinquish ownership if a message was found. If
// not, deadlocks may result.
#[tokio::test]
async fn | () {
let mutex = Mutex::<u32>::new(0);
let guard1 = mutex.lock().await;
let fut2 = mutex.lock();
drop(guard1); // ownership transfers to fut2
drop(fut2); // relinquish ownership
// The mutex should be available again
let _guard3 = mutex.lock().await;
}
// When a pending Mutex gets dropped after being polled() but before gaining
// ownership, ownership should pass on to the next waiter.
#[test]
fn drop_before_ready() {
let mutex = Mutex::<u32>::new(0);
let mut fut1 = spawn(mutex.lock());
let guard1 = assert_ready!(fut1.poll()); // fut1 immediately gets ownership
let mut fut2 = spawn(mutex.lock());
assert_pending!(fut2.poll()); // fut2 is blocked
let mut fut3 = spawn(mutex.lock());
assert_pending!(fut3.poll()); // fut3 is blocked, too
drop(fut2); // drop before gaining ownership
drop(guard1); // ownership transfers to fut3
drop(fut1);
assert!(fut3.is_woken());
assert_ready!(fut3.poll());
}
// Mutably dereference a uniquely owned Mutex
#[test]
fn get_mut() {
let mut mutex = Mutex::<u32>::new(42);
*mutex.get_mut().unwrap() += 1;
assert_eq!(*mutex.get_mut().unwrap(), 43);
}
// Cloned Mutexes cannot be deferenced
#[test]
fn get_mut_cloned() {
let mut mutex = Mutex::<u32>::new(42);
let _clone = mutex.clone();
assert!(mutex.get_mut().is_none());
}
// Acquire an uncontested Mutex. poll immediately returns Async::Ready
// #[test]
#[tokio::test]
async fn lock_uncontested() {
let mutex = Mutex::<u32>::new(0);
let guard = mutex.lock().await;
let result = *guard + 5;
drop(guard);
assert_eq!(result, 5);
}
// Pend on a Mutex held by another task in the same tokio Reactor. poll returns
// Async::NotReady. Later, it gets woken up without involving the OS.
#[test]
fn lock_contested() {
let mutex = Mutex::<u32>::new(0);
let mut fut0 = spawn(mutex.lock());
let guard0 = assert_ready!(fut0.poll()); // fut0 immediately gets ownership
let mut fut1 = spawn(mutex.lock());
assert_pending!(fut1.poll()); // fut1 is blocked
drop(guard0); // Ownership transfers to fut1
assert!(fut1.is_woken());
assert_ready!(fut1.poll());
}
// A single Mutex is contested by tasks in multiple threads
#[tokio::test]
async fn lock_multithreaded() {
let mutex = Mutex::<u32>::new(0);
let mtx_clone0 = mutex.clone();
let mtx_clone1 = mutex.clone();
let mtx_clone2 = mutex.clone();
let mtx_clone3 = mutex.clone();
let barrier = Arc::new(Barrier::new(5));
let b0 = barrier.clone();
let b1 = barrier.clone();
let b2 = barrier.clone();
let b3 = barrier.clone();
tokio::task::spawn(async move {
stream::iter(0..1000).for_each(move |_| {
mtx_clone0.lock().map(|mut guard| { *guard += 2 })
}).await;
b0.wait().await;
});
tokio::task::spawn(async move {
stream::iter(0..1000).for_each(move |_| {
mtx_clone1.lock().map(|mut guard| { *guard += 3 })
}).await;
b1.wait().await;
});
tokio::task::spawn(async move {
stream::iter(0..1000).for_each(move |_| {
mtx_clone2.lock().map(|mut guard| { *guard += 5 })
}).await;
b2.wait().await;
});
tokio::task::spawn(async move {
stream::iter(0..1000).for_each(move |_| {
mtx_clone3.lock().map(|mut guard| { *guard += 7 })
}).await;
b3.wait().await;
});
barrier.wait().await;
assert_eq!(mutex.try_unwrap().expect("try_unwrap"), 17_000);
}
// Mutexes should be acquired in the order that their Futures are waited upon.
#[tokio::test]
async fn lock_order() {
let mutex = Mutex::<Vec<u32>>::new(vec![]);
let fut2 = mutex.lock().map(|mut guard| guard.push(2));
let fut1 = mutex.lock().map(|mut guard| guard.push(1));
fut1.then(|_| fut2).await;
assert_eq!(mutex.try_unwrap().unwrap(), vec![1, 2]);
}
// Acquire an uncontested Mutex with try_lock
#[test]
fn try_lock_uncontested() {
let mutex = Mutex::<u32>::new(5);
let guard = mutex.try_lock().unwrap();
assert_eq!(5, *guard);
}
// Try and fail to acquire a contested Mutex with try_lock
#[test]
fn try_lock_contested() {
let mutex = Mutex::<u32>::new(0);
let _guard = mutex.try_lock().unwrap();
assert!(mutex.try_lock().is_err());
}
#[test]
fn try_unwrap_multiply_referenced() {
let mtx = Mutex::<u32>::new(0);
let _mtx2 = mtx.clone();
assert!(mtx.try_unwrap().is_err());
}
// Returning errors is simpler than in futures-locks 0.5: just return a Result
#[cfg(feature = "tokio")]
#[test]
fn with_err() {
let mtx = Mutex::<i32>::new(-5);
let rt = runtime::Builder::new_current_thread().build().unwrap();
let r = rt.block_on(async {
mtx.with(|guard| {
if *guard > 0 {
ready(Ok(*guard))
} else {
ready(Err("Whoops!"))
}
}).await
});
assert_eq!(r, Err("Whoops!"));
}
#[cfg(feature = "tokio")]
#[test]
fn with_ok() {
let mtx = Mutex::<i32>::new(5);
let rt = runtime::Builder::new_current_thread().build().unwrap();
let r = rt.block_on(async {
mtx.with(|guard| {
ready(*guard)
}).await
});
assert_eq!(r, 5);
}
// Mutex::with should work with multithreaded Runtimes as well as
// single-threaded Runtimes.
// https://github.com/asomers/futures-locks/issues/5
#[cfg(feature = "tokio")]
#[test]
fn with_threadpool() {
let mtx = Mutex::<i32>::new(5);
let rt = runtime::Builder::new_multi_thread().build().unwrap();
let r = rt.block_on(async {
mtx.with(|guard| {
ready(*guard)
}).await
});
assert_eq!(r, 5);
}
#[cfg(feature = "tokio")]
#[test]
fn with_local_ok() {
// Note: Rc is not Send
let mtx = Mutex::<Rc<i32>>::new(Rc::new(5));
let rt = runtime::Builder::new_current_thread().build().unwrap();
let r = rt.block_on(async {
mtx.with_local(|guard| {
ready(**guard)
}).await
});
assert_eq!(r, 5);
}
| drop_when_ready |
util.go | package model
import (
"fmt"
"math/rand"
"net"
"strconv"
"strings"
v1 "k8s.io/api/core/v1"
v13 "k8s.io/api/apps/v1"
)
// Copy pasted from https://stackoverflow.com/questions/22892120/how-to-generate-a-random-string-of-a-fixed-length-in-go
var letterRunes = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
func RandStringRunes(n int) string {
b := make([]rune, n)
for i := range b {
b[i] = letterRunes[rand.Intn(len(letterRunes))]
}
return string(b)
}
func GetRealmUserSecretName(keycloakNamespace, realmName, userName string) string {
return SanitizeResourceName(fmt.Sprintf("credential-%v-%v-%v",
realmName,
userName,
keycloakNamespace))
}
func SanitizeNumberOfReplicas(numberOfReplicas int, isCreate bool) *int32 {
numberOfReplicasCasted := int32(numberOfReplicas)
if isCreate && numberOfReplicasCasted < 1 {
numberOfReplicasCasted = 1
}
return &[]int32{numberOfReplicasCasted}[0]
}
func SanitizeResourceName(name string) string {
sb := strings.Builder{}
for _, char := range name {
ascii := int(char)
// number
if ascii >= 48 && ascii <= 57 {
sb.WriteRune(char)
continue
}
// Uppercase letters
if ascii >= 65 && ascii <= 90 {
sb.WriteRune(char)
continue
}
// Lowercase letters
if ascii >= 97 && ascii <= 122 {
sb.WriteRune(char)
continue
}
// dash
if ascii == 45 {
sb.WriteRune(char)
continue
}
if char == '.' {
sb.WriteRune(char)
continue
}
if ascii == '_' {
sb.WriteRune('-')
continue
}
// Ignore all invalid chars
continue
}
return sb.String()
}
// Get image string from the statefulset. Default to RHSSOImage string
func GetCurrentKeycloakImage(currentState *v13.StatefulSet) string {
for _, ele := range currentState.Spec.Template.Spec.Containers {
if ele.Name == KeycloakDeploymentName {
return ele.Image
}
}
return RHSSOImage
}
// Split a full image string (e.g. quay.io/keycloak/keycloak:7.0.1 or registry.access.redhat.com/redhat-sso-7/sso73-openshift:1.0 ) into it's repo and individual versions
func GetImageRepoAndVersion(image string) (string, string, string, string) {
imageRepo, imageMajor, imageMinor, imagePatch := "", "", "", "" | if len(imageStrings) > 0 {
imageRepo = imageStrings[0]
}
// If somehow the tag doesn't exist, return with empty strings for the versions
if len(imageStrings) == 1 {
return imageRepo, imageMajor, imageMinor, imagePatch
}
// Split the image tag on . to separate the version numbers
imageTagStrings := strings.Split(imageStrings[1], ".")
if len(imageTagStrings) > 0 {
imageMajor = imageTagStrings[0]
}
if len(imageTagStrings) > 1 {
imageMinor = imageTagStrings[1]
}
if len(imageTagStrings) > 2 {
imagePatch = imageTagStrings[2]
}
return imageRepo, imageMajor, imageMinor, imagePatch
}
func IsIP(host []byte) bool {
return net.ParseIP(string(host)) != nil
}
func GetExternalDatabaseHost(secret *v1.Secret) string {
host := secret.Data[DatabaseSecretExternalAddressProperty]
return string(host)
}
func GetExternalDatabaseName(secret *v1.Secret) string {
if secret == nil {
return PostgresqlDatabase
}
name := secret.Data[DatabaseSecretDatabaseProperty]
return string(name)
}
func GetExternalDatabasePort(secret *v1.Secret) int32 {
if secret == nil {
return PostgresDefaultPort
}
port := secret.Data[DatabaseSecretExternalPortProperty]
parsed, err := strconv.Atoi(string(port))
if err != nil {
return PostgresDefaultPort
}
return int32(parsed)
}
func MergeAnnotations(requested map[string]string, existing map[string]string) map[string]string {
if existing == nil {
return requested
}
for k, v := range requested {
existing[k] = v
}
return existing
}
// This function favors values in "a".
func MergeEnvs(a []v1.EnvVar, b []v1.EnvVar) []v1.EnvVar {
for _, bb := range b {
found := false
for _, aa := range a {
if aa.Name == bb.Name {
aa.Value = bb.Value
found = true
break
}
}
if !found {
a = append(a, bb)
}
}
return a
} |
// Split the string on : which will leave the repo and tag
imageStrings := strings.Split(image, ":")
|
normalizer.go | /*
Copyright 2019 The Vitess Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package sqlparser
import (
"vitess.io/vitess/go/sqltypes"
querypb "vitess.io/vitess/go/vt/proto/query"
)
// BindVars is a set of reserved bind variables from a SQL statement
type BindVars map[string]struct{}
// Normalize changes the statement to use bind values, and
// updates the bind vars to those values. The supplied prefix
// is used to generate the bind var names. The function ensures
// that there are no collisions with existing bind vars.
// Within Select constructs, bind vars are deduped. This allows
// us to identify vindex equality. Otherwise, every value is
// treated as distinct.
func Normalize(stmt Statement, reserved *ReservedVars, bindVars map[string]*querypb.BindVariable) error {
nz := newNormalizer(reserved, bindVars)
_ = Rewrite(stmt, nz.WalkStatement, nil)
return nz.err
}
type normalizer struct {
bindVars map[string]*querypb.BindVariable
reserved *ReservedVars
vals map[string]string
err error
}
func | (reserved *ReservedVars, bindVars map[string]*querypb.BindVariable) *normalizer {
return &normalizer{
bindVars: bindVars,
reserved: reserved,
vals: make(map[string]string),
}
}
// WalkStatement is the top level walk function.
// If it encounters a Select, it switches to a mode
// where variables are deduped.
func (nz *normalizer) WalkStatement(cursor *Cursor) bool {
switch node := cursor.Node().(type) {
// no need to normalize the statement types
case *Set, *Show, *Begin, *Commit, *Rollback, *Savepoint, *SetTransaction, DDLStatement, *SRollback, *Release, *OtherAdmin, *OtherRead:
return false
case *Select:
_ = Rewrite(node, nz.WalkSelect, nil)
// Don't continue
return false
case *Literal:
nz.convertLiteral(node, cursor)
case *ComparisonExpr:
nz.convertComparison(node)
case *ColName, TableName:
// Common node types that never contain Literal or ListArgs but create a lot of object
// allocations.
return false
case *ConvertType: // we should not rewrite the type description
return false
}
return nz.err == nil // only continue if we haven't found any errors
}
// WalkSelect normalizes the AST in Select mode.
func (nz *normalizer) WalkSelect(cursor *Cursor) bool {
switch node := cursor.Node().(type) {
case *Literal:
nz.convertLiteralDedup(node, cursor)
case *ComparisonExpr:
nz.convertComparison(node)
case *ColName, TableName:
// Common node types that never contain Literals or ListArgs but create a lot of object
// allocations.
return false
case OrderBy, GroupBy:
// do not make a bind var for order by column_position
return false
case *ConvertType:
// we should not rewrite the type description
return false
}
return nz.err == nil // only continue if we haven't found any errors
}
func (nz *normalizer) convertLiteralDedup(node *Literal, cursor *Cursor) {
// If value is too long, don't dedup.
// Such values are most likely not for vindexes.
// We save a lot of CPU because we avoid building
// the key for them.
if len(node.Val) > 256 {
nz.convertLiteral(node, cursor)
return
}
// Make the bindvar
bval := nz.sqlToBindvar(node)
if bval == nil {
return
}
// Check if there's a bindvar for that value already.
var key string
if bval.Type == sqltypes.VarBinary {
// Prefixing strings with "'" ensures that a string
// and number that have the same representation don't
// collide.
key = "'" + node.Val
} else {
key = node.Val
}
bvname, ok := nz.vals[key]
if !ok {
// If there's no such bindvar, make a new one.
bvname = nz.reserved.nextUnusedVar()
nz.vals[key] = bvname
nz.bindVars[bvname] = bval
}
// Modify the AST node to a bindvar.
cursor.Replace(NewArgument(bvname))
}
// convertLiteral converts an Literal without the dedup.
func (nz *normalizer) convertLiteral(node *Literal, cursor *Cursor) {
bval := nz.sqlToBindvar(node)
if bval == nil {
return
}
bvname := nz.reserved.nextUnusedVar()
nz.bindVars[bvname] = bval
cursor.Replace(NewArgument(bvname))
}
// convertComparison attempts to convert IN clauses to
// use the list bind var construct. If it fails, it returns
// with no change made. The walk function will then continue
// and iterate on converting each individual value into separate
// bind vars.
func (nz *normalizer) convertComparison(node *ComparisonExpr) {
if node.Operator != InOp && node.Operator != NotInOp {
return
}
tupleVals, ok := node.Right.(ValTuple)
if !ok {
return
}
// The RHS is a tuple of values.
// Make a list bindvar.
bvals := &querypb.BindVariable{
Type: querypb.Type_TUPLE,
}
for _, val := range tupleVals {
bval := nz.sqlToBindvar(val)
if bval == nil {
return
}
bvals.Values = append(bvals.Values, &querypb.Value{
Type: bval.Type,
Value: bval.Value,
})
}
bvname := nz.reserved.nextUnusedVar()
nz.bindVars[bvname] = bvals
// Modify RHS to be a list bindvar.
node.Right = ListArg(bvname)
}
func (nz *normalizer) sqlToBindvar(node SQLNode) *querypb.BindVariable {
if node, ok := node.(*Literal); ok {
var v sqltypes.Value
var err error
switch node.Type {
case StrVal:
v, err = sqltypes.NewValue(sqltypes.VarBinary, node.Bytes())
case IntVal:
v, err = sqltypes.NewValue(sqltypes.Int64, node.Bytes())
case FloatVal:
v, err = sqltypes.NewValue(sqltypes.Float64, node.Bytes())
case HexNum:
v, err = sqltypes.NewValue(sqltypes.HexNum, node.Bytes())
case HexVal:
// We parse the `x'7b7d'` string literal into a hex encoded string of `7b7d` in the parser
// We need to re-encode it back to the original MySQL query format before passing it on as a bindvar value to MySQL
var vbytes []byte
vbytes, err = node.encodeHexValToMySQLQueryFormat()
if err != nil {
return nil
}
v, err = sqltypes.NewValue(sqltypes.HexVal, vbytes)
default:
return nil
}
if err != nil {
return nil
}
return sqltypes.ValueBindVariable(v)
}
return nil
}
// GetBindvars returns a map of the bind vars referenced in the statement.
func GetBindvars(stmt Statement) map[string]struct{} {
bindvars := make(map[string]struct{})
_ = Walk(func(node SQLNode) (kontinue bool, err error) {
switch node := node.(type) {
case *ColName, TableName:
// Common node types that never contain expressions but create a lot of object
// allocations.
return false, nil
case Argument:
bindvars[string(node)] = struct{}{}
case ListArg:
bindvars[string(node)] = struct{}{}
}
return true, nil
}, stmt)
return bindvars
}
| newNormalizer |
milestone.rs | // Copyright 2020-2022 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0
use crate::{
types::metrics::NodeMetrics,
workers::{
packets::{MessagePacket, MilestoneRequestPacket},
peer::PeerManager,
sender::Sender,
storage::StorageBackend,
MetricsWorker, PeerManagerResWorker,
},
};
use bee_gossip::PeerId;
use bee_runtime::{node::Node, shutdown_stream::ShutdownStream, worker::Worker};
use bee_tangle::{Tangle, TangleWorker};
use async_trait::async_trait;
use futures::stream::StreamExt;
use log::info;
use packable::PackableExt;
use tokio::sync::mpsc::{self, UnboundedSender};
use tokio_stream::wrappers::UnboundedReceiverStream;
use std::{any::TypeId, convert::Infallible};
pub(crate) struct MilestoneResponderWorkerEvent {
pub(crate) peer_id: PeerId,
pub(crate) request: MilestoneRequestPacket,
}
pub(crate) struct MilestoneResponderWorker {
pub(crate) tx: UnboundedSender<MilestoneResponderWorkerEvent>,
}
#[async_trait]
impl<N: Node> Worker<N> for MilestoneResponderWorker
where
N::Backend: StorageBackend,
{
type Config = ();
type Error = Infallible;
fn dependencies() -> &'static [TypeId] {
vec![
TypeId::of::<TangleWorker>(),
TypeId::of::<MetricsWorker>(),
TypeId::of::<PeerManagerResWorker>(),
]
.leak()
}
async fn start(node: &mut N, _config: Self::Config) -> Result<Self, Self::Error> {
let (tx, rx) = mpsc::unbounded_channel();
let tangle = node.resource::<Tangle<N::Backend>>();
let metrics = node.resource::<NodeMetrics>();
let peer_manager = node.resource::<PeerManager>();
node.spawn::<Self, _, _>(|shutdown| async move {
info!("Running.");
let mut receiver = ShutdownStream::new(shutdown, UnboundedReceiverStream::new(rx)); | } else {
request.index.into()
};
if let Some(message) = tangle.get_milestone_message(index).await {
Sender::<MessagePacket>::send(
&MessagePacket::new(message.pack_to_vec()),
&peer_id,
&peer_manager,
&metrics,
);
}
}
info!("Stopped.");
});
Ok(Self { tx })
}
} |
while let Some(MilestoneResponderWorkerEvent { peer_id, request }) = receiver.next().await {
let index = if request.index == 0 {
tangle.get_latest_milestone_index() |
index.js | import { syntax } from 'micromark-extension-wiki-link'
import { fromMarkdown, toMarkdown } from 'mdast-util-wiki-link'
let warningIssued
function | (opts = {}) {
const data = this.data()
function add (field, value) {
if (data[field]) data[field].push(value)
else data[field] = [value]
}
if (!warningIssued &&
((this.Parser &&
this.Parser.prototype &&
this.Parser.prototype.blockTokenizers) ||
(this.Compiler &&
this.Compiler.prototype &&
this.Compiler.prototype.visitors))) {
warningIssued = true
console.warn(
'[remark-wiki-link] Warning: please upgrade to remark 13 to use this plugin'
)
}
add('micromarkExtensions', syntax(opts))
add('fromMarkdownExtensions', fromMarkdown(opts))
add('toMarkdownExtensions', toMarkdown(opts))
}
export { wikiLinkPlugin }
| wikiLinkPlugin |
main.fece870af48b381a14c7.bundle.js | (window.webpackJsonp=window.webpackJsonp||[]).push([[3],Array(66).concat([function(e,t,n){var o=n(181);"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);(0,n(1).default)("273cf01e",o,!0,{})},function(e,t,n){var o=n(182);"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);(0,n(1).default)("1163a35a",o,!0,{})},function(e,t,n){var o=n(183);"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);(0,n(1).default)("7ba18ca7",o,!0,{})},function(e,t,n){var o=n(184);"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);(0,n(1).default)("8fb9d3e8",o,!0,{})},function(e,t,n){var o=n(194);"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);(0,n(1).default)("3f01c979",o,!0,{})},function(e,t,n){var o=n(196);"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);(0,n(1).default)("130cb804",o,!0,{})},function(e,t,n){var o=n(197);"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);(0,n(1).default)("7792f7d2",o,!0,{})},function(e,t,n){var o=n(198);"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);(0,n(1).default)("85564e84",o,!0,{})},function(e,t,n){var o=n(199);"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);(0,n(1).default)("f35b2042",o,!0,{})},function(e,t,n){var o=n(201);"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);(0,n(1).default)("541a0784",o,!0,{})},function(e,t,n){var o=n(203);"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);(0,n(1).default)("c2a200da",o,!0,{})},function(e,t,n){var o=n(204);"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);(0,n(1).default)("0144a0fc",o,!0,{})},function(e,t,n){var o=n(206);"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);(0,n(1).default)("6e184ce8",o,!0,{})},function(e,t,n){var o=n(208);"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);(0,n(1).default)("083c3847",o,!0,{})},function(e,t,n){var o=n(210);"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);(0,n(1).default)("4f793afa",o,!0,{})},function(e,t,n){var o=n(212);"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);(0,n(1).default)("5eb4acdc",o,!0,{})},function(e,t,n){var o=n(214);"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);(0,n(1).default)("fd3923ea",o,!0,{})},function(e,t,n){var o=n(216);"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);(0,n(1).default)("9eb507c6",o,!0,{})},function(e,t,n){var o=n(218);"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);(0,n(1).default)("618cd244",o,!0,{})},function(e,t,n){var o=n(220);"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);(0,n(1).default)("48c9f087",o,!0,{})},function(e,t,n){var o=n(222);"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);(0,n(1).default)("5d23e4d2",o,!0,{})},function(e,t,n){var o=n(224);"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);(0,n(1).default)("afaeca94",o,!0,{})},function(e,t,n){var o=n(226);"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);(0,n(1).default)("3224b338",o,!0,{})},function(e,t,n){var o=n(228);"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);(0,n(1).default)("8b948152",o,!0,{})},function(e,t,n){var o=n(230);"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);(0,n(1).default)("1ca5f5cc",o,!0,{})},function(e,t,n){var o=n(232);"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);(0,n(1).default)("0fd03e46",o,!0,{})},function(e,t,n){var o=n(234);"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);(0,n(1).default)("dbcec8da",o,!0,{})},function(e,t,n){var o=n(235);"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);(0,n(1).default)("6fa07ffc",o,!0,{})},function(e,t,n){var o=n(237);"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);(0,n(1).default)("ffd5f510",o,!0,{})},function(e,t,n){var o=n(239);"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);(0,n(1).default)("1dd98543",o,!0,{})},function(e,t,n){var o=n(241);"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);(0,n(1).default)("739f10dc",o,!0,{})},function(e,t,n){var o=n(312);"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);(0,n(1).default)("25a04506",o,!0,{})},function(e,t,n){var o=n(317);"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);(0,n(1).default)("fb5e49c6",o,!0,{})},function(e,t,n){var o=n(326);"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);(0,n(1).default)("59715291",o,!0,{})},function(e,t,n){var o=n(328);"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);(0,n(1).default)("7a839c58",o,!0,{})},function(e,t,n){var o=n(330);"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);(0,n(1).default)("481c3f0c",o,!0,{})},,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.r(t);var o=n(14),i=n.n(o),a={name:"triple-node",components:{"node-tree":function(){return Promise.resolve().then(n.bind(null,127))}},methods:{replaceBrackets:function(e){return i.a.isString(e)?e.replace(/</g,"〈").replace(/>/g,"〉"):e}},computed:{bothLeftAndRightChildrenAreLeaves:function(){return this.isLeftChildALeaf&&this.isRightChildALeaf},isLeftChildALeaf:function(){return i.a.isString(this.leftNode)},isRightChildALeaf:function(){return i.a.isString(this.rightNode)},hasOnlyChild:function(){return void 0!==this.onlyChildNode},isOnlyChildALeaf:function(){return i.a.isString(this.onlyChildNode)}},props:{left:null,right:null,onlyChild:{type:null,default:void 0},parent:{type:String,required:!0}},data:function(){return{leftNode:this.left,rightNode:this.right,onlyChildNode:this.onlyChild,parentNode:this.parent}}},s=(n(227),n(0)),r={name:"node-tree",components:{"triple-node":Object(s.a)(a,function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"triple-node"},[n("div",{staticClass:"triple-node__parent",domProps:{innerHTML:e._s(e.replaceBrackets(e.parent))}}),e._v(" "),n("div",{staticClass:"triple-node__arrows",class:{"triple-node__arrows--only-child":e.hasOnlyChild}},[e.hasOnlyChild?[e._m(0)]:[e._m(1),e._v(" "),e._m(2)]],2),e._v(" "),n("div",{staticClass:"triple-node__children"},[e.hasOnlyChild?[e.isOnlyChildALeaf?[n("div",{staticClass:"triple-node__only-child"},[e._v(e._s(e.onlyChildNode))])]:[n("div",{staticClass:"triple-node__only-child"},[n("node-tree",{attrs:{root:e.onlyChildNode}})],1)]]:[e.bothLeftAndRightChildrenAreLeaves?[n("div",{staticClass:"triple-node__left-child",domProps:{innerHTML:e._s(e.replaceBrackets(e.leftNode))}}),e._v(" "),n("div",{staticClass:"triple-node__right-child",domProps:{innerHTML:e._s(e.replaceBrackets(e.rightNode))}})]:[e.isLeftChildALeaf?[n("div",{staticClass:"triple-node__left-child",domProps:{innerHTML:e._s(e.replaceBrackets(e.leftNode))}}),e._v(" "),n("div",{staticClass:"triple-node__right-child"},[n("node-tree",{attrs:{root:e.rightNode}})],1)]:[n("div",{staticClass:"triple-node__left-child"},[n("node-tree",{attrs:{root:e.leftNode}})],1),e._v(" "),n("div",{staticClass:"triple-node__right-child",domProps:{innerHTML:e._s(e.replaceBrackets(e.rightNode))}})]]]],2)])},[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"triple-node__arrow"},[t("div",{staticClass:"triple-node__arrow-edge"})])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"triple-node__left-arrow"},[t("div",{staticClass:"triple-node__left-arrow-edge"}),this._v(" "),t("div",{staticClass:"triple-node__left-arrow-tip"})])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"triple-node__right-arrow"},[t("div",{staticClass:"triple-node__right-arrow-edge"}),this._v(" "),t("div",{staticClass:"triple-node__right-arrow-tip"})])}],!1,null,"4d8249b6",null).exports},props:{root:{type:Object},isTreeRoot:{type:Boolean,default:!1}}},l=(n(225),Object(s.a)(r,function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"node-tree__container"},[e.isTreeRoot?n("div",{staticClass:"node-tree__edge-container"},[n("div",{staticClass:"node-tree__edge node-tree__edge--top"})]):e._e(),e._v(" "),n("div",{staticClass:"node-tree",class:{"node-tree__root":e.isTreeRoot}},e._l(e.root,function(e,t){return n("triple-node",{key:e.parent,attrs:{left:e.left,right:e.right,onlyChild:e.onlyChild,parent:t}})})),e._v(" "),e.isTreeRoot?n("div",{staticClass:"node-tree__edge-container"},[n("div",{staticClass:"node-tree__edge node-tree__edge--bottom"}),e._v(" "),n("div",{staticClass:"node-tree__tip"})]):e._e()])},[],!1,null,"0108d572",null));t.default=l.exports},function(e,t,n){"use strict";var o=n(66),i=n.n(o);t.default=i.a},function(e,t,n){"use strict";var o=n(67),i=n.n(o);t.default=i.a},function(e,t,n){"use strict";var o=n(68),i=n.n(o);t.default=i.a},function(e,t,n){"use strict";var o=n(71),i=n.n(o);t.default=i.a},function(e,t,n){"use strict";var o=n(72),i=n.n(o);t.default=i.a},function(e,t,n){"use strict";var o=n(73),i=n.n(o);t.default=i.a},function(e,t,n){"use strict";var o=n(76),i=n.n(o);t.default=i.a},function(e,t,n){"use strict";var o=n(92),i=n.n(o);t.default=i.a},function(e,t,n){"use strict";var o=n(97),i=n.n(o);t.default=i.a},function(e,t){},function(e,t){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e){e.exports={name:"compilers-principles-techniques-and-tools",license:"MIT",scripts:{distribute:"make distribute",lint:"make lint","start:dev":"make start-dev",stats:"make stats"},devDependencies:{"@babel/core":"^7.0.0-beta.53","@babel/plugin-syntax-jsx":"^7.0.0-beta.54","@babel/plugin-transform-runtime":"^7.0.0-beta.53","@babel/preset-env":"^7.0.0-beta.54","@babel/preset-stage-2":"^7.0.0-beta.53","@babel/runtime":"^7.0.0-beta.53","animate.css":"^3.6.1","assets-webpack-plugin":"^3.8.4","babel-eslint":"^8.2.6","babel-helper-vue-jsx-merge-props":"^2.0.3","babel-loader":"^8.0.0-beta","css-loader":"^1.0.0",cssnano:"^4.0.3",eslint:"^4.14.0","eslint-config-airbnb-base":"13.0.0","eslint-loader":"^2.0.0","eslint-plugin-import":"^2.13.0","eslint-plugin-vue":"^4.5.0","html-webpack-plugin":"^3.2.0","mini-css-extract-plugin":"^0.4.1","node-sass":"^4.9.2","optimize-css-assets-webpack-plugin":"^5.0.0","postcss-import":"^11.1.0","postcss-loader":"^2.1.6","postcss-preset-env":"^5.2.2","postcss-scss":"^2.0.0","sass-loader":"^7.0.3","script-ext-html-webpack-plugin":"^2.0.1","uglifyjs-webpack-plugin":"^1.2.7","vue-eslint-parser":"2.0.3","vue-loader":"^15.2.4","vue-template-compiler":"^2.5.16",webpack:"^4.16.0","webpack-cli":"^3.1.0","webpack-manifest-plugin":"^2.0.3","webpack-serve":"^2.0.2"},dependencies:{"@fortawesome/fontawesome-svg-core":"^1.2.1","@fortawesome/free-solid-svg-icons":"^5.1.1","@fortawesome/vue-fontawesome":"^0.1.1",antlr4:"^4.7.1","automata.js":"^0.2.1","babel-plugin-syntax-jsx":"^6.18.0","babel-plugin-transform-vue-jsx":"^3.7.0",hoek:"4.2.1",lodash:"^4.17.10","node-uuid":"^1.4.8","raven-js":"^3.26.4","simple-xpath-position":"^2.0.2",uuid:"^3.3.2","viz.js":"^2.0.0",vue:"^2.5.16","vue-clipboards":"^1.2.4","vue-notification":"^1.3.12","vue-router":"^3.0.1","vue-shortkey":"^3.1.6",vuex:"^3.0.1"}}},,,,,,,,function(e,t,n){"use strict";n.r(t);var o=n(103),i=n(6),a=n(42),s=n(49),r=n(178),l=n(177),c=n.n(l),p=n(176),u=n(48),m=n.n(u),d=n(175),h=n.n(d),f={name:"app"},g=n(0),A=Object(g.a)(f,function(){var e=this.$createElement;return(this._self._c||e)("router-view")},[],!1,null,null,null).exports,v=n(9),_=n.n(v),y=n(30),b=n.n(y),x={name:"paragraph",methods:{getClasses:function(){var e={paragraph:!0};return"left"!==this.align&&(e["paragraph--align-"+this.align]=!0),e}},props:{align:{type:String,default:"left"}}},C=(n(331),Object(g.a)(x,function(){var e=this.$createElement;return(this._self._c||e)("p",{class:this.getClasses()},[this._t("default")],2)},[],!1,null,"dcef856c",null).exports),w={name:"browsable-link",props:{href:{type:String,required:!0}}},B=(n(329),Object(g.a)(w,function(){var e=this.$createElement;return(this._self._c||e)("a",{staticClass:"link",attrs:{href:this.href}},[this._t("default")],2)},[],!1,null,"13b875c3",null).exports),j=new i.default,k={name:"input-area",mounted:function(){j.$on("parsing.failed",this.highlightInputError),j.$on("parsing.succeeded",this.fixedInput)},computed:{getInputStatusClasses:function(){var e={"input-area__textarea":!0};return e["input-area__textarea--error"]=this.error,e}},methods:{getInputValue:function(){this.inputValue=this.$refs.input.value,j.$emit("source.changed",{text:this.inputValue})},highlightInputError:function(){this.error=!0},fixedInput:function(e){this.error=!1,void 0!==this.$refs.input&&(this.text=b()(e.parsedJson),this.$refs.input.value=this.text)}},props:{textAtFirst:{type:String,default:""}},data:function(){return{json:{},error:!1,text:this.textAtFirst}}},D=(n(327),Object(g.a)(k,function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("fieldset",{staticClass:"input-area"},[n("textarea",{directives:[{name:"model",rawName:"v-model",value:e.text,expression:"text"}],ref:"input",class:e.getInputStatusClasses,domProps:{value:e.text},on:{change:e.getInputValue,input:function(t){t.target.composing||(e.text=t.target.value)}}})])},[],!1,null,"277f45c1",null).exports),T=n(14),M=n.n(T),E={state:{productionMode:!1,tableOfContentsIsVisible:!1,template:'<div class="json__container"></div>',json:"{}",noPendingCopy:!0,log:function(e,t,n){m.a.captureMessage(e,{level:"info",logger:t,extra:n})},error:function(e,t){m.a.captureException(e,{logger:t})}}},S=n(47),O=n.n(S),N={name:"fragment-transition",props:{isVisibleAtFirst:{type:Boolean,default:!0}},data:function(){return{dataVisible:this.isVisibleAtFirst}}},I=Object(g.a)(N,function(){var e=this.$createElement,t=this._self._c||e;return t("transition",{attrs:{mode:"in-out",name:"custom-classes-transition","enter-active-class":"transition animated fadeInLeftBig","leave-active-class":"transition animated hinge"}},[this.dataVisible?t("div",[this._t("default")],2):this._e()])},[],!1,null,null,null).exports,R="commitValue",U="makeContentNonEditable",q="setPreviousValue",z="setNextValue",L="startEditingContent",$="trackNode",P=n(174),F=n.n(P),H={pair:"5c9bb8c4-9038-11e8-b7d5-28cfe915048b",value:"19ab8504-9118-11e8-a231-28cfe915048b"},Y={undeclared:null,value:"json-value",pair:"json-pair"},V={data:function(){return{isEditable:!1,isEdited:!1,isVisible:!0,noPendingCopy:E.state.noPendingCopy,sharedState:E.state,nodeType:Y.undeclared}},methods:{toggleVisibility:M.a.debounce(function(){if(!this.isEdited){var e={element:this.$refs[this.uuid],uuid:this.uuid};this.isVisible?this.isVisible&&j.$emit("node.shown",e):j.$emit("node.hidden",e)}},500),getNodeTypes:function(){return Y},getNodeType:function(){return this.nodeType},isValueNode:function(){return this.nodeType===Y.value},isPairNode:function(){return this.nodeType===Y.pair}},computed:{isShown:function(){return this.isEditable||this.isVisible||!this.sharedState.noPendingCopy},uuid:function(){var e=H.pair,t=F()("".concat(this._uid),e);return j.$emit("node.registered",{component:this,uuidAttribute:t}),t},getIconName:function(){return this.isVisible?"eye-slash":"eye"}}},W={NODE_TYPES:Y,Editable:V},J=n(22),G=Object(J.a)("json-editor"),Q=G.mapGetters,X=(G.mapActions,G.mapMutations),K={name:"json-value",components:{FragmentTransition:I},mixins:[O()({},W.Editable)],props:{isArrayItem:{type:Boolean,default:!1}},updated:function(){this.$nextTick(function(){this.hasText&&!this.isEditable&&(this.$slots.default[0]=this.text,this.$el.innerText=this.text,this.$el.innerHtml=this.text)})},methods:_()({},X([q,z]),{makeContentEditable:function(){this.hasNoText||this.isNodeWithUuidBeingEdited(this.uuid)||j.$emit("node.made_editable",{nodeUuid:this.uuid})},makeContentNonEditable:function(){this.isNodeWithUuidBeingEdited(this.uuid)&&j.$emit("node.made_non_editable",{nodeUuid:this.uuid})}}),data:function(){var e;return void 0!==this.$slots.default&&"undefined"!==this.$slots.default[0]&&(e=this.$slots.default[0].text),{text:e,nodeType:this.getNodeTypes().value}},computed:_()({},Q(["isNodeWithUuidBeingEdited"]),{hasText:function(){return void 0!==this.text&&this.text.trim().length>0},hasNoText:function(){return!this.hasText},classes:function(){var e="";"false"!==this.text&&"true"!==this.text||(e=" json__value--boolean");var t="";return"null"===this.text&&(t=" json__value--null"),"".concat("json__value json__value--editable").concat(e).concat(t)}})},Z=Object(g.a)(K,function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.isArrayItem?n("fragment-transition",[n("span",{staticClass:"json__value--array-item"},[n("span",{class:e.classes},[e._t("default")],2),e._v(" "),n("span",{staticClass:"json__comma"},[e._v(",")])])]):n("span",{ref:e.uuid,class:e.classes,attrs:{"data-edited":e.isEdited,"data-uuid":e.uuid},on:{click:e.makeContentEditable,keyup:function(t){return"button"in t||!e._k(t.keyCode,"esc",27,t.key,"Escape")?e.makeContentNonEditable(t):null},key:e.makeContentNonEditable}},[e._t("default")],2)},[],!1,null,null,null).exports,ee={name:"json-pair",mixins:[O()({},W.Editable)],components:{FragmentTransition:I},props:{isFirstChildArray:{type:Boolean,default:!1},isFirstChildObject:{type:Boolean,default:!1},isArrayOrObject:{type:Boolean,default:!1}},data:function(){return{text:"",nodeType:this.getNodeTypes().value}},computed:{classes:function(){var e="";this.isFirstChildObject&&(e=" json__pair--object");var t="";this.isFirstChildArray&&(t=" json__pair--array");var n="";this.isArrayOrObject||(n=" json__pair--no-children");var o="";return this.noPendingCopy||(o=" hide"),"json__pair".concat(e).concat(t).concat(n).concat(o)}}},te=Object(g.a)(ee,function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.isShown?n("fragment-transition",[e.isShown?n("transition",{attrs:{name:"custom-classes-transition",mode:"in-out","enter-active-class":"animated fadeInLeftBig","leave-active-class":"animated hinge"}},[e.isShown?n("span",{ref:e.uuid,class:e.classes,attrs:{"data-uuid":e.uuid,"data-editable":e.isEditable}},[n("span",{staticClass:"json__key-value"},[n("span",{staticClass:"json__key"},[e._t("key")],2),e._v(" "),n("span",{staticClass:"json__colon"},[e._t("colon")],2)]),e._v(" "),e._t("value"),e._v(" "),n("span",{staticClass:"json__comma"},[e._v(",")])],2):e._e()]):e._e(),e._v(" "),!e.isArrayOrObject&&e.isShown?n("button",{staticClass:"json__pair---button",on:{click:e.toggleVisibility}},[n("font-awesome-icon",{staticClass:"json__pair---button-icon",attrs:{icon:e.getIconName}})],1):e._e()],1):e._e()},[],!1,null,null,null).exports,ne={name:"json-array",props:{hasChildren:{type:Boolean,default:!1}}},oe=Object(g.a)(ne,function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"json__array-container",class:{"json__array-container--empty":!e.hasChildren}},[n("span",{staticClass:"json__square-bracket json__square-bracket--left"},[e._v("[")]),e._v(" "),e.hasChildren?n("span",{staticClass:"json__array"},[e._t("default")],2):e._e(),e._v(" "),n("span",{staticClass:"json__square-bracket json__square-bracket--right"},[e._v("]")])])},[],!1,null,null,null).exports,ie={name:"json-object",props:{hasChildren:{type:Boolean,default:!1}}},ae=Object(g.a)(ie,function(){var e=this.$createElement,t=this._self._c||e;return t("span",{staticClass:"json__object-container"},[t("span",{staticClass:"json__parentheses json__parentheses--left"},[this._v("{")]),this._v(" "),this.hasChildren?t("span",{staticClass:"json__object"},[this._t("default")],2):this._e(),this._v(" "),t("span",{staticClass:"json__parentheses json__parentheses--right"},[this._v("}")])])},[],!1,null,null,null).exports,se={name:"json",props:{isEditable:{type:Boolean,default:!1},template:{type:String,default:function(){return E.state.template}},json:{type:String,default:function(){return E.state.json}},dynamic:{type:Boolean,default:!1}},methods:{compileJsonTemplate:function(e){return i.default.compile(e)}},render:function(e){if(this.dynamic){var t=this.compileJsonTemplate(this.sharedState.template),n={name:"editableJson",components:{JsonValue:Z,JsonPair:te,JsonArray:oe,JsonObject:ae},data:function(){return{sharedState:E}},render:t.render,staticRenderFns:t.staticRenderFns},o=e(n,{class:"content"},[E.template]),i=O()({},n);i.name="dynamicJson";var a=e(i,{class:"content"},[E.template]);return e("div",{class:"json__panels"},[e("div",{class:"editable-json",ref:"editable-json"},[o]),e("div",{class:"dynamic-json",ref:"dynamic-json"},[a])])}var s=[];return this.dynamic||"undefined"===this.$slots.default||void 0===this.$slots.default[0]||s.push(this.$slots.default[0]),s.push(e("input",{attr:{value:E.json},domProps:{type:"hidden",value:E.json}})),e("div",{class:"json__container",ref:"parent"},s)},data:function(){return{sharedState:E.state}}},re=(n(318),Object(g.a)(se,void 0,void 0,!1,null,null,null).exports),le="saveValue",ce=Object(J.a)("json-editor"),pe=ce.mapActions,ue=ce.mapGetters,me=ce.mapMutations,de=n(316),he={name:"json-editor",components:{Json:re},props:{editor:{type:String,default:"json"},json:{type:String,default:function(){return E.state.json}}},methods:_()({},pe([le]),me([L,$]),{setJson:function(e){this.sharedState.json=e},setJsonTemplate:function(e){this.sharedState.template=e},registerNode:function(e){var t=e.component,n=e.uuidAttribute;this.$refs[n]=t,this.$nextTick(function(){var e=t.$el;if(void 0!==e){var o=this.locateTwinOf(e,n).twinVNode,i={uuid:n,value:t.text,nodeType:t.getNodeType(),twinUuid:o};i.nodeType===W.NODE_TYPES.value&&this.trackNode(i)}})},locateTwinOf:function(e,t){var n,o;if(e.hasAttribute("data-uuid")||(e=e.querySelector("[data-uuid]")),e.getAttribute("data-uuid")in this.editableToDynamic)return{elementVNode:this.$refs[e.getAttribute("data-uuid")],twinVNode:this.$refs[this.editableToDynamic[e.getAttribute("data-uuid")]]};try{n=de.fromNode(e,this.$el.querySelector(".editable-json")),o=de.toNode(n,this.$el.querySelector(".dynamic-json"))}catch(e){return this.sharedState.error(e,"json-editor"),{elementVNode:null,twinMode:null}}var i={elementVNode:this.$refs[e.getAttribute("data-uuid")],twinVNode:this.$refs[o.getAttribute("data-uuid")]};return!i.elementVNode.isVisible||i.elementVNode.uuid in this.editableToDynamic||(i.elementVNode.isEditable=!0,this.editableToDynamic[i.elementVNode.uuid]=i.twinVNode.uuid,this.dynamicToEditable[i.twinVNode.uuid]=i.elementVNode.uuid),i},componentWithUuid:function(e){return this.$refs[e]},toggleNodeVisibility:function(e){var t=e.element,n=e.uuid,o=this.locateTwinOf(t,n),i=o.twinVNode,a=o.elementVNode;a.isEditable=!0,a.isVisible=!a.isVisible,i.isVisible=!i.isVisible,j.$emit("node.altered")},toggleNodeEdition:function(e){var t=e.nodeUuid,n=this.componentWithUuid(t);if(void 0!==n&&!n.edited){var o;if(this.isNodeWithUuidBeingEdited()(t)){0===n.$el.innerText.trim().length&&(n.$el.innerText="null");var i="".concat(n.$el.innerText.trim());n.isEdited=!1,n.text=i,n.$el.removeAttribute("contenteditable"),n.$el.classList.remove("json__value--edited"),n.$el.innerText=i,n.$el.innerHtml=i,n.$slots.default[0]=i,this.saveValue({uuid:t,value:i});var a=this.$refs[this.editableToDynamic[t]];return a.text=i,a.$slots.default[0]=i,a.$el.innerHtml=i,void(a.$el.innerText=i)}this.startEditingContent({uuid:t}),n.isEdited=!0,n.$el.setAttribute("contenteditable",!0),n.$el.classList.add("json__value--edited"),o=n.$el.innerText,n.$el.innerText=o,n.$el.focus()}}}),mounted:function(){j.$on("node.shown",this.toggleNodeVisibility),j.$on("node.hidden",this.toggleNodeVisibility),j.$on("node.registered",this.registerNode),j.$on("node.made_editable",this.toggleNodeEdition),j.$on("node.made_non_editable",this.toggleNodeEdition),this.$nextTick(function(){void 0!==this.$refs["json-editor"]&&void 0!==this.$refs["json-editor"].$refs["editable-json"]&&this.$refs["json-editor"].$refs["editable-json"].classList.add("editable-json--ready")})},data:function(){return _()({},ue(["isNodeWithUuidBeingEdited","valueOfNodeWithUuid","nodeWithUuid"]),{sharedState:E.state,dynamicToEditable:{},editableToDynamic:{}})}},fe=n(136);var ge=Object(g.a)(he,function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"json-editor"},[t("json",{attrs:{isEditable:""}},[t("keep-alive",[t(this.editor,{ref:"json-editor",tag:"component",attrs:{dynamic:""}})],1)],1),this._v(" "),this._t("read-only")],2)},[],!1,function(e){this.$style=fe.default.locals||fe.default},null,null).exports,Ae=n(40),ve=n.n(Ae),_e=n(12),ye=n.n(_e),be=n(7),xe=n.n(be),Ce=n(24),we=n.n(Ce),Be=n(21),je=n.n(Be),ke=n(13),De=n.n(ke),Te=n(20),Me=n.n(Te),Ee=n(126),Se=n.n(Ee),Oe=n(102),Ne=n.n(Oe),Ie=function(e){function t(e,n,o,i){var a;return xe()(this,t),a=je()(this,De()(t).call(this,e,n,o)),void 0!==i&&(a.previous=i,a.stack="".concat(i.stack,"\n\n").concat(a.stack)),a}return Me()(t,e),t}(Ne()(SyntaxError)),Re=function(e){function t(){return xe()(this,t),je()(this,De()(t).apply(this,arguments))}return Me()(t,e),we()(t,null,[{key:"syntaxError",value:function(e,t,n,o,i){throw new Ie("line ".concat(n,": ").concat(o," ").concat(i))}}]),t}(Se.a.ErrorListener),Ue=n(40),qe=["\x03\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964","\x02\x0e\x82\b\x01\x04\x02\t\x02\x04\x03\t\x03\x04","\x04\t\x04\x04\x05\t\x05\x04\x06\t\x06\x04\x07\t","\x07\x04\b\t\b\x04\t\t\t\x04\n\t\n\x04\v\t\v\x04","\f\t\f\x04\r\t\r\x04\x0e\t\x0e\x04\x0f\t\x0f\x04\x10","\t\x10\x04\x11\t\x11\x04\x12\t\x12\x04\x13\t\x13","\x03\x02\x03\x02\x03\x03\x03\x03\x03\x04\x03\x04","\x03\x05\x03\x05\x03\x06\x03\x06\x03\x07\x03\x07","\x03\b\x03\b\x03\b\x03\b\x03\b\x03\t\x03\t\x03\t\x03","\t\x03\t\x03\t\x03\n\x03\n\x03\n\x03\n\x03\n\x03\v","\x03\v\x03\v\x07\vG\n\v\f\v\x0e\vJ\v","\v\x03\v\x03\v\x03\f\x03\f\x03\f\x05\fQ\n\f","\x03\r\x03\r\x03\r\x03\r\x03\r\x03\r\x03\x0e\x03\x0e","\x03\x0f\x03\x0f\x03\x10\x05\x10^\n\x10\x03\x10","\x03\x10\x03\x10\x06\x10c\n\x10\r\x10\x0e\x10d\x05","\x10g\n\x10\x03\x10\x05\x10j\n\x10\x03\x11\x03\x11","\x03\x11\x07\x11o\n\x11\f\x11\x0e\x11r\v\x11\x05","\x11t\n\x11\x03\x12\x03\x12\x05\x12x\n\x12\x03\x12","\x03\x12\x03\x13\x06\x13}\n\x13\r\x13\x0e\x13~\x03","\x13\x03\x13\x02\x02\x14\x03\x03\x05\x04\x07\x05","\t\x06\v\x07\r\b\x0f\t\x11\n\x13\v\x15\f\x17\x02","\x19\x02\x1b\x02\x1d\x02\x1f\r!\x02#\x02%\x0e\x03","\x02\n\n\x02$$11^^ddhhppttvv\x05\x022;CHch\x05\x02\x02","!$$^^\x03\x022;\x03\x023;\x04\x02GGgg\x04\x02--//\x05",'\x02\v\f\x0f\x0f""\x02\x86\x02\x03\x03\x02\x02',"\x02\x02\x05\x03\x02\x02\x02\x02\x07\x03\x02\x02","\x02\x02\t\x03\x02\x02\x02\x02\v\x03\x02\x02","\x02\x02\r\x03\x02\x02\x02\x02\x0f\x03\x02\x02","\x02\x02\x11\x03\x02\x02\x02\x02\x13\x03\x02\x02","\x02\x02\x15\x03\x02\x02\x02\x02\x1f\x03\x02\x02","\x02\x02%\x03\x02\x02\x02\x03'\x03\x02\x02\x02","\x05)\x03\x02\x02\x02\x07+\x03\x02\x02\x02\t-\x03","\x02\x02\x02\v/\x03\x02\x02\x02\r1\x03\x02\x02","\x02\x0f3\x03\x02\x02\x02\x118\x03\x02\x02\x02","\x13>\x03\x02\x02\x02\x15C\x03\x02\x02\x02\x17","M\x03\x02\x02\x02\x19R\x03\x02\x02\x02\x1bX\x03","\x02\x02\x02\x1dZ\x03\x02\x02\x02\x1f]\x03\x02","\x02\x02!s\x03\x02\x02\x02#u\x03\x02\x02\x02%|\x03","\x02\x02\x02'(\x07}\x02\x02(\x04\x03\x02\x02\x02",")*\x07.\x02\x02*\x06\x03\x02\x02\x02+,\x07\x7f\x02","\x02,\b\x03\x02\x02\x02-.\x07<\x02\x02.\n\x03\x02","\x02\x02/0\x07]\x02\x020\f\x03\x02\x02\x0212\x07","_\x02\x022\x0e\x03\x02\x02\x0234\x07v\x02\x0245","\x07t\x02\x0256\x07w\x02\x0267\x07g\x02\x027\x10","\x03\x02\x02\x0289\x07h\x02\x029:\x07c\x02\x02:",";\x07n\x02\x02;<\x07u\x02\x02<=\x07g\x02\x02=\x12","\x03\x02\x02\x02>?\x07p\x02\x02?@\x07w\x02\x02@","A\x07n\x02\x02AB\x07n\x02\x02B\x14\x03\x02\x02\x02","CH\x07$\x02\x02DG\x05\x17\f\x02EG\x05\x1d\x0f\x02","FD\x03\x02\x02\x02FE\x03\x02\x02\x02GJ\x03\x02\x02","\x02HF\x03\x02\x02\x02HI\x03\x02\x02\x02IK\x03\x02","\x02\x02JH\x03\x02\x02\x02KL\x07$\x02\x02L\x16\x03","\x02\x02\x02MP\x07^\x02\x02NQ\t\x02\x02\x02OQ\x05","\x19\r\x02PN\x03\x02\x02\x02PO\x03\x02\x02\x02Q","\x18\x03\x02\x02\x02RS\x07w\x02\x02ST\x05\x1b\x0e","\x02TU\x05\x1b\x0e\x02UV\x05\x1b\x0e\x02VW\x05\x1b","\x0e\x02W\x1a\x03\x02\x02\x02XY\t\x03\x02\x02Y\x1c","\x03\x02\x02\x02Z[\n\x04\x02\x02[\x1e\x03\x02\x02","\x02\\^\x07/\x02\x02]\\\x03\x02\x02\x02]^\x03\x02","\x02\x02^_\x03\x02\x02\x02_f\x05!\x11\x02`b\x07","0\x02\x02ac\t\x05\x02\x02ba\x03\x02\x02\x02cd\x03","\x02\x02\x02db\x03\x02\x02\x02de\x03\x02\x02\x02","eg\x03\x02\x02\x02f`\x03\x02\x02\x02fg\x03\x02\x02","\x02gi\x03\x02\x02\x02hj\x05#\x12\x02ih\x03\x02","\x02\x02ij\x03\x02\x02\x02j \x03\x02\x02\x02kt\x07","2\x02\x02lp\t\x06\x02\x02mo\t\x05\x02\x02nm\x03\x02","\x02\x02or\x03\x02\x02\x02pn\x03\x02\x02\x02pq\x03","\x02\x02\x02qt\x03\x02\x02\x02rp\x03\x02\x02\x02",'sk\x03\x02\x02\x02sl\x03\x02\x02\x02t"\x03\x02',"\x02\x02uw\t\x07\x02\x02vx\t\b\x02\x02wv\x03\x02\x02","\x02wx\x03\x02\x02\x02xy\x03\x02\x02\x02yz\x05!","\x11\x02z$\x03\x02\x02\x02{}\t\t\x02\x02|{\x03\x02","\x02\x02}~\x03\x02\x02\x02~|\x03\x02\x02\x02~\x7f","\x03\x02\x02\x02\x7f\x80\x03\x02\x02\x02\x80\x81","\b\x13\x02\x02\x81&\x03\x02\x02\x02\x0e\x02FHP]","dfipsw~\x03\b\x02\x02"].join(""),ze=(new Ue.atn.ATNDeserializer).deserialize(qe),Le=ze.decisionToState.map(function(e,t){return new Ue.dfa.DFA(e,t)});function $e(e){return Ue.Lexer.call(this,e),this.removeErrorListeners(),this.addErrorListener(Re),this._interp=new Ue.atn.LexerATNSimulator(this,ze,Le,new Ue.PredictionContextCache),this}$e.prototype=ye()(Ue.Lexer.prototype),$e.prototype.constructor=$e,Object.defineProperty($e.prototype,"atn",{get:function(){return ze}}),$e.EOF=Ue.Token.EOF,$e.T__0=1,$e.T__1=2,$e.T__2=3,$e.T__3=4,$e.T__4=5,$e.T__5=6,$e.T__6=7,$e.T__7=8,$e.T__8=9,$e.STRING=10,$e.NUMBER=11,$e.WS=12,$e.prototype.channelNames=["DEFAULT_TOKEN_CHANNEL","HIDDEN"],$e.prototype.modeNames=["DEFAULT_MODE"],$e.prototype.literalNames=[null,"'{'","','","'}'","':'","'['","']'","'true'","'false'","'null'"],$e.prototype.symbolicNames=[null,null,null,null,null,null,null,null,null,null,"STRING","NUMBER","WS"],$e.prototype.ruleNames=["T__0","T__1","T__2","T__3","T__4","T__5","T__6","T__7","T__8","STRING","ESC","UNICODE","HEX","SAFECODEPOINT","NUMBER","INT","EXP","WS"],$e.prototype.grammarFileName="JSON.g4";var Pe={JSONLexer:$e},Fe=n(40);function He(){return Fe.tree.ParseTreeListener.call(this),this}He.prototype=ye()(Fe.tree.ParseTreeListener.prototype),He.prototype.constructor=He,He.prototype.enterJson=function(e){},He.prototype.exitJson=function(e){},He.prototype.enterObj=function(e){},He.prototype.exitObj=function(e){},He.prototype.enterPair=function(e){},He.prototype.exitPair=function(e){},He.prototype.enterArray=function(e){},He.prototype.exitArray=function(e){},He.prototype.enterValue=function(e){},He.prototype.exitValue=function(e){};var Ye=He,Ve=n(40),We=["\x03\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964","\x03\x0e:\x04\x02\t\x02\x04\x03\t\x03\x04\x04\t","\x04\x04\x05\t\x05\x04\x06\t\x06\x03\x02\x03\x02","\x03\x03\x03\x03\x03\x03\x03\x03\x07\x03\x13\n","\x03\f\x03\x0e\x03\x16\v\x03\x03\x03\x03\x03","\x03\x03\x03\x03\x05\x03\x1c\n\x03\x03\x04\x03","\x04\x03\x04\x03\x04\x03\x05\x03\x05\x03\x05\x03","\x05\x07\x05&\n\x05\f\x05\x0e\x05)\v\x05\x03\x05","\x03\x05\x03\x05\x03\x05\x05\x05/\n\x05\x03\x06","\x03\x06\x03\x06\x03\x06\x03\x06\x03\x06\x03\x06","\x05\x068\n\x06\x03\x06\x02\x02\x07\x02\x04\x06","\b\n\x02\x02\x02>\x02\f\x03\x02\x02\x02\x04\x1b","\x03\x02\x02\x02\x06\x1d\x03\x02\x02\x02\b.\x03","\x02\x02\x02\n7\x03\x02\x02\x02\f\r\x05\n\x06\x02","\r\x03\x03\x02\x02\x02\x0e\x0f\x07\x03\x02\x02","\x0f\x14\x05\x06\x04\x02\x10\x11\x07\x04\x02\x02","\x11\x13\x05\x06\x04\x02\x12\x10\x03\x02\x02\x02","\x13\x16\x03\x02\x02\x02\x14\x12\x03\x02\x02\x02","\x14\x15\x03\x02\x02\x02\x15\x17\x03\x02\x02\x02","\x16\x14\x03\x02\x02\x02\x17\x18\x07\x05\x02\x02","\x18\x1c\x03\x02\x02\x02\x19\x1a\x07\x03\x02\x02","\x1a\x1c\x07\x05\x02\x02\x1b\x0e\x03\x02\x02\x02","\x1b\x19\x03\x02\x02\x02\x1c\x05\x03\x02\x02\x02","\x1d\x1e\x07\f\x02\x02\x1e\x1f\x07\x06\x02\x02",'\x1f \x05\n\x06\x02 \x07\x03\x02\x02\x02!"\x07',"\x07\x02\x02\"'\x05\n\x06\x02#$\x07\x04\x02\x02","$&\x05\n\x06\x02%#\x03\x02\x02\x02&)\x03\x02\x02","\x02'%\x03\x02\x02\x02'(\x03\x02\x02\x02(*\x03","\x02\x02\x02)'\x03\x02\x02\x02*+\x07\b\x02\x02","+/\x03\x02\x02\x02,-\x07\x07\x02\x02-/\x07\b\x02","\x02.!\x03\x02\x02\x02.,\x03\x02\x02\x02/\t\x03","\x02\x02\x0208\x07\f\x02\x0218\x07\r\x02\x0228\x05","\x04\x03\x0238\x05\b\x05\x0248\x07\t\x02\x0258\x07","\n\x02\x0268\x07\v\x02\x0270\x03\x02\x02\x027","1\x03\x02\x02\x0272\x03\x02\x02\x0273\x03\x02\x02","\x0274\x03\x02\x02\x0275\x03\x02\x02\x0276\x03\x02","\x02\x028\v\x03\x02\x02\x02\x07\x14\x1b'.7"].join(""),Je=(new Ve.atn.ATNDeserializer).deserialize(We),Ge=Je.decisionToState.map(function(e,t){return new Ve.dfa.DFA(e,t)}),Qe=new Ve.PredictionContextCache,Xe=[null,"'{'","','","'}'","':'","'['","']'","'true'","'false'","'null'"],Ke=[null,null,null,null,null,null,null,null,null,null,"STRING","NUMBER","WS"],Ze=["json","obj","pair","array","value"];function et(e){return Ve.Parser.call(this,e),this.removeErrorListeners(),this.addErrorListener(Re),this._interp=new Ve.atn.ParserATNSimulator(this,Je,Ge,Qe),this.ruleNames=Ze,this.literalNames=Xe,this.symbolicNames=Ke,this}function tt(e,t,n){return void 0===t&&(t=null),null==n&&(n=-1),Ve.ParserRuleContext.call(this,t,n),this.parser=e,this.ruleIndex=et.RULE_json,this}function nt(e,t,n){return void 0===t&&(t=null),null==n&&(n=-1),Ve.ParserRuleContext.call(this,t,n),this.parser=e,this.ruleIndex=et.RULE_obj,this}function ot(e,t,n){return void 0===t&&(t=null),null==n&&(n=-1),Ve.ParserRuleContext.call(this,t,n),this.parser=e,this.ruleIndex=et.RULE_pair,this}function it(e,t,n){return void 0===t&&(t=null),null==n&&(n=-1),Ve.ParserRuleContext.call(this,t,n),this.parser=e,this.ruleIndex=et.RULE_array,this}function at(e,t,n){return void 0===t&&(t=null),null==n&&(n=-1),Ve.ParserRuleContext.call(this,t,n),this.parser=e,this.ruleIndex=et.RULE_value,this}et.prototype=ye()(Ve.Parser.prototype),et.prototype.constructor=et,Object.defineProperty(et.prototype,"atn",{get:function(){return Je}}),et.EOF=Ve.Token.EOF,et.T__0=1,et.T__1=2,et.T__2=3,et.T__3=4,et.T__4=5,et.T__5=6,et.T__6=7,et.T__7=8,et.T__8=9,et.STRING=10,et.NUMBER=11,et.WS=12,et.RULE_json=0,et.RULE_obj=1,et.RULE_pair=2,et.RULE_array=3,et.RULE_value=4,tt.prototype=ye()(Ve.ParserRuleContext.prototype),tt.prototype.constructor=tt,tt.prototype.value=function(){return this.getTypedRuleContext(at,0)},tt.prototype.enterRule=function(e){e instanceof Ye&&e.enterJson(this)},tt.prototype.exitRule=function(e){e instanceof Ye&&e.exitJson(this)},et.JsonContext=tt,et.prototype.json=function(){var e=new tt(this,this._ctx,this.state);this.enterRule(e,0,et.RULE_json);try{this.enterOuterAlt(e,1),this.state=10,this.value()}catch(t){if(!(t instanceof Ve.error.RecognitionException))throw t;e.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return e},nt.prototype=ye()(Ve.ParserRuleContext.prototype),nt.prototype.constructor=nt,nt.prototype.pair=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(ot):this.getTypedRuleContext(ot,e)},nt.prototype.enterRule=function(e){e instanceof Ye&&e.enterObj(this)},nt.prototype.exitRule=function(e){e instanceof Ye&&e.exitObj(this)},et.ObjContext=nt,et.prototype.obj=function(){var e=new nt(this,this._ctx,this.state);this.enterRule(e,2,et.RULE_obj);var t=0;try{switch(this.state=25,this._errHandler.sync(this),this._interp.adaptivePredict(this._input,1,this._ctx)){case 1:for(this.enterOuterAlt(e,1),this.state=12,this.match(et.T__0),this.state=13,this.pair(),this.state=18,this._errHandler.sync(this),t=this._input.LA(1);t===et.T__1;)this.state=14,this.match(et.T__1),this.state=15,this.pair(),this.state=20,this._errHandler.sync(this),t=this._input.LA(1);this.state=21,this.match(et.T__2);break;case 2:this.enterOuterAlt(e,2),this.state=23,this.match(et.T__0),this.state=24,this.match(et.T__2)}}catch(t){if(!(t instanceof Ve.error.RecognitionException))throw t;e.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return e},ot.prototype=ye()(Ve.ParserRuleContext.prototype),ot.prototype.constructor=ot,ot.prototype.STRING=function(){return this.getToken(et.STRING,0)},ot.prototype.value=function(){return this.getTypedRuleContext(at,0)},ot.prototype.enterRule=function(e){e instanceof Ye&&e.enterPair(this)},ot.prototype.exitRule=function(e){e instanceof Ye&&e.exitPair(this)},et.PairContext=ot,et.prototype.pair=function(){var e=new ot(this,this._ctx,this.state);this.enterRule(e,4,et.RULE_pair);try{this.enterOuterAlt(e,1),this.state=27,this.match(et.STRING),this.state=28,this.match(et.T__3),this.state=29,this.value()}catch(t){if(!(t instanceof Ve.error.RecognitionException))throw t;e.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return e},it.prototype=ye()(Ve.ParserRuleContext.prototype),it.prototype.constructor=it,it.prototype.value=function(e){return void 0===e&&(e=null),null===e?this.getTypedRuleContexts(at):this.getTypedRuleContext(at,e)},it.prototype.enterRule=function(e){e instanceof Ye&&e.enterArray(this)},it.prototype.exitRule=function(e){e instanceof Ye&&e.exitArray(this)},et.ArrayContext=it,et.prototype.array=function(){var e=new it(this,this._ctx,this.state);this.enterRule(e,6,et.RULE_array);var t=0;try{switch(this.state=44,this._errHandler.sync(this),this._interp.adaptivePredict(this._input,3,this._ctx)){case 1:for(this.enterOuterAlt(e,1),this.state=31,this.match(et.T__4),this.state=32,this.value(),this.state=37,this._errHandler.sync(this),t=this._input.LA(1);t===et.T__1;)this.state=33,this.match(et.T__1),this.state=34,this.value(),this.state=39,this._errHandler.sync(this),t=this._input.LA(1);this.state=40,this.match(et.T__5);break;case 2:this.enterOuterAlt(e,2),this.state=42,this.match(et.T__4),this.state=43,this.match(et.T__5)}}catch(t){if(!(t instanceof Ve.error.RecognitionException))throw t;e.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return e},at.prototype=ye()(Ve.ParserRuleContext.prototype),at.prototype.constructor=at,at.prototype.STRING=function(){return this.getToken(et.STRING,0)},at.prototype.NUMBER=function(){return this.getToken(et.NUMBER,0)},at.prototype.obj=function(){return this.getTypedRuleContext(nt,0)},at.prototype.array=function(){return this.getTypedRuleContext(it,0)},at.prototype.enterRule=function(e){e instanceof Ye&&e.enterValue(this)},at.prototype.exitRule=function(e){e instanceof Ye&&e.exitValue(this)},et.ValueContext=at,et.prototype.value=function(){var e=new at(this,this._ctx,this.state);this.enterRule(e,8,et.RULE_value);try{switch(this.state=53,this._errHandler.sync(this),this._input.LA(1)){case et.STRING:this.enterOuterAlt(e,1),this.state=46,this.match(et.STRING);break;case et.NUMBER:this.enterOuterAlt(e,2),this.state=47,this.match(et.NUMBER);break;case et.T__0:this.enterOuterAlt(e,3),this.state=48,this.obj();break;case et.T__4:this.enterOuterAlt(e,4),this.state=49,this.array();break;case et.T__6:this.enterOuterAlt(e,5),this.state=50,this.match(et.T__6);break;case et.T__7:this.enterOuterAlt(e,6),this.state=51,this.match(et.T__7);break;case et.T__8:this.enterOuterAlt(e,7),this.state=52,this.match(et.T__8);break;default:throw new Ve.error.NoViableAltException(this)}}catch(t){if(!(t instanceof Ve.error.RecognitionException))throw t;e.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.exitRule()}return e};var st={JSONParser:et,PairContext:ot,ObjContext:nt,ArrayContext:it,JsonContext:tt,ValueContext:at},rt=n(41),lt=n.n(rt),ct=function(){function e(t){xe()(this,e),this.type=t,this.content=""}return we()(e,[{key:"appendContent",value:function(e){this.content+=e}},{key:"replaceContent",value:function(e){this.content=e}}]),e}(),pt=function(e){function t(e){var n;return xe()(this,t),(n=je()(this,De()(t).call(this))).component=e,n.editor=n.component.$refs.jsonEditor,n.scopes={json:[],object:[],value:[],pair:[],array:[]},n}return Me()(t,e),we()(t,[{key:"enterJson",value:function(){this.scopes.json.push(new ct(null,"json")),this.component.$data.json="".concat(this.component.$data.json)}},{key:"exitJson",value:function(){if(void 0!==this.component&&void 0!==this.editor){var e=this.scopes.value[this.scopes.value.length-1].content,t='<span class="json">'.concat(e,"</span>");this.editor.setJsonTemplate(t),this.scopes.json.pop()}}},{key:"enterObj",value:function(){this.scopes.object.push(new ct("object"))}},{key:"exitObj",value:function(e){var t=this,n="";e.children.length>2&&(n=" hasChildren");var o=e.children.filter(function(e){return e instanceof st.PairContext}),i=[],a=(i=lt()(Array(o.length).keys()).reduce(function(e){return 0===t.scopes.pair.length?e:(e.push(t.scopes.pair[t.scopes.pair.length-1].content),t.scopes.pair.pop(),e)},i)).reverse().join(""),s="<json-object".concat(n,">").concat(a,"</json-object>");this.scopes.object[this.scopes.object.length-1].appendContent(s)}},{key:"enterArray",value:function(){this.scopes.array.push(new ct("array"))}},{key:"exitArray",value:function(e){var t=this,n="";e.children.length>2&&(n=" hasChildren");var o=e.children.filter(function(e){return e instanceof st.ValueContext}),i=[],a=(i=lt()(Array(o.length).keys()).reduce(function(e){return 0===t.scopes.value.length?e:(e.push(t.scopes.value[t.scopes.value.length-1].content),t.scopes.value.pop(),e)},i)).reverse().join(""),s="<json-array".concat(n,">").concat(a,"</json-array>");this.scopes.array[this.scopes.array.length-1].appendContent(s)}},{key:"enterValue",value:function(){this.scopes.value.push(new ct("value"))}},{key:"exitValue",value:function(e){var t,n;if(e.parentCtx instanceof st.JsonContext)return e.children[0]instanceof st.ObjContext&&(t=this.scopes.object[this.scopes.object.length-1].content,this.scopes.value[this.scopes.value.length-1].appendContent(t),this.scopes.object.pop()),e.children[0]instanceof st.ArrayContext&&(t=this.scopes.array[this.scopes.array.length-1].content,this.scopes.value[this.scopes.value.length-1].appendContent(t),this.scopes.array.pop()),void(void 0!==e.children[0].symbol&&(t=e.children[0].symbol.text,this.scopes.value[this.scopes.value.length-1].appendContent(t),this.scopes.array.pop()));if(void 0===e.children[0]||void 0===e.children[0].symbol)return e.children[0]instanceof st.ObjContext&&(n=this.scopes.object[this.scopes.object.length-1].content,t="<json-value>".concat(n,"</json-value>"),this.scopes.value[this.scopes.value.length-1].appendContent(t),this.scopes.object.pop()),void(e.children[0]instanceof st.ArrayContext&&(n=this.scopes.array[this.scopes.array.length-1].content,t="<json-value>".concat(n,"</json-value>"),this.scopes.value[this.scopes.value.length-1].appendContent(t),this.scopes.array.pop()));var o=e.children[0].symbol.text;e.parentCtx instanceof st.PairContext?this.scopes.value[this.scopes.value.length-1].appendContent("<json-value>".concat(o,"</json-value>")):this.scopes.value[this.scopes.value.length-1].appendContent("<json-value is-array-item>".concat(o,"</json-value>"))}},{key:"enterPair",value:function(){this.scopes.pair.push(new ct("pair"))}},{key:"exitPair",value:function(e){var t,n,o=e.children[0],i=e.children[1],a=e.children[2].children[0];if(!(a instanceof st.ObjContext||a instanceof st.ArrayContext))return n=this.scopes.value[this.scopes.value.length-1].content,this.scopes.value.pop(),t="\n <json-pair>\n <template slot='key'>\n ".concat(o.symbol.text,"\n </template>\n <template slot='colon'>\n ").concat(i.symbol.text,"\n </template>\n <template slot='value'>\n ").concat(n,"\n </template>\n </json-pair>\n "),void this.scopes.pair[this.scopes.pair.length-1].appendContent(t);var s=a instanceof st.ObjContext,r=a instanceof st.ArrayContext,l="";r&&(l="is-first-child-array");var c="";s&&(c="is-first-child-object"),n=this.scopes.value[this.scopes.value.length-1].content,this.scopes.value.pop();var p="";(s||r)&&(p="is-array-or-object"),t="\n <json-pair ".concat(l," ").concat(c," ").concat(p,">\n <template slot='key'>\n ").concat(o.symbol.text,"\n </template>\n <template slot='colon'>\n ").concat(i.symbol.text,"\n </template>\n <template slot='value'>\n ").concat(n,"\n </template>\n </json-pair>\n "),this.scopes.pair[this.scopes.pair.length-1].appendContent(t)}}]),t}(Ye),ut=Ie,mt=function(e,t){try{var n=new ve.a.InputStream(e),o=new Pe.JSONLexer(n),i=new ve.a.CommonTokenStream(o),a=new st.JSONParser(i);a.buildParseTrees=!0;var s=a.json(),r=new pt(t);t.$refs.jsonEditor.setJson(e),ve.a.tree.ParseTreeWalker.DEFAULT.walk(r,s)}catch(e){throw new Ie(e.message,e.fileName,e.lineNumber,e)}},dt={name:"dictionary",components:{JsonEditor:ge},props:{"literal-object":{type:Object},activeParser:{type:Boolean,default:!1}},mounted:function(){j.$on("source.changed",this.updateDataStructure),j.$on("source.changed",this.parseChangedSource),j.$on("source.copied",this.pasteSource),this.activeParser&&"undefined"!==this.literalObject&&this.parseJson(b()(this.literalObject),this)},methods:{parseChangedSource:function(e){this.activeParser&&(""==e.text.trim()&&(e.text="{}"),this.parseJson(e.text,this))},parseJson:function(e,t){if(void 0!==t){t.$data.json="";try{mt(e,t)}catch(e){if(e instanceof ut)return void j.$emit("parsing.antlr.failed",{errorMessage:e.message});throw e}j.$emit("parsing.antlr.succeeded")}},pasteSource:function(e){var t=e.code;this.activeParser?this.parseJson(t,e.ref):j.$emit("source.changed",{text:t})},updateDataStructure:function(e){var t=this.dataStructure,n="about"===this.$route.name;if(n&&!this.activeParser)try{e.json=e.text.replace(/([^\{,"'\s\{]+)\s*:/g,'"$1":').replace(/:\s*((?:[^,\s"'\}]*[^0-9,\s"'\}]{1,}[^\s,"'\}]*){1,})/g,': "$1"').replace(/:\s*(?=[1-9]{1,}}[^\d\}]{1,})([^"',\s\}]{1,})/g,': "$1"').replace(/:\s*(?![1-9]{1,})([^"',\s\}]{1,})/g,': "$1"').replace(/'/g,'"'),this.dataStructure=JSON.parse(e.json);var o=this.dataStructure;n||(o=JSON.parse(e.text)),j.$emit("parsing.succeeded",{parsedJson:o})}catch(e){this.dataStructure=t,j.$emit("parsing.failed",{error:e})}},getPropertyClass:function(e){var t={dictionary__value:!0};return t["dictionary__value--string"]=M.a.isString(e.value),t},isString:function(e){return M.a.isString(e)}},computed:{properties:function(){var e=[];if(void 0===this.dataStructure)return e;for(var t in this.dataStructure)e.push({key:t,value:this.dataStructure[t]});return e}},data:function(){return{dataStructure:this.literalObject,json:"{}"}}},ht=(n(242),Object(g.a)(dt,function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"dictionary-container"},[e.activeParser?[n("json-editor",{ref:"jsonEditor",attrs:{json:e.json}})]:n("div",{staticClass:"dictionary"},[e._l(e.properties,function(t,o){return[n("div",{staticClass:"dictionary__key-value"},[n("span",{staticClass:"dictionary__key"},[e._v(e._s(t.key))]),e._v(" "),n("span",{class:e.getPropertyClass(t)},[e._v(e._s(t.value))])]),e._v(" "),o<e.properties.length-1?n("br"):e._e()]})],2)],2)},[],!1,null,"58f9e113",null).exports),ft={name:"source-code",methods:{getClasses:function(){var e={"source-code":!0};return this.wrap&&(e["source-code__wrap"]=!0),"grey"!==this.color&&(e["source-code--color-"+this.color]=!0),e}},props:{wrap:{type:Boolean,default:!1},color:{type:String,default:"grey"}}},gt=(n(240),Object(g.a)(ft,function(){var e=this.$createElement;return(this._self._c||e)("p",{class:this.getClasses()},[this._t("default")],2)},[],!1,null,"5a8e7960",null).exports),At={name:"about",components:{BrowsableLink:B,Dictionary:ht,InputArea:D,Paragraph:C,SourceCode:gt},mounted:function(){j.$on("parsing.antlr.failed",this.handleFailedParsing),j.$on("parsing.antlr.succeeded",this.hideErrorMessageContainer)},computed:{getDefaultJsonExample:function(){return b()(this.example).replace(/,(?!\s)/g,", ")}},methods:{copyToInputArea:function(e){var t=e.target.innerText;j.$emit("source.copied",{code:t,ref:this.$refs.parsedJSON})},handleFailedParsing:function(e){this.errorMessage=e.errorMessage,this.showError=!0},hideErrorMessageContainer:function(){this.showError=!1}},props:{emptyExample:{type:Object,default:function(){return{}}},defaultExample:{type:Object,default:function(){return{display:"flex","font-family":"monospace","font-size":"1rem"}}}},data:function(){return{example:this.defaultExample,errorMessage:"",showError:!1}}},vt=(n(238),Object(g.a)(At,function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"about__container"},[n("section",{staticClass:"about__left-column"},[n("paragraph",{attrs:{align:"right"}},[e._v("When playing with "),n("browsable-link",{attrs:{href:"https://vuejs.org"}},[e._v("vue.js")]),e._v(",\nI've stumbled upon several limitations of\nmy own understanding with regards to\nhow a source code can be parsed\nbefore interpretation.\n\nMy original intent was to get a better grasp\nof data structures (as plain and\nsimple as a JavaScript object).\n \nI had the following requirements in mind:\n - Drawing visual representations\n - Such representation should be reactive\n\nI came up with the following prototype, \nwhich would work with very simple examples, like\n\n"),n("source-code",{attrs:{wrap:"",color:"clickable"},nativeOn:{click:function(t){e.copyToInputArea(t)}}},[e._v(e._s(e.getDefaultJsonExample))]),n("br"),e._v(" "),n("source-code",{attrs:{color:"clickable"},nativeOn:{click:function(t){e.copyToInputArea(t)}}},[e._v("{ margin-left: 10px }")]),e._v(" "),n("source-code",{attrs:{color:"clickable"},nativeOn:{click:function(t){e.copyToInputArea(t)}}},[e._v("{ color: blue }")]),e._v("\n\nProvided the replacement of substrings\nusing regular expressions\nto fix half-compliant JSON\nwould not help much to deal with \nthe task at hand, I've decided to dive into \n"),n("browsable-link",{attrs:{href:"https://bit.ly/compilers-principles"}},[e._v("Compilers - Principles, Techniques, & Tools")]),e._v("\nin order to exercice myself\nin learning the basics of compilation")],1)],1),e._v(" "),n("section",{staticClass:"about__right-column"},[n("div",{staticClass:"about__content"},[n("div",{staticClass:"about__example"},[n("input-area"),e._v(" "),n("dictionary",{ref:"dictionary",attrs:{"literal-object":e.defaultExample}}),e._v(" "),n("source-code",{directives:[{name:"show",rawName:"v-show",value:e.showError,expression:"showError"}],domProps:{innerHTML:e._s(e.errorMessage)}})],1)])])])},[],!1,null,"8be625a0",null).exports),_t={name:"question",components:{paragraph:C},methods:{showAnswer:function(){this.question.answerIsVisible=!this.question.answerIsVisible}},data:function(){return{question:{answerIsVisible:!1,classes:{question:"question__question",answer:"question__answer"}}}}},yt=(n(236),Object(g.a)(_t,function(){var e=this.$createElement;return(this._self._c||e)("div",{staticClass:"question",on:{click:this.showAnswer}},[this._t("default",null,{question:this.question})],2)},[],!1,null,"747b4307",null).exports),bt={name:"introduction",props:{subtitle:{type:String}},components:{paragraph:C,question:yt,"browsable-link":B},methods:{getSubtitleClasses:function(){return{introduction__subtitle:!0}}}},xt=n(135);var Ct=Object(g.a)(bt,function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"introduction__container"},[n("div",{staticClass:"introduction__question-set"},[n("question",{scopedSlots:e._u([{key:"default",fn:function(t){return[n("paragraph",{class:t.question.classes.question},[e._v("What is the difference between a compiler and an interpreter?")]),e._v(" "),t.question.answerIsVisible?n("paragraph",{class:t.question.classes.answer},[e._v("A "),n("em",[e._v("compiler")]),e._v(" is a program that can read a program\nin one language - the "),n("em",[e._v("source")]),e._v(" language - and translate it\ninto an equivalent program in another language\n- the "),n("em",[e._v("target")]),e._v(" language.\n\nA "),n("em",[e._v("interpreter")]),e._v(" is another common kind of language processor.\nInstead of producing a target program as a translation, \nan interpreter appears to directly execute the operations\nspecified in the source program\non inputs supplied by the user.")]):e._e()]}}])}),e._v(" "),n("question",{scopedSlots:e._u([{key:"default",fn:function(t){return[n("paragraph",{class:t.question.classes.question},[e._v("What are the advantages of (a) a compiler over an interpreter \n(b) an interpreter over a compiler?")]),e._v(" "),t.question.answerIsVisible?n("paragraph",{class:t.question.classes.answer},[e._v("(a) The machine-language target program\nproduced by a compiler is usually much faster at mapping\ninputs to outputs.\n\n(b) An interpreter, however can usually give\nbetter error diagnostics than a compiler,\nbecause it executes the source program\nstatement by statement.")]):e._e()]}}])}),e._v(" "),n("question",{scopedSlots:e._u([{key:"default",fn:function(t){return[n("paragraph",{class:t.question.classes.question},[e._v("What advantages are there to a language-processing system\nin which the compiler produces assembly language\nrather than machine language?")]),e._v(" "),t.question.answerIsVisible?n("paragraph",{class:t.question.classes.answer},[e._v("The compiler may produce an assembly-language\nas its output, because assembly language \nis easier to produce as output and\nis easier to debug.")]):e._e()]}}])}),e._v(" "),n("question",{scopedSlots:e._u([{key:"default",fn:function(t){return[n("paragraph",{class:t.question.classes.question},[e._v("A compiler that translates a high-level language\ninto another high-level language\nis called a "),n("em",[e._v("source-to-source")]),e._v(" translator. \nWhat advantages are there to using C\nas a target language for a compiler?")]),e._v(" "),t.question.answerIsVisible?n("paragraph",{class:t.question.classes.answer},[e._v("There is a C compiler for almost every system\never made. "),n("browsable-link",{attrs:{href:"http://bit.ly/advantages-of-c-compiler-as-target-language"}},[e._v("See original Quora answer")])],1):e._e()]}}])}),e._v(" "),n("question",{scopedSlots:e._u([{key:"default",fn:function(t){return[n("paragraph",{class:t.question.classes.question},[e._v("Describe some of the tasks\nthat an assembler needs to perform.")]),e._v(" "),t.question.answerIsVisible?n("paragraph",{class:t.question.classes.answer},[e._v("An assembler produces relocatable machine code\nas its output by processing an assembly language")]):e._e()]}}])})],1)])},[],!1,function(e){this.$style=xt.default.locals||xt.default},null,null).exports,wt=n(23),Bt=n.n(wt),jt={name:"arrow"},kt=(n(233),Object(g.a)(jt,function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"arrow"},[t("div",{staticClass:"arrow__edge arrow__edge--top"}),this._v(" "),t("div",{staticClass:"arrow__text"},[this._t("default")],2),this._v(" "),t("div",{staticClass:"arrow__edge arrow__edge--bottom"}),this._v(" "),t("div",{staticClass:"arrow__tip"})])},[],!1,null,"3879de74",null).exports),Dt="showDescription",Tt="toggleExampleVisibility",Mt="showDescription",Et="hideAllDescriptions",St=Object(J.a)("structure-of-a-compiler"),Ot=St.mapGetters,Nt=St.mapActions,It=St.mapMutations,Rt={name:"box",methods:_()({},Nt([Dt]),It([Et]),{unhighlight:function(e){this.hideAllDescriptions(),this.showDescription("lexical-analysis")},highlight:function(){this.showDescription(this.name)},toggleBoxHighlight:function(){if(void 0!==this.highlighted){if(this.isHighlightable){var e=parseFloat(getComputedStyle(document.documentElement).fontSize);return window.scrollTo(0,this.$el.offsetTop-e),void this.highlight()}j.$emit("phase.unhighlighted"),this.unhighlight()}}}),computed:_()({},Ot(["visibleDescription","visibilityOfDescriptions"]),{getBoxClasses:function(){var e={box:!0};return e.box__highlightable=this.isHighlightable,e.box__highlighted=this.isHighlighted,e},isHighlightable:function(){return void 0!==this.highlighted&&!this.isHighlighted},isHighlighted:function(){if(void 0!==this.visibilityOfDescriptions&&this.name in this.visibilityOfDescriptions)return this.visibleDescription==this.name}}),props:{name:String,highlighted:{Boolean:Boolean,default:void 0}}},Ut=(n(231),Object(g.a)(Rt,function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"box__container",on:{click:this.toggleBoxHighlight}},[t("button",{class:this.getBoxClasses},[this._t("default")],2),this._v(" "),t("transition",{attrs:{name:"box__translatable"}},[this.isHighlighted?t("div",{staticClass:"box__arrow"}):this._e()])],1)},[],!1,null,"1c6e3dbe",null).exports),qt={name:"symbol-table",props:{symbols:Array,required:!0}},zt=(n(229),Object(g.a)(qt,function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"symbol-table"},[e._t("default"),e._v(" "),e._l(e.symbols,function(t,o){return n("div",{staticClass:"symbol-table__row"},[n("div",{staticClass:"symbol-table__index"},[o<e.symbols.length-1?[e._v("\n "+e._s(o+1)+"\n ")]:e._e()],2),e._v(" "),n("div",{staticClass:"symbol-table__name"},[e._v("\n "+e._s(t)+"\n ")]),e._v(" "),n("div",{staticClass:"symbol-table__ellipsis"},[o<e.symbols.length-1?[e._v("\n ...\n ")]:e._e()],2)])})],2)},[],!1,null,"329fe102",null).exports),Lt=n(127),$t={name:"code-sample",components:{"source-code":gt},props:{lines:{type:Array,required:!0}},data:function(){return{sourceCodeLines:this.lines}}},Pt=(n(223),Object(g.a)($t,function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"code-sample"},e._l(e.sourceCodeLines,function(t,o){return n("source-code",{key:o,staticClass:"code-sample__line"},[e._v(e._s(t))])}))},[],!1,null,"63875389",null).exports),Ft={name:"description",components:{paragraph:C}},Ht=(n(221),Object(g.a)(Ft,function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"description__container"},[t("div",{staticClass:"description"},[t("paragraph",{staticClass:"description__paragraph"},[this._t("default")],2)],1)])},[],!1,null,"3af8f276",null).exports),Yt={name:"lexical-analysis",components:{description:Ht},methods:{replaceBrackets:function(e){return e.replace(/</g,"〈").replace(/>/g,"〉")}}},Vt=(n(219),Object(g.a)(Yt,function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"lexical-analysis__container"},[n("div",{staticClass:"lexical-analysis"},[n("description",[e._v("The first phase of a compiler is called "),n("em",[e._v("lexical analysis")]),e._v("\nor "),n("em",[e._v("scanning")]),e._v(".\n\nThe lexical analyzer reads the stream of characters\nmaking up the source program and groups the characters\ninto meaningful sequences called "),n("em",[e._v("lexemes")]),e._v(".\nFor each lexeme, the lexical analyzer produces\nas output a "),n("em",[e._v("token")]),e._v(" of the form \n\n "),n("em",[n("span",{domProps:{innerHTML:e._s(e.replaceBrackets("<"))}}),e._v("token-name, attribute-value"),n("span",{domProps:{innerHTML:e._s(e.replaceBrackets(">"))}})]),e._v("\n\nthat it passes on to the subsequent phase,\nsyntax analysis.\n\nIn the token, the first component "),n("em",[e._v("token-name")]),e._v("\nis an abstract symbol that is used during syntax analysis,\nand the second component "),n("em",[e._v("attribute-value")]),e._v(" points to an entry\nin the symbol tablefor this token.\n\nInformation from the symbol-table entry is needed\nfor semantic analysis and code generation.")])],1)])},[],!1,null,"d379ab78",null).exports),Wt={name:"syntax-analysis",components:{description:Ht}},Jt=(n(217),Object(g.a)(Wt,function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"syntax-analysis"},[t("description",[this._v("The second phase of the compiler is "),t("em",[this._v("syntax analysis")]),this._v("\nor "),t("em",[this._v("parsing")]),this._v(".\n\nThe parser uses the first components of the token produced\nby the lexical analyzer to create a tree-like intermediate\nrepresentation that depicts the grammatical structure\nof the token stream.\n\nA typical representation is a "),t("em",[this._v("syntax-tree")]),this._v(" in which each\ninterior node represents an operation and\nthe children of the node represent\nthe arguments of the operation.\n ")])],1)},[],!1,null,"ace56b84",null).exports),Gt={name:"semantic-analysis",components:{description:Ht}},Qt=(n(215),Object(g.a)(Gt,function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"semantic-analysis"},[n("description",[e._v("The "),n("em",[e._v("semantic analyzer")]),e._v(" uses the syntax tree and\nthe information in the symbol table to check\nthe source program for semantic consistency\nwith the language definition.\n\nIt also gathers type information and saves it\nin either the syntax tree or the symbol table,\nfor subsequent use during intermediate-code generation.\n\nAn important part of semantic analysis is "),n("em",[e._v("type checking")]),e._v(",\nwhere the compiler checks that each operator\nhas matching operands.\nFor example, many programming language definition\nrequires an array index to be an integer;\nthe compiler must report an error\nif a floating-point number is used to index an array.\n\nThe language specification may permit\nsome type conversions called "),n("em",[e._v("coercions")]),e._v(".\nFor example, a binary arithmetic operator\nmay be applied to either a pair of integers\nor to a pair of floating-point numbers.\nIf the operator is applied to a floating-point number\nand an integer, the compiler may convert or coerce\nthe integer into a floating-point number.\n\nNotice that the output of the semantic analyzer\nhas an extra node for the operator "),n("strong",[e._v("inttoflloat")]),e._v(",\nwhich explicitly converts its integer argument into\na floating-point number")])],1)},[],!1,null,"e1b48bca",null).exports),Xt={name:"intermediate-code-generation",components:{description:Ht}},Kt=(n(213),Object(g.a)(Xt,function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"intermediate-code-generation"},[t("description",[this._v("In the process of translating a source program\ninto target code, a compiler may construct one or\nmore intermediate representations,\nwhich have a variety of forms. \nSyntax trees are a form of intermediate representation;\nthey are commonly used during syntax and\nsemantic analysis.\n\nAfter syntax and semantic analysis of the source program,\nmany compilers generate an explicit low-level or\nmachine-like intermediate representation, \nwhich we can think of \nas a program for an abstract machine.\nThis intermediate representation \nshould have two important properties:\n - it should be easy to produce and\n - it should be easy to translate into the target machine.\n\nFor instance, one can consider an intermediate form called \n"),t("em",[this._v("three-address code")]),this._v(', which consists of a sequence of \nassembly-like instructions with\nthree operands per instruction.\nEach operand can act like a register. \n\nThere are several points worth nothing about\nthree-address instructions.\nFirst, each three-adress assignment instructions \nhas at most one operator on the right side.\nThus, these instructions fix the order\nin which operations are to be done.\nSecond, the compiler must generate\na temporary name to hold the value\ncomputed by a three-address instruction.\nThird, some "three-address instructions"\nhave fewer than three operands.\n')])],1)},[],!1,null,"f2fa7bc8",null).exports),Zt={name:"code-optimization",components:{description:Ht}},en=(n(211),Object(g.a)(Zt,function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"code-optimization"},[t("description",[this._v("The machine-independent code-optimization phase attempts to\nimprove the intermediate code so that\nbetter target code will result.\nUsually better means faster, \nbut other objectives may be desired,\nsuch as shorter code,\nor target code that consumes less power.\n\nFor example, a straightforward algorithm\ngenerates the intermediate code,\nusing an instruction for each operator \nin the tree representation\nthat comes from the semantic analyzer. \n\nA simple intermediate code generation algorithm\nfollowed by code optimization is a reasonable way\nto generate good target code.\nThe optimizer can deduce that the conversion of 60\nfrom integer to floating point can be done once and\nfor all at compile time, so the "),t("strong",[this._v("inttofloat")]),this._v("\noperation can be eliminated by replacing the integer 60\nby the floating-point number 60.0.\n\nMoreover, "),t("code",[this._v("t3")]),this._v(" is used only once to transmit its value to "),t("code",[this._v("id1")]),this._v('.\nThere is a great variation in the amount of code optimization\ndifferent compilers perform. In those that do the most,\nthe so-called "optimizing compilers",\na significant amount of time is spent on this phase.\nThere are simple optimizations that significantly improve \nthe running time of the target program without slowing down\ncompilation too much.\n')])],1)},[],!1,null,"568d3694",null).exports),tn={name:"code-generation",components:{description:Ht}},nn=(n(209),Object(g.a)(tn,function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"code-generation"},[n("description",[e._v("The code generator takes as input\nan intermediate representation of the source program\nand maps it into the target language.\n\nIf the target language is machine code,\nregisters or memory locations are selected for each of\nthe variables used by the program.\n\nThen, the intermediate instructions are translated\ninto sequences of machine instructions\nthat perform the same task.\n\nA crucial aspect of code generation\nis the judicious assignment of registers\nto hold variables.\n\nThe first operand of each instruction specifies a destination.\nThe F in each instruction tells that it deals with\nfloating-point numbers. \n\nThe code loads the contents of address "),n("code",[e._v("id3")]),e._v("\ninto "),n("code",[e._v("R2")]),e._v(", then multiplies it with\nfloating-point constant 60.0. \nThe "),n("strong",[e._v("#")]),e._v(" signifies that 60.0 is to be treated\nas an immediate constant.\n\nThe third instruction moves "),n("code",[e._v("id2")]),e._v(" into register "),n("code",[e._v("R1")]),e._v("\nand the fourth adds to it the value \npreviously computed in register "),n("code",[e._v("R2")]),e._v(".\n\nFinally, the value in register "),n("code",[e._v("R1")]),e._v(" is stored\ninto the address of "),n("code",[e._v("id1")]),e._v(", so the code correctly \nimplements the assignment statement.\n\nThe discussion of code generation has ignored\nthe important issue of storage allocation \nfor the identifiers in the source program.\n\nStorage-allocation decisions are made\neither during intermediate code generation\nor during code generation.\n")])],1)},[],!1,null,"3f158687",null).exports),on={name:"symbol-table-management",components:{description:Ht}},an=(n(207),Object(g.a)(on,function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"symbol-table-management"},[t("description",[this._v("An essential function of a compiler is to record the variable\nnames used in the source program and collect information\nabout various attributes of each name.\n\nThese attributes may provide information about the storage\nallocated for a name, its type, its scope\n(where in the program its value may be used), \nand in the case of procedure names,\nsuch things as the number and types of its arguments,\nthe method of passing each argument\n(for example, by value of by reference),\nand the type returned.\n\nThe symbol table is a data structure containing\na record for each variable name,\nwith fields for the attributes of the name.\n\nThe data structure should be designed to allow the compiler\nto find the record for each name quickly and to store\nor retrieve data from that record quickly.\n")])],1)},[],!1,null,"25361da9",null).exports),sn=Object(J.a)("structure-of-a-compiler"),rn=sn.mapGetters,ln=sn.mapMutations,cn={name:"structure-of-a-compiler",components:{arrow:kt,box:Ut,"symbol-table":zt,"node-tree":Lt.default,"code-sample":Pt,"lexical-analysis":Vt,"syntax-analysis":Jt,"semantic-analysis":Qt,"intermediate-code-generation":Kt,"code-optimization":en,"code-generation":nn,"symbol-table-management":an},mounted:function(){j.$on("phase.unhighlighted",this.scrollToTop)},computed:_()({},rn(["visibleDescription","visibilityOfDescriptions","exampleIsVisible","sequence"]),{getPhases:function(){return Bt()(this.visibilityOfDescriptions)}}),methods:_()({replaceBrackets:function(e){return e.replace(/</g,"〈").replace(/>/g,"〉")},scrollToTop:function(){window.scrollTo(0,0)},isHighlighted:function(e){if(void 0!==this.visibilityOfDescriptions[e])return this.visibilityOfDescriptions[e]},isHighlightable:function(e){if(void 0!==this.visibilityOfDescriptions[e])return!this.visibilityOfDescriptions[e]},isVisible:function(e){return e===this.visibleDescription},columnClasses:function(e){var t={"structure-of-a-compiler__right-column":!0,"structure-of-a-compiler__right-column--visible":this.visibilityOfDescriptions[e]};return null===this.visibleDescription&&"lexical-analysis"!==e?(t["structure-of-a-compiler__right-column--hidden"]=!0,t):null!==this.visibleDescription&&this.visibleDescription!==e?(t["structure-of-a-compiler__right-column--hidden"]=!0,t):t}},ln({toggleExampleVisibility:Tt}),{isCodeSample:function(e){return Object(T.isArray)(e)}}),props:{symbols:{type:Array,default:function(){return["position","initial","rate"," "]}},sequences:{type:Object,default:function(){return{phases_of_a_compiler:[{input:"character stream",text:"Lexical analyzer",name:"lexical-analysis"},{input:"token stream",text:"Syntax analyzer",name:"syntax-analysis"},{input:"syntax tree",text:"Semantic analyzer",name:"semantic-analysis"},{input:"syntax tee",text:"Intermediate Code Generator",name:"intermediate-code-generation"},{input:"intermediate representation",text:"Machine-Independent Code Optimizer",name:"code-optimization"},{input:"intermediate representation",text:"Code Generator",name:"code-generation"},{input:"target-machine code",text:"Machine dependent Code Optimizer"},{input:"target-machine code"}],translation_of_a_an_assignment_statement:[{input:"position = initial + rate * 60",text:"Lexical analyzer",name:"lexical-analysis"},{input:"<id,1> <=> <id, 2> <+> <id, 3> <*> <60>",text:"Syntax analyzer",name:"syntax-analysis"},{isTree:!0,input:{"=":{left:"<id, 1>",right:{"<+>":{left:"<id, 2>",right:{"<*>":{left:"<id, 3>",right:"60"}}}}}},text:"Semantic analyzer",name:"semantic-analysis"},{isTree:!0,input:{"=":{left:"<id, 1>",right:{"<+>":{left:"<id, 2>",right:{"<*>":{left:"<id, 3>",right:{inttofloat:{onlyChild:"60"}}}}}}}},name:"intermediate-code-generation",text:"Intermediate Code Generator"},{input:["t1 = inttofloat(60)","t2 = id3 * t1","t3 = id2 + t2","id1 = t3"],text:"Code Optimizer",name:"code-optimization"},{input:["t1 = id3 * 60.0","id1 = t1 + t2"],text:"Code Generator",name:"code-generation"},{input:["LDF R2, id3","MULF R2, R2, #60.0","LDF R1, id2","ADDF R1, R1, R2","STF id1, R1"]}]}}}}},pn=(n(205),Object(g.a)(cn,function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"structure-of-a-compiler"},[n("section",{staticClass:"structure-of-a-compiler__left-column"},[e.exampleIsVisible?n("button",{staticClass:"structure-of-a-compiler__example",on:{click:e.toggleExampleVisibility}},[e._v("Hide example")]):n("button",{staticClass:"structure-of-a-compiler__example",on:{click:e.toggleExampleVisibility}},[e._v("Show example")]),e._v(" "),n("div",{staticClass:"structure-of-a-compiler__phase"},[e._l(e.sequences[e.sequence],function(t){return[t.isTree?e._e():n("arrow",[e.isCodeSample(t.input)?[n("code-sample",{attrs:{lines:t.input}})]:[n("span",{domProps:{innerHTML:e._s(e.replaceBrackets(t.input))}})]],2),e._v(" "),t.isTree?[n("node-tree",{attrs:{root:t.input,isTreeRoot:!0}})]:e._e(),e._v(" "),t.text?n("box",{attrs:{name:t.name?t.name:null,highlighted:e.isHighlighted(t.name),highlightable:e.isHighlightable(t.name)}},[e._v(e._s(t.text))]):e._e()]}),e._v(" "),n("hr",{staticClass:"structure-of-a-compiler__separator"}),e._v(" "),n("symbol-table",{attrs:{symbols:e.symbols}},[n("box",{attrs:{name:"symbol-table-management",highlighted:e.isHighlighted("symbol-table-management"),highlightable:e.isHighlighted("symbol-table-management")}},[e._v("Symbol Table")])],1)],2)]),e._v(" "),e._l(e.getPhases,function(t,o){return e.visibilityOfDescriptions[t]?n("section",{key:o,class:e.columnClasses(t)},[n("div",{staticClass:"structure-of-a-compiler__scrollable"},[n("transition",{attrs:{name:"structure-of-a-compiler__fadeable"}},[e.isVisible(t)||"lexical-analysis"==t?n(t,{tag:"component"}):e._e()],1)],1)]):e._e()})],2)},[],!1,null,"b564ca5c",null).exports),un={name:"multimedia-content",components:{paragraph:C},render:function(e){var t=0,n=[];void 0===this.$slots.default&&(this.$slots.default=[]);var o=(n=this.$slots.default.reduce(function(e,n){return"br"===n.tag?(t++,e):"h3"===n.tag?(e[++t]=[n],t++,e):void 0===e[t]?(e[t]=[n],e):(e[t].push(n),e)},n)).map(function(t){return"h3"===t[0].tag?t[0]:e("paragraph",{class:"multimedia-content__paragraph"},t)});return e("div",{class:"multimedia-content"},o)}},mn=n(134);var dn=Object(g.a)(un,void 0,void 0,!1,function(e){this.$style=mn.default.locals||mn.default},null,null).exports,hn={name:"grouping-of-phases-into-passes",components:{"multimedia-content":dn}},fn=Object(g.a)(hn,function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"grouping-of-phases-into-passes"},[t("multimedia-content",[this._v("The discussion of phases deals with the logical organization\nof a compiler. In an implementation, activities from several phases\nmay be grouped together into a "),t("em",[this._v("pass")]),this._v(" that reads an input file\nand writes an output file.\n"),t("br"),this._v("\nFor example, the front-end phases of lexical analysis,\nsyntax analysis, semantic analysis, and intermediate code generation\nmight be grouped together into one pass.\nCode optimization might be optional.\n"),t("br"),this._v("\nThen there could be a back-end pass consisting of code generation\nfor a particular target machine.\n"),t("br"),this._v("\nSome compiler collections have been created around carefully designed\nintermediate representations that allow the front end for a particular\nlanguage to interface with the back end for a certain target machine.\nWith these collections, we can produce compilers\nfor different source languages for one target machine.\n"),t("br"),this._v("\nSimilarly, we can produce compilers for different target machines,\nby combining a front end with back ends for different target machines.\n")])],1)},[],!1,null,null,null).exports,gn={name:"compiler-construction-tools",components:{"multimedia-content":dn}},An=Object(g.a)(gn,function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"content"},[n("multimedia-content",[e._v("The compiler writer, like any software developer,\ncan profitably use modern development environment containing tools\nsuch as language editors, debuggers, version managers, profilers,\ntest harnesses, and so on.\n"),n("br"),e._v("\nIn addition to these software development tools,\nother more specialized tools have been created\nto help implement various phases of a compiler.\n"),n("br"),e._v("\nThese tools use specialized languages for specifying and implementing\nspecific components, and many use quite sophisticated algorithms.\nThe most successful tools are those that hide the details\nof the generation algorithm and produce components\nthan can be easily integrated into the remainder of the compiler.\n"),n("br"),e._v("\nSome commonly used compiler-construction tools include\n"),n("ol",[n("li",[n("em",[e._v("Parser generators")]),e._v(" that automatically produce syntax analyzers\nfrom a grammatical description of a programming language.")]),e._v(" "),n("li",[n("em",[e._v("Scanner generators")]),e._v(" that produce lexical analyzers\nfrom a regular description of the tokens of a language")]),e._v(" "),n("li",[n("em",[e._v("Syntax-directed translation engines")]),e._v(" that produce collections\nof routines for walking a parse tree and generating intermediate code.")]),e._v(" "),n("li",[n("em",[e._v("Code generators")]),e._v(" that produce a code generator\nfrom a collection of rules for translating each operation\nof the intermediate language into the machine language for a target machine.")]),e._v(" "),n("li",[n("em",[e._v("Data-flow analysis engines")]),e._v(" that facilitates the gathering of\ninformation about how values are transmitted from one part of a program\nto each other part. Data-flow analysis is a key part of code optimization.")]),e._v(" "),n("li",[n("em",[e._v("Compiler-construction toolkits")]),e._v(" that provide an integrated\nset of routines for constructing various phases of a compiler.")])])])],1)},[],!1,null,null,null).exports,vn={name:"the-science-of-building-a-compiller",components:{"multimedia-content":dn}},_n=Object(g.a)(vn,function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"the-science-of-building-a-compiler"},[t("multimedia-content",[this._v("Compiler design is full of beautiful examples where \ncomplicated real-world prob\xad lems are solved by abstracting\nthe essence of the problem mathematically. \n"),t("br"),this._v("\nThese serve as excellent illustrations of how abstractions can be used to solve prob\xadlems: \ntake a problem, formulate a mathematical abstraction that captures the key characteristics,\nand solve it using mathematical techniques. The problem formulation must be grounded\nin a solid understanding of the characteristics of computer programs,\nand the solution must be validated and refined empirically.\n"),t("br"),this._v("\nA compiler must accept all source programs that conform to the specification of the language;\nthe set of source programs is infinite and any program can be very large,\nconsisting of possibly millions of lines of code.\nAny transformation performed by the compiler while translating a source program\nmust preserve the meaning of the program being compiled.\nCompiler writers thus have influence over not just the compilers they create,\nbut all the programs that their com\xad pilers compile.\nThis leverage makes writing compilers particularly rewarding;\nhowever, it also makes compiler development challenging.\n")])],1)},[],!1,null,null,null).exports,yn={name:"the-science-of-code-optimization",components:{"multimedia-content":dn}},bn=Object(g.a)(yn,function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"the-science-of-building-a-compiler"},[n("multimedia-content",[e._v('The term "optimization" in compiler design refers to the attempts\nthat a compiler makes to produce code that is more efficient than the obvious code.\n"Optimization" is thus a misnommer, since there is no way that the code\nproduced by a compiler can be guaranteed to be as fast or faster than\nany other code that performs the same task.\n'),n("br"),e._v("\nIn modern times, the optimization of code that a compiler performs has\nbecome both more important and more complex. It is more complex because\nprocessor architecture have become more complex, yielding more opportunies\nto improve the way code executes. It is more important because massively\nparallel computers require substantial optimization, or their performance\nsuffers by orders of magnitude. With the likely prevalence of multicore machines\n(computers with chips that have large numbers of processors on them),\nall compilers will have to face the problem of\ntaking advantage of multiprocessor machines. \n"),n("br"),e._v('\nIt is hard, if not impossible, to build a robust compiler out of "hacks".\nThus, an extensive and useful theory has been built up\naround the problem of optimizing code.\nThe use of a rigorous mathematical foundation allows us to show\nthat an optimization is correct and that it produces the desirable effect\nfor all possible inputs. \n'),n("br"),e._v("\nOn the other hand, pure theory alone is insufficient.\nLike many real-world problems, there are no perfect answers.\nIn fact, most of the questions that we ask in compiler optimization\nare undecidable. One of the most important skills in compiler design\nis the ability to formulate the right problem to solve.\n"),n("br"),e._v("\nWe need a good understanding of the behavior of programs to start\nwith and thorough experimentation and evaluation to validate our intuitions.\n"),n("br"),e._v("\nCompiler optimizations must meet the following design objectives:\n"),n("ul",[n("li",[e._v("The optimization must be correct, that is,\npreserve the meaning of the compiled program,")]),e._v(" "),n("li",[e._v("The optimization must improve the performance of many programs")]),e._v(" "),n("li",[e._v("The compilation time must be kept reasonable, and")]),e._v(" "),n("li",[e._v("The engineering effort required must be manageable.")])]),e._v("\nIt is impossible to overemphasize the importance of correctness.\nIt is trivial to write a compiler that generates fast code\nif the generated code need not be correct!\nOptimizing compilers are so difficult to get right that we dare say\nthat no optimizing compiler is completely error-free! \nThus, the most important objective in writing a compiler is that it is correct. \n"),n("br"),e._v("\nThe second goal is that the compiler must be effective in improving\nthe performance of many input programs.\nNormally, performance means speed of the program execution.\nEspecially in embedded applications, we may also wish to minimize\nthe size of the generated code.\n"),n("br"),e._v("\nAnd in the case of mobile devices, it is also desirable that\nthe code minimizes power consumption. Typically, the same optimizations\nthat speed up execution time also conserve power.\n"),n("br"),e._v("\nBesides performance, usability aspects such as error reporting\nand debugging are also important.\n"),n("br"),e._v("\nThird, we meed to keep the compilation time short to support a rapid\ndevelopment and debugging cycle. This requirement has become easier to meet\nas machines get faster. Often, a program is first developed and debugged\nwithout program optimizations. Not only is the compilation time reduced,\nbut more importantly, unoptimized programs are easier to debug,\nbecause the optimizations introduced by a compiler often obscure\nthe relationship between the source code and the object code. \nTurning on optimizations in the compiler sometimes exposes new problems\nin the source program; thus testing may again be performed\non the optimized code.\n"),n("br"),e._v("\nThe need for additional testing sometimes deters the use of optimizations\nin applications, especially if their performance is not critical.\n"),n("br"),e._v("\nFinally, a compiler is a complex system; we must keep the system\nsimple to assure that the engineeing and maintenance costs\nof the compiler are manageable. There is an infinite number of program\noptimizations that we could implement, and it takes a nontrivial\namount of effort to create a correct and effective optimization.\nWe must prioritize the optimizations,\nimplementing only those that lead to the greatest benefits on source\nprograms encountered in practice.\n"),n("br"),e._v("\nThus, in studying compilers, we learn not only how to build a compiler,\nbut also the general methodology of solving complex and open-ended problems.\nThe approach used in compiler development involves both theory and\nexperimentation. We normally start by formulating the problem\nbased on our intuitions on what the important issues are.\n")])],1)},[],!1,null,null,null).exports,xn={name:"the-evolution-of-programming-languages",components:{"multimedia-content":dn}},Cn=Object(g.a)(xn,function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"the-evolution-of-programming-languages"},[t("multimedia-content",[this._v("The first electronic computers appeared in the 1940's\nand were programmed in machine language by sequences of O's and 1 's\nthat explicitly told the computer what operations to execute and in what order.\nThe operations themselves were very low level:\nmove data from one location to another, add the contents of two registers,\ncompare two values, and so on. \n"),t("br"),this._v("\nNeedless to say, this kind of programming was slow, tedious,\nand error prone.\n"),t("br"),this._v("And once written, the programs were hard to understand and modify.\n")])],1)},[],!1,null,null,null).exports,wn={name:"the-move-to-higher-level-languages",components:{"multimedia-content":dn}},Bn=Object(g.a)(wn,function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"the-move-to-higher-level-languages"},[n("multimedia-content",[e._v("The first step towards more people-friendly programming\nlanguages was the devlopment of mnemonic assembly languages in the early 1950's. Initially, the instructions in an assembly language were just mnemonic representations of machine instructions.\n"),n("br"),e._v("\nLater, macro instructions were added to assembly languages so that a programmer could define parameterized shorthands for frequently used sequences of machine instructions.\n"),n("br"),e._v("\nA major step towards higher-level languages was made in the latter half of the 1950's with the development of Fortran for scientific computation, Cobol for business data processing, and Lisp for symbolic computation. The philosophy behind these languages was to create higher-level notations with which programmers could more easily write numerical computations, business applications, and symbolic programs. These languages were so successful that they are still in use today.\n"),n("br"),e._v("\nIn the following decades, many more languages were created with innovative features to help make programming easier, more natural, and more robust. Later in this chapter, we shall discuss some key features that are common to many modern programming languages.\n"),n("br"),e._v("\nToday, there are thousands of programming languages. They can be classified in a variety of ways. \nOne classification is by generation. "),n("em",[e._v("First-generation")]),e._v(" languages are the machine languages, "),n("em",[e._v("second-generation")]),e._v(" the assembly languages, and "),n("em",[e._v("third-generation")]),e._v(" the higher-level languages like Fortran, Cobol, Lisp, C, C++, C#, and Java. "),n("em",[e._v("Fourth-generation")]),e._v(" languages are languages designed for specific applications like NOMAD for report generation, SQL for database queries, and Postscript for text formatting. The term "),n("em",[e._v("fifth-generation")]),e._v(" language has been applied to logic- and constraint-based languages like Prolog and OPS5.\n"),n("br"),e._v("\nAnother classification of languages uses the term "),n("em",[e._v("imperative")]),e._v(" for languages in which a program specifies "),n("em",[e._v("how")]),e._v(" a computation is to be done and "),n("em",[e._v("declarative")]),e._v(" for languages in which a program specifies "),n("em",[e._v("what")]),e._v(" computation is to be done. Languages such as C, C++, C#, and Java are imperative languages. In imperative languages there is a notion of program state and statements that change the state. Functional languages such as ML and Haskell and constraint logic languages such as Prolog are often considered to be declarative languages .\n"),n("br"),e._v("\nThe term "),n("em",[e._v("von Neumann language")]),e._v(" is applied to programming languages whose cornputational model is based on the von Neumann computer architecture. Many of today's languages, such as Fortran and C are von Neumann languages.\n"),n("br"),e._v("\nAn object-oriented language is one that supports object-oriented programming, a programming style in which a program consists of a collection of objects that interact with one another. Simula 67 and Smalltalk are the earliest major object-oriented languages. Languages such as C++, C#, Java, and Ruby are more recent object-oriented languages.\n"),n("br"),e._v(" "),n("em",[e._v("Scripting languages")]),e._v(' are interpreted languages with high-level operators designed for "gluing together" computations. These computations were originally\ncalled "scripts". Awk, JavaScript, Perl, PHP, Python, Ruby, and Tcl\nare popular examples of scripting languages. Programs written in scripting languages\nare often much shorter than equivalent programs written in languages like C. \n')])],1)},[],!1,null,null,null).exports,jn={name:"the-move-to-higher-level-languages",components:{"multimedia-content":dn}},kn=Object(g.a)(jn,function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"the-move-to-higher-level-languages"},[t("multimedia-content",[this._v("Since the design of programming languages\nand compilers are intimately related,\nthe advances in programming languages placed new demands on compiler writers.\nThey had to devise algorithms and representations\nto translate and support the new language features.\nSince the 1940's, computer architecture has evolved as well.\nNot only did the compiler writers have to track new language features,\nthey also had to devise translation algorithms\nthat would take maximal advantage of the new hardware capabilities.\n"),t("br"),this._v("\nCompilers can help promote the use of high-level languages by minimizing\nthe execution overhead of the programs written in these languages.\nCompilers are also critical in making high-performance computer architectures\neffective on users' applications. In fact, the performance of a computer system\nis so dependent on compiler technology that compilers are used as a tool\nin evaluating architectural concepts before a computer is built.\n"),t("br"),this._v("\nCompiler writing is challenging. A compiler by itself is a large program.\nMoreover, many modern language-processing systems handle several source languages and\ntarget machines within the same framework; that is, they serve as collections of compilers,\npossibly consisting of millions of lines of code.\nConsequently, good software-engineering techniques are essential\nfor creating and evolving modern language processors.\n"),t("br"),this._v("\nA compiler must translate correctly the potentially infinite set\nof programs that could be written in the source language.\nThe problem of generating the optimal target code from a source program is undecidable in general;\nthus, compiler writers must evaluate tradeoffs about what problems to tackle\nand what heuristics to use to approach the problem of generating efficient code.\n"),t("br"),this._v("\nA study of compilers is also a study of how theory meets practice.\n"),t("br"),this._v("\nThe purpose of this text is to teach the methodology\nand fundamental ideas used in compiler design.\nIt is not the intention of this text to teach all the algorithms\nand techniques that could be used for building a state-of-the-art language-processing system.\nHowever, readers of this text will acquire the basic knowledge\nand understanding to learn how to build a compiler relatively easily.")])],1)},[],!1,null,null,null).exports,Dn={name:"applications-of-compiler-technology",components:{"multimedia-content":dn}},Tn=Object(g.a)(Dn,function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"content"},[t("multimedia-content",[this._v(" Compiler design is not only about compilers, and\nmany people use the technology learned by studying compilers in school, yet have never, strictly speaking, written (even part of) a compiler for a major programming language. Compiler technology has other important uses as well. Additionally, compiler design impacts several other areas of computer science. In this section, we review the most important interactions and applications of the technology.")])],1)},[],!1,null,null,null).exports,Mn={name:"implementation-of-high-level-programming-languages",components:{"multimedia-content":dn}},En=Object(g.a)(Mn,function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"content"},[n("multimedia-content",[e._v("A high-level programming language defines \na programming abstraction: the programmer expresses an algorithm using the language, and the compiler must translate that program to the target language. Generally, higher-level programming languages are easier to program in, but are less efficient, that is, the target programs run more slowly. Programmers using a low-level language have more control over a computation and can, in principle, produce more efficient code. Unfortunately, lower-level programs are harder to write and - worse still - less portable, more prone to errors, and harder to maintain. Optimizing compilers include techniques to improve the performance of generated code, thus offsetting the inefficiency introduced by high-level abstractions.\n"),n("br"),e._v("\nThe many shifts in the popular choice of programming languages have been in the direction of increased levels of abstraction. C was the predominant systems programming language of the 80's; many of the new projects started in the 90's chose C++; Java, introduced in 1995, gained popularity quickly in the late 90's. The new programming-language features introduced in each round spurred new research in compiler optimization.\n"),n("br"),e._v("\nPractically all common programming languages , including C, Fortran and Cobol, support user-defined aggregate data types, such as arrays and structures, and high-level control flow, such as loops and procedure invocations. If we just take each high-level construct or data-access operation and translate it directly to machine code, the result would be very inefficient. A body of compiler optimizations, known as "),n("em",[e._v("data-flow optimizations")]),e._v(", has been developed to analyze the flow of data through the program and removes redundancies across these constructs. They are effective in generating code that resembles code written by a skilled programmer at a lower level.\n"),n("br"),e._v("Object orientation was first introduced in Simula in 1967, and has been incorporated in languages such as Smallt alk , C+ + , C# , and Java. The key ideas behind object orientation are\n\n"),n("ol",[n("li",[e._v("Data abstraction and")]),e._v(" "),n("li",[e._v("Inheritance of properties,")])]),e._v("\n\nboth of which have been found to make programs more modular and easier to maintain. Object-oriented programs are different from those written in many other languages, in that they consist of many more, but smaller, procedures (called methods in object-oriented terms). Thus, compiler optimizations must be able to perform well across the procedural boundaries of the source program. Procedure inlining , which is the replacement of a procedure call by the body of the procedure, is particularly useful here. Optimizations to speed up virtual method dispatches have also been developed.\n"),n("br"),e._v("\nJava has many features that make programming easier, many of which have been introduced previously in other languages. The Java language is type-safe; that is, an object cannot be used as an object of an unrelated type. All array accesses are checked to ensure that they lie within the bounds of the array. Java has no pointers and does not allow pointer arithmetic. It has a built-in garbage-collection facility that automatically frees the memory of variables that are no longer in use. While all these features make programming easier, they incur a run-time overhead. Compiler optimizations have been developed to reduce the overhead, for example, by eliminating unnecessary range checks and by allocating objects that are not accessible beyond a procedure on the stack instead of the heap. Effective algorithms also have been developed to minimize the overhead of garbage collection.\n"),n("br"),e._v("\nIn addition, Java is designed to support portable and mobile code. Programs are distributed as Java byteecode, which must either be interpreted or compiled into native code dynamically, that is, at runtime. Dynamic compilation has also been studied in other contexts, where information is extracted dynamically at run time and used to produce better-optimized code. In dynamic optimization, it is important to minimize the compilation time as it is part of the execution overhead. A common technique used is to only compile and optimize those parts of the program that will be frequently executed.\n")])],1)},[],!1,null,null,null).exports,Sn={name:"optimizations-for-computer-architecture",components:{"multimedia-content":dn}},On=Object(g.a)(Sn,function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"content"},[t("multimedia-content",[this._v("The rapid evolution of computer architectures has\nalso led to an insatiable demand for new compiler technology. Almost all high-performance systems take advantage of the same two basic techniques: parallelism and memory hierarchies. Parallelism can be found at several levels: at the instruction level, where multiple operations are executed simultaneously and at the processor level, where different threads of the same application are run on different processors. Memory hierarchies are a response to the basic limitation that we can build very fast storage or very large storage, but not storage that is both fast and large.\n "),t("h3",[this._v("Parallelism")]),this._v("\nAll modern microprocessors exploit instruction-level parallelism. However, this parallelism can be hidden fron the programmer. Programs are written as if all instructions were executed in sequence; the hardware dynamically checks for dependencies in the sequential instruction stream and issues them in parallel when possible. In some cases, the machine includes a hardware scheduler that can change the instruction ordering to increase the parallelism in the program. Whether the hardware reorders the instructions or not, compilers can rearrange the instructions to make instruction-level parallelism more effective.\n"),t("br"),this._v("\nInstruction-level parallelism can also appear explicitly in the instruction set. VLIW (Very Long Instruction Word) machines have instructions that can issue multiple operations in parallel. The Intel IA64 is a well-known example of such an architecture. All high-performance, general-purpose microprocessors also include instructions that can operate on a vector of data at the same time. Compiler techniques have been developed to generate code automatically for such machines from sequential programs.\n "),t("h3",[this._v("Memory hierarchies")]),this._v("\nA memory hierarchy consists of several levels of storage with different speeds\nand sizes, with the level closest to the processor being the fastest\nbut smallest. The average memory-access time of a program is reduced if\nmost of its accesses are satisfied by the faster levels of the hierarchy.\nBoth parallelism and the existence of a memory hierarchy improve the potential\nperformance of a machine, but they must be harnessed effectively by the compiler to deliver real performance on an application.\n"),t("br"),this._v("\nMemory hierarchies are found in all machines.\nA processor usually has a small number of registers consisting of hundreds of bytes, several levels of caches containing kilobytes to megabytes, physical memory containing megabytes to gigabytes,\nand finally secondary storage that contains gigabytes and beyond. Correspondingly, the speed of accesses between adjacent levels of the hierarchy can differ by two or three orders of magnitude. The performance of a system is often limited not by the speed of the processor but by the performance of the memory subsystem. While compilers traditionally focus on optimizing the processor execution, more emphasis is now placed on making the memory hierarchy more effective.\n\nUsing registers effectively is probably the single most important problem in optimizing a program. Unlike registers that have to be managed explicitly in software, caches and physical memories are hidden from the instruction set and are managed by hardware. It has been found that cache-management policies implemented by hardware are not effective in some cases, especially in scientific code that has large data structure (arrays, typically). It is possible to improve the effeciveness of the memory hierarchy by changing the layout of the data, or changing the order of instruct1ons accessing the data. We can also change the layout of code to improve the effectiveness of instruction caches.")])],1)},[],!1,null,null,null).exports,Nn={name:"program-translations",components:{"multimedia-content":dn}},In=Object(g.a)(Nn,function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"content"},[n("multimedia-content",[e._v("While we normally think of compiling as\na translation from a high-level language to the machine level, the same technology can be applied to translate between different kinds of languages. The following applications of program-translation techniques.\n"),n("h3",[e._v("Binary Translation")]),e._v("\nCompiler technology can be used to translate the binary code for one machine\nto that of another, allowing a machine to run programs originally compiled for another instruction set. Binary translation technology has been used by various computer companies to increase the availability of software for their machines. In particular, because of the domination of the x86 personal-computer market, most software titles are available as x86 code. \nBinary translators have been developed to convert x86 code into both Alpha and Spare code. Binary translation was also used by Transmeta Inc. in their implementation of the x86 instruction set. Instead of executing the complex x86 instruction set directly in hardware, the Transmeta Crusoe processor is a VLIW processor that relies on binary translation to convert x86 code into native VLIW code.\n"),n("br"),e._v("\nBinary translation can also be used to provide backward compatibility. When the processor in the Apple Macintosh was changed frorn the Motorola MC 68040 to the PowerPC in 1994, binary translation was used to allow PowerPC processors run legacy MC 68040 code.\n"),n("h3",[e._v("Hardware Synthesis")]),e._v("\nNot only is most software written in high-level languages; even hardware designs are mostly described in high-level hardware description languages like Verilog and VHDL (Very high-speed integrated circuit Hardware Description Language). Hardware designs are typically described at \nthe register transfer level (RTL), where variables represent registers and expressions represent combinational logic. Hardware-synthesis tools translate RTL descriptions automatically into gates, which arre then mapped to transistors and eventually to a physical layout. Unlike compilers or programming languages these tools often take hours optimizing the circuit. Techniques to translate designs at higher levels, such as the behavior or functional level, also exist.\n"),n("h3",[e._v("Database Query Interpreters")]),e._v("\nBesides specifying software and hardware, languages are useful in many other\napplications. For example, query languages, especially SQL (Structured Query Language), are used to search databases. Database queries consist of predicates containing relational and boolean operators. They can be\ninterpreted or compiled into commands to search a database for records satisfying that predicate.\n"),n("h3",[e._v("Compiled Simulation")]),e._v("\nSimulation is a general technique used in many scientific and engineering disciplines to understand a phenomenon or to validate a design. Inputs to a simulator usually include the description of the design and specific input parameters for that particular simulation run. Simulations can be very expensive. We typically need to simulate many possible design alternatives on many different input sets, and each experiment may take days to complete on a high-performance machine. Instead of writing a simulator that interprets the design, it is faster to compile the design to produce machine code that simulates that particular design natively. Compiled simulation can run orders of magnitude faster than an interpreter-based approach. Compiled simulation is used in many state-ofthe-art tools that simulate designs written in Verilog or VHDL.")])],1)},[],!1,null,null,null).exports,Rn={name:"software-productivity-tools",components:{"multimedia-content":dn}},Un=Object(g.a)(Rn,function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"content"},[n("multimedia-content",[e._v("Programs are arguably the most complicated\nengineering artifacts ever produced; they consist of many many details, every one of which must be correct before the program will work completely. As a result, errors are rampant in programs; errors may crash a system, produce wrong results, render a system vulnerable to security attacks, or even lead to catastrophic failures in critical systems. Testing is the primary technique for locating errors in programs.\n"),n("br"),e._v("An interesting and promising complementary approach is to use data-flow analysis to locate errors statically (that is, before the program is run). Data-flow analysis can find errors along all the possible execution paths, and not just those exercised by the input data sets, as in the case of program testing. Many of the data-flow-analysis techniques, originally developed for compiler optimizations, can be used to create tools that assist programmers in their software engineering tasks.\n"),n("br"),e._v("The problem of finding all program errors is undecidable. A data-flow analysis may be designed to warn the programmers of all possible statements with a particular category of errors. But if most of these warnings are false alarms users will not use the tool. \nThus, practical error detectors are often neither sound nor complete. That is, they may not find all the errors in the program. and not all errors reported are guaranteed to be real errors.\nNonetheless, various static analyses have been developed and shown to be effective in finding errors, such as dereferencing null or freed pointers, in real programs. The fact that error detectors may be unsound makes them significantly different from compiler optimizations. Optimizers must be conservative and cannot alter the semantics of the program under any circumstances.\n"),n("br"),e._v("\nIn the balance of this section, we shall mention several ways in which program analysis, building upon techniques originally developed to optimize code in compilers, have improved software productivity. Of special importance are techniques that detect statically when a program might have a security vulnerability.\n"),n("h3",[e._v("Type Checking")]),e._v('\nType checking is an effective and well-established technique to catch inconsistencies in programs. It can be used to catch errors, for example, where an operation is applied to the wrong type of object, or if parameters passed to a procedure do not match the signature of the procedure. Program analysis can go beyond finding type errors by analyzing the flow of data through a program. For example, if a pointer is assigned null and then immediately dereferenced. the program is clearly in error.\nThe same technology can be used to catch a variety of security holes, in which an attacker supplies a string or other data that is used carelessly by the program. A user-supplied string can be labeled with a type "dangerous." If\nthis string is not checked for proper format, then it remains "dangerous", and if a string of this type is able to influence the control-flow of the \ncode at some point in the program, then there is a potential security flaw.\n'),n("h3",[e._v("Bounds Checking<")]),e._v("\nIt is easier to make mistakes when programming in a lower-level language than a higher-level one. For example, many security breaches in systems are caused by buffer overflows in programs written in C. Because C does not have array bounds checks, it is up to the user to ensure that the arrays are not accessed out of bounds. Failing to check that the data supplied by the user can overflow a buffer, the program may be tricked into storing user data outside of the buffer. An attacker can manipulate the input data that causes the program to misbehave and compromise the security of the system. Techniques have been developed to find buffer overflows in programs, but with limited success.\n"),n("br"),e._v("Had the program been written in a safe language that includes automatic range checking, this problem would not have occurred. The same data-flow analysis that is used to eliminate redundant range checks can also be used to locate buffer overflows. The major difference, however, is that failing to elimate a range check would only result in a small run-time cost, while failing to identify a potential buffer overflow may compromise the security of the system. Thus, while it is adequate to use simple techniques to optimize range checks, sophisticated analyses, such as tracking the values of pointers across procedures, are needed to get high-quality results in error detection tools.\n"),n("h3",[e._v("Memory-Management Tools")]),e._v('\nGarbage collection is another excellent example of the tradeoff between efficiency and a combination of ease of programming and software reliability. Automatic memory management obliterates all memory-management errors (e.g., "memory leaks"), which are a major source of problems in C and C++ programs. Various tools have been developed to help programmers find memory management errors. For example, Purify is a widely used tool that dynamically catches memory management errors as they occur. Tools that help identify some of these problems statically have also been developed.')])],1)},[],!1,null,null,null).exports,qn={name:"expr",class:"expr",render:function(e){if(0!==this.$slots.default.length&&1===this.$slots.default.length){var t=this.$slots.default[0].text,n=t.replace(/epsilon/g,"ε").replace(/->/g,"⟶"),o=/(\S+)_(\S+)/;if(t.match(o)){var i={},a=0,s=t.replace(o,function(t,n,o){i[a]=e("span",{class:"expr__subscript"},[n,e("sub",{domProps:{innerHTML:o}})]);var s=a;return a++,"-sep-\\"+s+"-sep-"}).split("-sep-").map(function(e){for(var t in i){var n="\\\\".concat(t);return e.match(new RegExp(n))?i[t]:e}});return e("p",{class:"expr"},s)}return e("p",{class:"expr",domProps:{innerHTML:n}})}}},zn=(n(202),Object(g.a)(qn,void 0,void 0,!1,null,"63f3dd2c",null).exports),Ln={name:"a-model-of-a-compiler-front-end",components:{MultimediaContent:dn,Expr:zn}},$n=Object(g.a)(Ln,function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"a-model-of-a-compiler-front-end"},[n("multimedia-content",[e._v("The analysis phase of a compiler breaks up a\nsource program into constituent pieces and produces\nan internal representation for it, called intermediate code.\nThe synthesis phase translates the intermediate code into the target program.\n"),n("br"),e._v('\nAnalysis is organized around the "syntax" of the language to be compiled.\nThe syntax of a programming language describes the proper form of\nits programs, while the semantics of the language defines\nwhat its programs mean; that is, what each program does when it executes. \nFor specifying syntax, we present a widely used notation,\ncalled context-free grammars or BNF (for Backus-Naur Fann).\nWith the notations currently available, the semantics of a language\nis much more difficult to describe than the syntax. \nFor specifying semantics, we shall therefore use infornal\ndescriptions and suggestive examples. \n'),n("br"),e._v("\nBesides specifying the syntax of a language,\na context-free grammar can be used to help guide\nthe translation of programs. \nWe introduce a grammar-oriented compiling technique\nknown as syntax-directed translation.\n"),n("br"),e._v("\nWe begin with the parser. \nFor simplicity, we consider the syntax-directed translation of\ninfix expressions to postfix form, \na notation in which operators appear after their operands. \nFor example, the postfix form of the expression "),n("expr",[e._v("9-5+2")]),e._v("\nis "),n("expr",[e._v("95-2+")]),e._v(". Translation into postfix form is rich enough\nto illustrate syntax analysis, yet simple enough.\nThe simple translator handles expressions like "),n("expr",[e._v("9-5+2")]),e._v(",\nconsisting of digits separated by plus and minus signs. \nOne reason for starting with such simple expressions\nis that the syntax analyzer can work directly\nwith the individual characters for operators and operands.\n"),n("br"),e._v("\nA lexical analyzer allows a translator to handle multicharacter\nconstructs like identifiers, which are written as sequences of characters,\nbut are treated as units called "),n("em",[e._v("tokens")]),e._v(" during syntax analysis;\nfor example, in the expression "),n("expr",[e._v("count+ 1")]),e._v(",\nthe identifier "),n("expr",[e._v("count")]),e._v(' is treated as a unit.\nThe lexical analyzer allows numbers, identifiers, and "white space"\n(blanks, tabs, and newlines) to appear ,vithin expressions.\nNext, we consider intermediate-code generation. \nThere are two forms of intermediate codes, we\'ll be dealing with.\nOne form, called '),n("em",[e._v("abstract syntax trees")]),e._v(" or simply \n"),n("em",[e._v("syntax trees")]),e._v(", represents the hierarchical syntactic\nstructure of the source program. The parser produces a syntax tree,\nthat is further translated into three-address code.\nSome compilers combine parsing and intermediate-code generation\ninto one component.\n ")],1)],1)},[],!1,null,null,null).exports,Pn={name:"formal-notation",class:"form-notation",render:function(e){if(1===this.$slots.default.length){var t=this.$slots.default[0].text.replace(/^\n/,"").replace(/->/g,"⟶");return e("p",{class:"formal-notation",domProps:{innerHTML:t}})}var n=this.$slots.default.map(function(t){return void 0===t.tag&&t.text.match(/->/)?e("span",{class:"formal-notation__imply",domProps:{innerHTML:t.text.trim().replace(/->/g,"⟶")}}):t});return e("p",{class:"formal-notation"},n)}},Fn=(n(200),Object(g.a)(Pn,void 0,void 0,!1,null,"7a389c60",null).exports),Hn={name:"syntax-definition",components:{MultimediaContent:dn,Expr:zn,FormalNotation:Fn}},Yn=Object(g.a)(Hn,function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"syntax-definition"},[n("multimedia-content",[e._v('In this section, we introduce a notation - the "context-free grammar," or "grammar" for short - that is used to specify\nthe syntax of a language. Grammmars will be used throughout this book to organize compiler front ends. A grammar naturally\ndescribes the hierarchical structure of most programming language constructs. For example, an if-else statement in\nJava can have the form\n'),n("formal-notation",[n("strong",[e._v("if")]),e._v(" ( expression ) statement "),n("strong",[e._v("else")]),e._v(" statement\n")]),e._v("\nThat is, an if-else statement is the concatenation of the keyword "),n("expr",[e._v("if")]),e._v(",\nan opening parenthesis, an expression, a closing\nparenthesis, a statement, the keyword "),n("expr",[e._v("else")]),e._v(", and another statement.\nUsing the variable "),n("em",[e._v("expr")]),e._v(" to denote an expression\nand the variable "),n("em",[e._v("stmt")]),e._v(" to denote a statement,\nthis structuring rule can be expressed as \n"),n("formal-notation",[e._v("\n stmt -> "),n("strong",[e._v("if")]),e._v(" ( expr ) stmt "),n("strong",[e._v("else")]),e._v(" stmt\n")]),e._v('\nin which the arrow may be read as "can have the form."\nSuch a rule is called a '),n("em",[e._v("production")]),e._v(".\nIn a production, lexical elements like the keyword "),n("strong",[e._v("if")]),e._v("\nand the parentheses are called "),n("em",[e._v("terminals")]),e._v(".\nVariables like "),n("em",[e._v("expr")]),e._v(" and "),n("em",[e._v("stmt")]),e._v(" represent sequences\nof terminals and are called "),n("em",[e._v("nonterminals")]),e._v(".\n"),n("h3",[e._v("Derivation")]),e._v("\nA grammar derives strings by beginning with the start symbol\nand repeatedly replacing a nonterminal by the body of a production\nfor that nonterminal. The terminal strings that can be derived\nfrom the start symbol form the "),n("em",[e._v("language")]),e._v(" defined by the grammar.\n"),n("br"),e._v(" "),n("em",[e._v("Parsing")]),e._v(" is the problem of taking a string\nof terminals and figuring out how to derive it\nfrom the start symbol of the grammar,\nand if it cannot be derived frorn the start symbol of the grammar,\nthen reporting syntax errors within the string.\nParsing is one of the most fundamental problems in all of compiling.\nFor simplicity, we begin, vith source programs like "),n("expr",[e._v("9-5+2")]),e._v("\nin which each character is a terminal;\nin general, a source program has multicharacter lexemes\nthat are grouped by the lexical analyzer into tokens,\nwhose first components are the terminals processed by the parser.")],1)],1)},[],!1,null,null,null).exports,Vn={name:"syntax-definition",components:{MultimediaContent:dn,Expr:zn,FormalNotation:Fn}},Wn=Object(g.a)(Vn,function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"syntax-definition"},[n("multimedia-content",[e._v("\nA "),n("em",[e._v("context-free grammar")]),e._v(" has four components: \n"),n("ol",[n("li",[e._v("A set of "),n("em",[e._v("terminal")]),e._v(' symbols, sometimes referred to as "tokens."\nThe terminals are the elementary symbols of the language\ndefined by the grammar. ')]),e._v(" "),n("li",[e._v("A set of "),n("em",[e._v("nonterminals")]),e._v(', sometimes called "syntactic variables."\nEach nonterminal represents a set of strings of terminals,\nin a manner we shall describe. \n ')]),e._v(" "),n("li",[e._v("A set of "),n("em",[e._v("productions")]),e._v(", where each production consists\nof a nonterminal, called the "),n("em",[e._v("head")]),e._v(" or "),n("em"),e._v("left side"),e._v("\nof the production, an arrow, and a sequence of terminals and/or nonterminals,\ncalled the "),n("em",[e._v("body")]),e._v(" or "),n("em",[e._v("right-side")]),e._v(" of the production.\nThe intuitive intent of a production is to specify one of\nthe written forms of a construct; if the head nonterminal \nrepresents a construct, then the body represents\na written form of the construct. \n ")]),e._v(" "),n("li",[e._v("A designation of one of the nonterminals as the "),n("em",[e._v("start")]),e._v(" symbol.")])]),e._v("\n\nWe specify grammars by listing their productions,\nwith the productions for the start symbol listed first.\nWe assume that digits, signs such as "),n("strong",[e._v("<")]),e._v(" and "),n("strong",[e._v("<=")]),e._v(", \nand boldface strings such as "),n("strong",[e._v("while")]),e._v(" are terminals.\nAn italicized name is a nonterminal, and any nonitalicized name\nor symbol may be assumed to be a terminal.\nFor notational convenience, productions with the same nonterminal as\nthe head can have tl1eir bodies grouped, with the alternative bodies\nseparated by the symbol "),n("em",[e._v("|")]),e._v(', which we read as "or."')])],1)},[],!1,null,null,null).exports,Jn={name:"syntax-definition",components:{MultimediaContent:dn,Expr:zn,FormalNotation:Fn}},Gn=Object(g.a)(Jn,function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"parse-trees"},[n("multimedia-content",[e._v("A parse tree pictorially shows\nhow the start symbol of a grammar derives a string in the language.\nIf nonterminal "),n("expr",[e._v("A")]),e._v(" has a production "),n("expr",[e._v("A -> XYZ")]),e._v(",\nthen a parse tree may have an interior node labeled "),n("expr",[e._v("A")]),e._v("\nwith three children labeled "),n("expr",[e._v("X")]),e._v(", "),n("expr",[e._v("Y")]),e._v(",\nand "),n("expr",[e._v("Z")]),e._v(", from left to right :\n \nFormally, given a context-free grammar, a "),n("em",[e._v("parse tree")]),e._v("\naccording to the grammar is a tree with the following properties:\n"),n("ol",[n("li",[e._v("The root is labeled by the start symbol.")]),e._v(" "),n("li",[e._v("Each leaf is labeled by a terminal or by "),n("expr",[e._v("epsilon")]),e._v(".")],1),e._v(" "),n("li",[e._v("Each interior node is labeled by a nonterminal.")]),e._v(" "),n("li",[e._v("If "),n("em",[e._v("A")]),e._v(" is the nonterminal labeling some interior node and"),n("br"),e._v(" "),n("expr",[e._v("X_1")]),e._v(", "),n("expr",[e._v("X_2")]),e._v(", ..., "),n("expr",[e._v("X_n")]),e._v("\n are the labels of the children of that node from left to right,\n then there must be a production")],1)]),e._v(" "),n("formal-notation",[e._v("\nA -> "),n("expr",[e._v("X_1")]),e._v(","),n("expr",[e._v("X_2")]),e._v(",...,"),n("expr",[e._v("X_n")])],1),e._v("\nHere, "),n("expr",[e._v("X_1")]),e._v(", "),n("expr",[e._v("X_2")]),e._v(", ..., "),n("expr",[e._v("X_n")]),e._v("\neach stand for a symbol that is either a terminal or a nonterminal.\nAs a special case, if "),n("expr",[e._v("A -> epsilon")]),e._v(" is a production,\nthen a node labeled "),n("em",[e._v("A")]),e._v(" may have a single child labeled\n"),n("expr",[e._v("epsilon")]),e._v(".\n"),n("br"),e._v("\nFrom left to right, the leaves of a tree form the "),n("em",[e._v("yield")]),e._v(" of\nthe tree, which is the string "),n("em",[e._v("generated")]),e._v(" or "),n("em",[e._v("derived")]),e._v("\nfrom the nonterminal at the root of the parse tree.\n"),n("br"),e._v("\nAnother definition of the language generated by a grammar\nis as the set of strings that can be generated by some parse tree.\nThe process of finding a parse tree for a given string of terminals\nis called "),n("em",[e._v("parsing")]),e._v(" that string.")],1)],1)},[],!1,null,null,null).exports,Qn={name:"ambiguity",components:{MultimediaContent:dn,Expr:zn,FormalNotation:Fn}},Xn=Object(g.a)(Qn,function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"ambiguity"},[t("multimedia-content",[this._v("We have to be careful in talking about \nthe structure of a string according to a grammar. \nA grammar can have more than one parse tree generating\na given string of terminals. Such a grammar is said to be "),t("em",[this._v("ambiguous")]),this._v(". \nTo show that a grammar is ambiguous, \nall we need to do is find a terminal string that is the\nyield of more than one parse tree.\nSince a string with more than one parse tree usually has more\nthan one meaning, we need to design unambiguous grammars\nfor compiling a applications, or to use ambiguous grammars\nwith additional rules to resolve the anbiguities.")])],1)},[],!1,null,null,null).exports,Kn={name:"tokens-versus-terminals",components:{MultimediaContent:dn,Expr:zn,FormalNotation:Fn}},Zn=Object(g.a)(Kn,function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"tokens-versus-terminals"},[t("multimedia-content",[this._v("In a compiler, the lexical analyzer reads the characters of\nthe source program, groups them into lexically meaningful\nunits called lexemes, and produces as output tokens\nrepresenting these lexemes. A token consists of two components,\na token name and an attribute value.\nThe token names are abstract symbols that are used by\nthe parser for syntax analysis.\nOften, we shall call these token names terminals,\nsince they appear as terminal symbols in the grammar for a programming\nlanguage. The attribute value, if present,\nis a pointer to the symbol table that contains additional infomnation\nabout the token. This additional information is\nnot part of the grammar, so in our discussion of syntax analysis,\noften we refer to tokens and terminals synonynously.")])],1)},[],!1,null,null,null).exports,eo={name:"associativity-of-operators",components:{MultimediaContent:dn,FormalNotation:Fn,SourceCode:gt,Expr:zn}},to=n(133);var no=Object(g.a)(eo,function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"associativity-of-operators"},[n("multimedia-content",[e._v("\nBy convention, "),n("expr",[e._v("9+5+2")]),e._v(" is equivalent to "),n("expr",[e._v("(9+5)+2")]),e._v(" and "),n("expr",[e._v("9-5-2")]),e._v("\nis equivalent to "),n("expr",[e._v("(9-5)-2")]),e._v(".\nWhen an operand like 5 has operators to its left and right,\nconventions are needed for deciding which operator applies to that operand.\nWe say that the operator "),n("expr",[e._v("+")]),e._v(" "),n("em",[e._v("associates")]),e._v(" to the left,\nbecause an operand with plus signs on both sides of it belongs\nto the operator to its left.\nIn most programming languages the four arithmetic operators,\naddition, subtraction, multiplication, and division are left-associative.\n"),n("br"),e._v("\nSome common operators such as exponentiation are right-associative.\nAs another example, the assignment operator "),n("expr",[e._v("=")]),e._v(" in C\nand its descendants is right-associative;\nthat is, the expression a=b=c is treated in the same way as the expression\n"),n("expr",[e._v("a=(b=c)")]),e._v(".\nStrings like "),n("expr",[e._v("a=b=c")]),e._v(" with a right-associative operator are generated by the following grammar:\n\n"),n("formal-notation",[e._v("\nright -> letter = right | letter\nletter -> a|b|...|z\n")]),e._v("\nNote that the parse tree for "),n("expr",[e._v("9-5-2")]),e._v(" grows down towards the left,\nwhereas the parse tree for "),n("expr",[e._v("a=b=c")]),e._v(" grows down towards the right.\n")],1)],1)},[],!1,function(e){this.$style=to.default.locals||to.default},null,null).exports,oo={name:"precedence-of-operators",components:{MultimediaContent:dn,FormalNotation:Fn,Expr:zn}},io=Object(g.a)(oo,function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"precedence-of-operators"},[n("multimedia-content",[e._v("Consider the expression "),n("expr",[e._v("9+5*2")]),e._v(".\nThere are two possible interpretations of this expression: "),n("expr",[e._v("(9+5)*2")]),e._v("\nor "),n("expr",[e._v("9+(5*2)")]),e._v(". The associativity rules for "),n("expr",[e._v("+")]),e._v("\nand "),n("expr",[e._v("*")]),e._v(" apply to occurrences of the same operator,\nso they do not resolve this ambiguity.\nRules defining the relative precedence of operators are needed \nwhen more than one kind of operator is present.\n"),n("br"),e._v("\nWe say that "),n("expr",[e._v("*")]),e._v(" has higher\nprecedence than "),n("expr",[e._v("+")]),e._v(" if "),n("expr",[e._v("*")]),e._v("\ntakes its operands before "),n("expr",[e._v("+")]),e._v(" does.\nIn ordinary arithmetic, multiplication and division\nhave higher precedence than addition and subtraction.\nTherefore, "),n("expr",[e._v("5")]),e._v(" is taken by "),n("expr",[e._v("*")]),e._v("\nin both "),n("expr",[e._v("9+5*2")]),e._v(" and "),n("expr",[e._v("9*5+2")]),e._v("; i.e.,\nthe expressions are equivalent to "),n("expr",[e._v("9+(5*2)")]),e._v(" and "),e._v("(9*5)+2"),e._v(",\nrespectively.\n ")],1)],1)},[],!1,null,null,null).exports,ao="NUM",so="function",ro={TAG_FUNCTION:so,TAG_ID:"ID",TAG_NUM:ao},lo=function e(t){xe()(this,e),this.tag=t},co=function(e){function t(e){var n;return xe()(this,t),(n=je()(this,De()(t).call(this,ao))).value=parseInt(e,10),n}return Me()(t,e),t}(lo),po=function(e){function t(e,n){var o;return xe()(this,t),(o=je()(this,De()(t).call(this,e))).lexeme=n,o}return Me()(t,e),t}(lo),uo=function(e,t){var n=t;return t instanceof lo&&(n=t.tag),n===e},mo=function(e){return parseInt(e,10)in lt()(Array(10).keys())},ho=function(e){if(void 0===e||"string"!=typeof e)return!1;var t=e.charCodeAt();return t>=97&&t<=122||t>=65&&t<=90},fo=function(e){return e instanceof lo&&e.tag===ro.TAG_NUM},go=function(e){return e instanceof lo&&e.tag===ro.TAG_ID},Ao=function(){function e(t){xe()(this,e),this.line=1,this.peek=" ",this.reader=t,this.words={function:new po(so,"function")}}return we()(e,[{key:"scan",value:function(){for(;;){this.peek=this.reader.scan();var e=function(e){return" "===e||"\t"===e?0:"\n"===e?1:null}(this.peek);if(null===e)break;this.line=this.line+e}if(mo(this.peek)){var t=0;do{t=10*t+parseInt(this.peek,10),this.peek=this.reader.scan()}while(mo(this.peek));return this.reader.rewind(),new co(t)}if(ho(this.peek)){var n="";do{n+=this.peek,this.peek=this.reader.scan()}while(ho(this.peek)||mo(this.peek));this.reader.rewind();var o=this.words[n];return void 0!==o?o:(o=new po("ID",n),this.words[n]=o,o)}var i=new lo(this.peek);return this.peek=" ",i}}]),e}(),vo=function(e){function t(){return xe()(this,t),je()(this,De()(t).apply(this,arguments))}return Me()(t,e),we()(t,null,[{key:"guardAgainstNumbersAsOperands",value:function(){return new t(t.operandsShouldBeDigitsMessage)}},{key:"guardAgainstNonAdditiveOperations",value:function(){return new t(t.operationsShouldBeAdditive)}},{key:"guardAgainstWhitespaces",value:function(){return new t(t.operationsShouldNotContainWhitespaces)}}]),t}(Ne()(SyntaxError));vo.operandsShouldBeDigitsMessage="This translator handles operations <br />on digits (not numbers).",vo.operationsShouldBeAdditive="This translator handles additive operations.",vo.operationsShouldNotContainWhitespaces="This translator does not handle whitespaces.";var _o=function(){function e(t,n){xe()(this,e),this.programCharacters=t.split(""),this.lookaheadPosition=0,this.peekPosition=0,e.guardAgainstExceptions(n,t)}return we()(e,[{key:"scan",value:function(){if(this.programCharacters.length<this.lookaheadPosition+1)return null;var e=this.programCharacters[this.lookaheadPosition];return this.lookaheadPosition=this.lookaheadPosition+1,e}},{key:"rewind",value:function(){this.lookaheadPosition=this.lookaheadPosition-1}}],[{key:"guardAgainstExceptions",value:function(e,t){if("a-translator-for-simple-expressions"!==e){if("lexical-analyzer"!==e){if("symbol-tables"===e&&t.match(/[^a-zA-Z0-9{}\s]/))throw vo.guardAgainstNonAdditiveOperations()}else if(t.match(/[^a-zA-Z0-9+-\s]/))throw vo.guardAgainstNonAdditiveOperations()}else{if(t.match(/[0-9]{2,}/))throw vo.guardAgainstNumbersAsOperands();if(t.match(/\s/))throw vo.guardAgainstWhitespaces();if(t.match(/[^0-9+-]/))throw vo.guardAgainstNonAdditiveOperations()}}}]),e}(),yo=function(){function e(t){xe()(this,e),this.reader=t,this.lookahead=this.reader.scan(),this.output=""}return we()(e,[{key:"appendToken",value:function(e){fo(e)?this.output=this.output+e.value:go(e)||function(e){return e instanceof lo&&-1!==[ro.TAG_FUNCTION].indexOf(e.tag)}(e)?this.output=this.output+e.lexeme:this.appendLastCharacter(e)}},{key:"appendLastCharacter",value:function(e){this.output=this.output+e}},{key:"getOutput",value:function(){return this.output}},{key:"parse",value:function(){return this.expr(),this.output}},{key:"expr",value:function(){for(this.term();;)if(uo("+",this.lookahead))this.match("+"),this.term(),this.appendToken("+");else{if(!uo("-",this.lookahead))return;this.match("-"),this.term(),this.appendToken("-")}}},{key:"isValidTerm",value:function(){return mo(this.lookahead)||fo(this.lookahead)||go(this.lookahead)}},{key:"term",value:function(){if(this.isValidTerm())return this.appendToken(this.lookahead),void this.match(this.lookahead);throw new vo("Invalid term")}},{key:"match",value:function(e){var t=this.lookahead;if(this.lookahead instanceof lo&&!(e instanceof lo)&&(t=this.lookahead.tag),e!==t)throw new vo("Unknown token: ".concat(t));this.lookahead=this.reader.scan()}}]),e}(),bo={name:"a-translator-for-simple-expressions",components:{"multimedia-content":dn,"input-area":D,"source-code":gt},mounted:function(){j.$on("source.changed",this.parseChanges)},data:function(){return{postfixTranslation:""}},methods:{getParser:function(e){return new yo(e)},getCharacterReader:function(e){return new _o(e,this.$route.name)},parseChanges:function(e){var t=e.text;try{var n=this.getParser(this.getCharacterReader(t));this.postfixTranslation=n.parse()}catch(e){this.postfixTranslation=e.message}}}},xo=n(132);var Co=Object(g.a)(bo,function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"content content--no-first-letter"},[t("multimedia-content"),this._v(" "),t("input-area"),this._v(" "),t("source-code",{domProps:{innerHTML:this._s(this.postfixTranslation)}})],1)},[],!1,function(e){this.$style=xo.default.locals||xo.default},null,null).exports,wo={name:"lexical-analyzer",components:{MultimediaContent:dn,"input-area":D,"source-code":gt},mounted:function(){j.$on("source.changed",this.parseChanges)},data:function(){return{postfixTranslation:""}},methods:{getParser:function(e){return new yo(e)},getCharacterReader:function(e){return new _o(e,this.$route.name)},getLexer:function(e){return new Ao(e)},parseChanges:function(e){var t=e.text;this.postfixTranslation="";try{var n=this.getLexer(this.getCharacterReader(t)),o=this.getParser(n);this.postfixTranslation=o.parse()}catch(e){if(e instanceof vo)return void(this.postfixTranslation=e.message);throw e}}}},Bo=n(131);var jo={AModelOfACompilerFrontEnd:$n,SyntaxDefinition:Yn,DefinitionOfGrammars:Wn,ParseTrees:Gn,Ambiguity:Xn,TokensVersusTerminals:Zn,AssociativityOfOperators:no,PrecedenceOfOperators:io,ATranslatorForSimpleExpressions:Co,LexicalAnalyzer:Object(g.a)(wo,function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"content content--no-first-letter"},[t("input-area"),this._v(" "),t("source-code",{domProps:{innerHTML:this._s(this.postfixTranslation)}})],1)},[],!1,function(e){this.$style=Bo.default.locals||Bo.default},null,null).exports},ko={name:"environments-and-states",components:{MultimediaContent:dn,Expr:zn}},Do=Object(g.a)(ko,function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"environments-and-states"},[n("multimedia-content",[e._v("The association of names with locations in \nmemory (the store) and then with values can be described\nby two mappings that change as the program runs\n"),n("ol",[n("li",[e._v("The "),n("em",[e._v("environment")]),e._v(' is a mapping from names to locations in the store. \nSince variables refer to locations ("I-values" in the terminology of C),\nwe could alternatively define an environment as a mapping from names\nto variables.')]),e._v(" "),n("li",[e._v("The "),n("em",[e._v("state")]),e._v(" is a mapping from locations in store to their values.\nThat is, the static I-values to their corresponding r-values ,\nin the terminology of C.\n ")])])])],1)},[],!1,null,null,null).exports,To={name:"dynamic-scope",components:{MultimediaContent:dn,Expr:zn}},Mo=Object(g.a)(To,function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"dynamic-scope"},[t("multimedia-content",[this._v("Technically, any scoping policy is dynamic\nif it is based on factor(s) that can be known only\nwhen the program executes.\nThe term "),t("em",[this._v("dynamic scope")]),this._v(", however,\nusually refers to the following policy: a use of a name "),t("em",[this._v("x")]),this._v("\nrefers to the declaration of "),t("em",[this._v("x")]),this._v(" in the most recenlty called,\nnot-yet-terminated, procedure with such a declaration.\nDynamic scoping of this type appears only in special situations.\nWe shall consider two examples of dynamic policies:\nmacro expansion in the C preprocessor and method resolution\nin object-oriented programming.\n ")])],1)},[],!1,null,null,null).exports,Eo={name:"declarations-and-definitions",components:{MultimediaContent:dn,Expr:zn}},So=Object(g.a)(Eo,function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"declarations-and-definitions"},[n("multimedia-content",[e._v('The apparently similar terms "declaration" and\n"definition" for programming-language concepts are actually quite different.\nDeclarations tell us about the types of things,\nwhile definitions tell us about their values.\nThus, '),n("expr",[e._v("int i")]),e._v(" is a declaration of "),n("em",[e._v("i")]),e._v(",\nwhile "),n("expr",[e._v("i = 1")]),e._v(" is a definition of "),n("em",[e._v("i")]),e._v(".\n"),n("br"),e._v("\nThe difference is more significant when we deal with methods\nor other procedures.\nIn C++, a method is declared in a class definition,\nby giving the types of the arguments and result of the method\n(often called the "),n("em",[e._v("signature")]),e._v(" for the method).\nThe method is then defined, i.e., the code for executing the method is given,\nin another place. Similarly, it is common to define a C function\nin one file and declare it in other files where the function is used.\n ")],1)],1)},[],!1,null,null,null).exports,Oo={name:"static-scope-and-block-structure",components:{MultimediaContent:dn,Expr:zn}},No={name:"anology-between-static-and-dynamic-scoping",components:{MultimediaContent:dn,Expr:zn}},Io={name:"call-by-value",components:{MultimediaContent:dn,Expr:zn}},Ro={name:"call-by-reference",components:{MultimediaContent:dn,Expr:zn}},Uo={name:"aliasing",components:{MultimediaContent:dn,Expr:zn}},qo={DynamicScope:Mo,EnvironmentsAndStates:Do,StaticScopeAndBlockStructure:Object(g.a)(Oo,function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"static-scope-and-block-structure"},[n("multimedia-content",[e._v("In C, the syntax of blocks is given by\n"),n("ol",[n("li",[e._v("One type of statement is a block.\nBlocks can appear anywhere that other types of statements,\nsuch as assignment statements, can appear.\n ")]),e._v(" "),n("li",[e._v("A block is a sequence of declarations followed by a sequence\nof statements, all surrounded by braces.\n ")])]),e._v("\n\nNote that this syntax allows blocks to be nested inside each other.\nThis nesting property is referred to as block structure.\nThe C family of languages has block structure,\nexcept that a function may not be defined inside another function.\n"),n("br"),e._v("\nWe say that a declaration "),n("em",[e._v("D")]),e._v(' "belongs" to a block '),n("em"),e._v("B"),e._v("\nif "),n("em",[e._v("B")]),e._v(" is\nthe most closely nested block containing "),n("em",[e._v("D")]),e._v(";\nthat is, "),n("em",[e._v("D")]),e._v(" is located within "),n("em",[e._v("B")]),e._v(",\nbut not within any block that is nested within "),n("em",[e._v("B")]),e._v(".\n"),n("br"),e._v("\nThe static-scope rule for variable declarations\nin block-structured languages is as follows.\nIf declaration "),n("em",[e._v("D")]),e._v(" of name "),n("em",[e._v("x")]),e._v(" belongs to block "),n("em",[e._v("B")]),e._v(",\nthen the scope of "),n("em",[e._v("D")]),e._v(" is all of "),n("em",[e._v("B")]),e._v(",\nexcept for any blocks "),n("em",[e._v("B'")]),e._v(" nested to any depth within "),n("em",[e._v("B")]),e._v(",\nin which "),n("em",[e._v("x")]),e._v(" is redeclared.\nHere, "),n("em",[e._v("x")]),e._v(" is redeclared in "),n("em",[e._v("B'")]),e._v(" if some other declaration "),n("em",[e._v("D'")]),e._v("\nof the same name "),n("em",[e._v("x")]),e._v(" belongs to "),n("em",[e._v("B'")]),e._v(".\n ")])],1)},[],!1,null,null,null).exports,DeclarationsAndDefinitions:So,AnalogyBetweenStaticAndDynamicScoping:Object(g.a)(No,function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"analogy-between-static-and-dynamic-scoping"},[t("multimedia-content",[this._v("While there could be any number of static or\ndynamic policies for scoping,\nthere is an interesting relationship between the normal (block-structured)\nstatic scoping rule and the normal dynamic policy.\nIn a sense, the dynamic rule is to time as the static rule is to space.\nWhile the static rule asks us to find the declaration whose unit (block)\nmost closely surrounds the physical location of the use,\nthe dynamic rule asks us to find the declaration whose unit (procedure invocation)\nmost closely surrounds the time of the use.\n")])],1)},[],!1,null,null,null).exports,CallByValue:Object(g.a)(Io,function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"call-by-value"},[n("multimedia-content",[e._v("In call-by-value, the actual parameter is evaluated\n(if it is an expression) or copied (if it is a variable).\nThe value is placed in the location belonging to the corresponding formal parameter\nof the called procedure.\nThis method is used in C and Java, and is a common option in C++,\nas well as in most other languages.\nCall-by-value has the effect that all computation involving the formal parameters\ndone by the called procedure is local to that procedure,\nand the actual parameters themselves cannot be changed.\n"),n("br"),e._v("\nNote, however, that in C we can pass a pointer to a variable\nto allow that variable to be changed by the callee.\nLikewise, array names passed as pararmeters in C, C++, or Java\ngive the called procedure what is in effect a pointer\nor reference to the array itself.\nThus, if "),n("em",[e._v("a")]),e._v(" is the name of an array of the calling procedure,\nand it is passed by value to corresponding formal parameter "),n("em",[e._v("x")]),e._v(",\nthen an assignment such as "),n("expr",[e._v("x[i] = 2")]),e._v(" really\nchanges the array element "),n("em",[e._v("a[i]")]),e._v(" to "),n("expr",[e._v("2")]),e._v(".\nThe reason is that, although "),n("em",[e._v("x")]),e._v(" gets a copy of the value\nof "),n("em",[e._v("a")]),e._v(", that value is really a pointer to the beginning\nof the area of the store where the array named "),n("em",[e._v("a")]),e._v(" is located.\n"),n("br"),e._v("\nSimilarly, in Java, many variables are really references,\nor pointers. to the things they stand for.\nThis observation applies to arrays, strings, and object of \nall classes. Even though Java uses call-by-value exclusively, \nwheneve we pass the name of an object to a called procedure,\nthe value received by that procedure is in effect a pointer\nto the object. Thus, the called procedure is able\nto affect the value of the object itself.")],1)],1)},[],!1,null,null,null).exports,CallByReference:Object(g.a)(Ro,function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"call-by-reference"},[t("multimedia-content",[this._v("In call-by-reference, the address of the actual parameter\nis passed to the callee as the value of the corresponding formal parameter.\nUses of the formal parameter in the code of the callee are implemented\nby following this pointer to the location indicated by the caller.\nChanges to the formal parameter thus appear as changes to the actual parameter.\n"),t("br"),this._v("\nIf the actual parameter is an expression, however,\nthen the expression is evaluated before the call,\nand its value stored in a location of its own.\nChanges to the formal parameter change the value in this location,\nbut can have no effect on the data of the caller.\n"),t("br"),this._v('\nCall-by-reference is used for "ref" parameters in C++ and\nis an option in many other languages.\nIt is almost essential when the formal parameter is a large object,\narray, or structure. The reason is that strict call-by-value requires that the caller copy\n the entire actual parameter into the space belonging\n to the corresponding formal parameter.\n This copying gets expensive when the parameter is large.\n As we noted when discussing call-by-value,\n languages such as Java solve the problem of passing arrays,\n strings, or other objects by copying only a reference to those objects.\n The effect is that Java behaves as if it used call-by-reference\n for anything other than a basic type such as an integer or real.\n')])],1)},[],!1,null,null,null).exports,Aliasing:Object(g.a)(Uo,function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"aliasing"},[n("multimedia-content",[e._v("\nThere is an interesting consequence of call-by-reference parameter\npassing or its simulation, as in Java, where references to \nobjects are passed by value. It is possible that two \nformal parameters can refer to the same location; such variables are \nsaid to be aliases of one another. \nAs a result, any two varriab les,\nwhich may appear to take their values from two distinct\nformal parameters, can become aliases of each other, as well.\nIt turns out that understanding aliasing and the mechanisms\nthat create it is essential if a compiler is to optimize a program.\nThere are many situations where we can only optimize code if,\nwe can be sure certain variables are not aliased.\nFor instance, we might determine that "),n("expr",[e._v("x = 2")]),e._v("\nis the only place tl1at variable "),n("em",[e._v("x")]),e._v(" is ever assigned.\nIf so, then we can replace a use of "),n("em",[e._v("x")]),e._v(" by a use of "),n("exp",[e._v("2")]),e._v(";\nfor example, replace "),n("expr",[e._v("a = x+3")]),e._v(" by the simpler\n"),n("expr",[e._v("a = 5")]),e._v(". But suppose there were another variable "),n("em",[e._v("y")]),e._v("\nthat was aliased to "),n("em",[e._v("x")]),e._v(". \nThen an assignment "),n("expr",[e._v("y = 4")]),e._v(" might have the unexpected\neffect of changing "),n("em",[e._v("x")]),e._v(".\nIt might also mean that replacing "),n("expr",[e._v("a = x+3")]),e._v(" by\n"),n("expr",[e._v("a = 5")]),e._v(" was a mistake;\nthe proper value of "),n("em",[e._v("a")]),e._v(" could be "),n("expr",[e._v("7")]),e._v(" there.\n")],1)],1)},[],!1,null,null,null).exports},zo={name:"transition-table",props:{transitions:Object,required:!0},computed:{symbols:function(){var e=this.transitions,t=Bt()(this.transitions).reduce(function(t,n){return Bt()(e[n]).map(function(e){-1===t.indexOf(e)&&t.push(e)}),t},[]);return t.sort()},transitionRows:function(){var e=this,t={},n=this.transitions;return Bt()(this.transitions).map(function(o){e.symbols.map(function(e){if(void 0===n[o]||void 0===n[o][e])return void 0===t[o]&&(t[o]={}),void(t[o][e]="∅");void 0===t[o]&&(t[o]={}),t[o][e]=n[o][e][0]})}),t}}},Lo=(n(195),Object(g.a)(zo,function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"transition-table"},[n("div",{staticClass:"transition-table__row transition-table__row--header"},[n("div",{staticClass:"transition-table__state"},[e._v("State")]),e._v(" "),e._l(e.symbols,function(t){return n("div",{staticClass:"transition-table__symbol"},[e._v("\n "+e._s(t)+"\n ")])})],2),e._v(" "),e._l(Object.keys(e.transitions),function(t,o){return n("div",{staticClass:"transition-table__row",class:{"transition-table__row--last":o===Object.keys(e.transitions).length-1}},[n("div",{staticClass:"transition-table__state"},[e._v("\n "+e._s(t)+"\n ")]),e._v(" "),e._l(e.transitionRows[t],function(t,o){return n("div",{staticClass:"transition-table__destination",domProps:{innerHTML:e._s(t)}})})],2)})],2)},[],!1,null,"2e6beb09",null).exports),$o=n(173),Po=n.n($o),Fo=n(172),Ho=n(191),Yo=Ho.Module,Vo=Ho.render,Wo={name:"from-regular-expressions-to-automata",components:{BrowsableLink:B,InputArea:D,MultimediaContent:dn,TransitionTable:Lo},data:function(){return{inputText:"",transitions:{}}},mounted:function(){j.$on("source.changed",this.parseInput)},methods:{resetGraphic:function(e){var t=this;void 0!==this.$refs["visualization".concat(e)]&<()(Array(this.$refs["visualization".concat(e)].children.length).keys()).map(function(n){t.$refs["visualization".concat(e)].children[n].remove()})},parseInput:function(e){var t=this;this.resetGraphic("-dfa"),this.resetGraphic("-nfa"),this.inputText=e.text.trim(),0!==this.inputText.trim().length&&[{suffix:"-dfa",parsingMethod:"parseToDFA"},{suffix:"-nfa",parsingMethod:"parseToNFA"}].map(function(e){var n=new Po.a.RegParser(t.inputText)[e.parsingMethod](),o=new Fo.a({Module:Yo,render:Vo});if("-dfa"==e.suffix){var i=Bt()(n.transitions).reduce(function(e,t){for(var o in n.transitions[t]){var i=n.transitions[t][o];void 0===e[t]&&(e[t]={}),void 0!==e[t][i]?e[t][i].push(o):e[t][i]=[o]}return e},{});t.transitions=i}o.renderSVGElement(n.toDotScript()).then(function(n){var o="visualization".concat(e.suffix);void 0!==t.$refs[o]&&t.$refs[o].appendChild(n)}).catch(function(e){throw e})})}}},Jo=(n(185),Object(g.a)(Wo,function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"from-regular-expressions-to-automata content content--no-first-letter"},[n("input-area",{attrs:{"text-at-first":"ab+"}}),e._v(" "),n("br"),e._v(" "),n("multimedia-content",[e._v("\n Change the regular expression and click out of the text field\nto generate a transition table, a Non-Deterministic Finite Automaton (NFA),\nand a Deterministic Finite Automaton (DFA).\n See "),n("browsable-link",{attrs:{href:"https://github.com/hokein/Automata.js"}},[e._v("Automata.js")]),e._v("\nand "),n("browsable-link",{attrs:{href:"https://github.com/mdaines/viz.js"}},[e._v("Viz.js")])],1),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.inputText.length>0,expression:"inputText.length > 0"}],staticClass:"from-regular-expressions-to-automata__visualizations"},[n("transition-table",{attrs:{transitions:e.transitions}}),e._v(" "),n("div",{ref:"visualization-dfa",staticClass:"from-regular-expressions-to-automata__visualization"}),e._v(" "),n("div",{ref:"visualization-nfa",staticClass:"from-regular-expressions-to-automata__visualization from-regular-expressions-to-automata__visualization--dfa"})],1)],1)},[],!1,null,null,null).exports),Go=n(171),Qo={name:"lexical-analyzer",components:{Dictionary:ht,InputArea:D,MultimediaContent:dn,BrowsableLink:B,SourceCode:gt},mounted:function(){j.$on("parsing.antlr.failed",this.handleFailedParsing),j.$on("parsing.antlr.succeeded",this.hideErrorMessageContainer),j.$on("node.altered",this.updateClipboardReadyJSON),this.$nextTick(function(){this.clipboardReadyJSON=this.getClipboardReadyJson()})},updated:function(){this.$nextTick(function(){this.clipboardReadyJSON=this.getClipboardReadyJson()})},methods:{copyToClipboard:function(){this.$notify({group:"actions",title:"What could possibly go wrong?",text:"This edited version of your JSON should have been copied to your clipboard\n If not please kindly open an issue at http://bit.ly/new-issue-json-editor",position:"top left",duration:1e4})},failedToCopy:function(){this.sharedState.error(new Error("Ooops, I may need a better suited way for handling errors","json-parser"))},handleFailedParsing:function(e){this.errorMessage=e.errorMessage,this.showError=!0},hideErrorMessageContainer:function(){this.showError=!1},updateClipboardReadyJSON:function(){this.clipboardReadyJSON=this.getClipboardReadyJson()},getClipboardReadyJson:function(){if(void 0===this.$refs.dictionary)return"";if(void 0===this.$refs.dictionary.$refs.jsonEditor)return"";if(void 0===this.$refs.dictionary.$refs.jsonEditor)return"";if(void 0===this.$refs.dictionary.$refs.jsonEditor.$refs["json-editor"])return"";if(void 0===this.$refs.dictionary.$refs.jsonEditor.$refs["json-editor"].$refs["dynamic-json"])return"";var e,t=this.$refs.dictionary.$refs.jsonEditor.$refs["json-editor"].$refs["dynamic-json"];t.classList.add("with-punctuation"),this.sharedState.noPendingCopy=!1;try{e=b()(JSON.parse(t.innerText),null,"\t")}catch(t){this.sharedState.error(t,"json-parser"),e="{}"}return this.sharedState.noPendingCopy=!0,t.classList.remove("with-punctuation"),e}},computed:{prettyPrintedExample:function(){return b()(this.defaultExample,null,"\t")}},data:function(){return{clipboardReadyJSON:"",defaultExample:Go,errorMessage:"",sharedState:E.state,showError:!1}}},Xo=n(130);var Ko={FromRegularExpressionsToAutomata:Jo,JsonParser:Object(g.a)(Qo,function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"json-parser content content--no-first-letter"},[n("section",{staticClass:"json-parser__input"},[n("input-area",{attrs:{"text-at-first":e.prettyPrintedExample}}),e._v(" "),n("button",{directives:[{name:"clipboard",rawName:"v-clipboard",value:e.clipboardReadyJSON,expression:"clipboardReadyJSON"}],staticClass:"json-parser__button",on:{mouseover:e.updateClipboardReadyJSON,success:e.copyToClipboard,error:e.failedToCopy}},[n("font-awesome-icon",{staticClass:"json-parser__icon-copy",attrs:{icon:"copy"}}),e._v("\n Copy JSON\n ")],1)],1),e._v(" "),n("multimedia-content",[e._v("\n Suggestions and issues can provided at\n "),n("browsable-link",{attrs:{href:"http://bit.ly/new-issue-json-editor"}},[e._v("http://bit.ly/new-issue-json-editor")])],1),e._v(" "),n("dictionary",{directives:[{name:"show",rawName:"v-show",value:!e.showError,expression:"!showError"}],ref:"dictionary",attrs:{"literal-object":e.defaultExample,activeParser:""}}),e._v(" "),n("source-code",{directives:[{name:"show",rawName:"v-show",value:e.showError,expression:"showError"}]},[e._v(e._s(e.errorMessage))])],1)},[],!1,function(e){this.$style=Xo.default.locals||Xo.default},null,null).exports},Zo={About:vt,Introduction:Ct,StructureOfACompiler:pn,GroupingOfPhasesIntoPasses:fn,CompilerConstructionTools:An,TheScienceOfBuildingACompiler:_n,TheScienceOfCodeOptimization:bn,TheEvolutionOfProgrammingLanguages:Cn,TheMoveToHigherLevelLanguages:Bn,ImpactsOnCompilers:kn,ApplicationsOfCompilerTechnology:Tn,ImplementationOfHighLevelProgrammingLanguages:En,OptimizationsForComputerArchitectures:On,ProgramTranslations:In,SoftwareProductivityTools:Un},ei=_()({},Zo,jo,qo,Ko),ti=[{name:"dynamic-scope",text:"Dynamic Scope",path:"/programming-language-basics/dynamic-scope",components:{content:ei.DynamicScope}},{name:"environments-and-states",text:"Environment and States",path:"/programming-language-basics/environments-and-states",components:{content:ei.EnvironmentsAndStates}},{name:"static-scope-and-block-structure",text:"Static Scope and Block Structure",path:"/programming-language-basics/static-scope-and-block-structure",components:{content:ei.StaticScopeAndBlockStructure}},{name:"declarations-and-definitions",text:"Declarations and Definitions",path:"/programming-language-basics/declarations-and-definitions",components:{content:ei.DeclarationsAndDefinitions}},{name:"anology-between-static-and-dynamic-scoping",text:"Analogy Betweem Static and Dynamic Scoping",path:"/programming-language-basics/anology-between-static-and-dynamic-scoping",components:{content:ei.AnalogyBetweenStaticAndDynamicScoping}},{name:"call-by-value",text:"Call-by-Value",path:"/programming-language-basics/call-by-value",components:{content:ei.CallByValue}},{name:"call-by-reference",text:"Call-by-Reference",path:"/programming-language-basics/call-by-reference",components:{content:ei.CallByReference}},{name:"aliasing",text:"Aliasing",path:"/programming-language-basics/aliasing",components:{content:ei.Aliasing}}],ni=ti.map(function(e){return e.name}),oi=[{name:"a-model-of-a-compiler-front-end",text:"A Model of a Compiler Front End",path:"/a-simple-syntax-directed-translator/a-model-of-a-compiler-front-end",components:{content:ei.AModelOfACompilerFrontEnd}},{name:"syntax-definition",text:"Syntax Definition",path:"/a-simple-syntax-directed-translator/syntax-definition",components:{content:ei.SyntaxDefinition}},{name:"definition-of-grammars",text:"Definition of Grammars",path:"/a-simple-syntax-directed-translator/definition-of-grammars",components:{content:ei.DefinitionOfGrammars}},{name:"tokens-versus-terminal",text:"Tokens versus Terminals",path:"/a-simple-syntax-directed-translator/tokens-versus-terminals",components:{content:ei.TokensVersusTerminals}},{name:"parse-trees",text:"Parse Trees",path:"/a-simple-syntax-directed-translator/parse-trees",components:{content:ei.ParseTrees}},{name:"ambiguity",text:"Ambiguity",path:"/a-simple-syntax-directed-translator/ambiguity",components:{content:ei.Ambiguity}},{name:"a-translator-for-simple-expressions",text:"A Translator for Simple Expressions",path:"/a-simple-syntax-directed-translator/a-translator-for-simple-expressions",components:{content:ei.ATranslatorForSimpleExpressions}},{name:"associativity-of-operators",text:"Associativity of Operators",path:"/a-simple-syntax-directed-translator/associativity-of-operators",components:{content:ei.AssociativityOfOperators}},{name:"precedence-of-operators",text:"Precedence of Operators",path:"/a-simple-syntax-directed-translator/precedence-of-operators",components:{content:ei.PrecedenceOfOperators}},{name:"lexical-analyzer",text:"Lexical Analysis",path:"/a-simple-syntax-directed-translator/lexical-analyzer",components:{content:ei.LexicalAnalyzer}}],ii=oi.map(function(e){return e.name}),ai=[{name:"from-regular-expressions-to-automata",text:"From Regular Expressions to Automata",path:"/lexical-analysis/from-regular-expressions-to-automata",components:{content:ei.FromRegularExpressionsToAutomata}},{name:"json-parser",isPublic:!0,text:"JSON parser",path:"/lexical-analysis/json-parser",components:{content:ei.JsonParser}}],si=[{name:"introduction",text:"Introduction",path:"/introduction",subtitle:"Language processors"},{name:"structure-of-a-compiler",text:"The Structure of a Compiler",path:"/structure-of-a-compiler/phases-of-a-compiler",subMenuNames:["phases-of-a-compiler","grouping-of-phases-into-passes","compiler-construction-tools"]},{name:"the-evolution-of-programming-languages",text:"The Evolution of Programming Languages",path:"/the-evolution-of-programming-languages/the-move-to-higher-level-languages",introduction:"the-evolution-of-programming-languages",subtitle:"The Evolution of programming languages",subMenuNames:["the-move-to-higher-level-languages","impacts-on-compilers"]},{name:"the-science-of-building-a-compiler",text:"The Science of Building a Compiler",path:"/the-science-of-building-a-compiler",introduction:"the-science-of-building-a-compiler",subtitle:"The Science of Code Optimization"},{name:"applications-of-compiler-technology",text:"Applications of Compiler Technology",path:"/applications-of-compiler-technology/implementation-of-high-level-programming-languages",introduction:"applications-of-compiler-technology",subtitle:"Implementation of High-Level Programming Languages",subMenuNames:["implementation-of-high-level-programming-languages","optimizations-for-computer-architectures","program-translations","software-productivity-tools"]},{name:"programming-language-basics",text:"Programming Language Basics",path:"/programming-language-basics/dynamic-scope",subMenuNames:ni},{name:"a-simple-syntax-directed-translator",text:"A Simple Syntax Directed Translator",path:"/a-simple-syntax-directed-translator/a-model-of-a-compiler-front-end",subMenuNames:ii},{name:"lexical-analysis",text:"Lexical Analysis",path:"/lexical-analysis/from-regular-expressions-to-automata",subMenuNames:ai.map(function(e){return e.name}),isPublic:!0},{name:"about",text:"About",path:"/about",isPublic:!0}],ri=function(e){return void 0!==e&&0===si.filter(function(t){return void 0!==t.subMenuNames&&-1!==t.subMenuNames.indexOf(e)}).length},li=function(e){return!ri(e)},ci=function(e,t){return!!li(e)&&1===si.filter(function(e){return e.path===t}).length},pi=function(e){return!!li(e)},ui=function(e){if(pi(e)){var t=si.filter(function(t){return void 0!==t.subMenuNames&&-1!==t.subMenuNames.indexOf(e)});if(1!==t.length)throw new Error("Logic exception: There should be exactly a matching menu");return t[0].name}},mi=function(e,t){return void 0!==pi(e)&&void 0!==pi(t)&&ui(e)===ui(t)},di=function(e,t){return e.map(function(e){return{components:e.components,name:e.name,path:e.path.replace("/".concat(t,"/"),"")}})},hi={menuItems:si,subMenuItems:{"structure-of-a-compiler":[{name:"phases-of-a-compiler",text:"Phases of a compiler",path:"/structure-of-a-compiler/phases-of-a-compiler"},{name:"grouping-of-phases-into-passes",text:"Grouping of phases into passes",path:"/structure-of-a-compiler/grouping-of-phases-into-passes"},{name:"compiler-construction-tools",path:"/structure-of-a-compiler/compiler-construction-tools",text:"Compiler-Construction Tools"}],"the-evolution-of-programming-languages":[{name:"the-move-to-higher-level-languages",text:"The Move to Higher-level Languages",hasIntroduction:!0,path:"/the-evolution-of-programming-languages/the-move-to-higher-level-languages"},{name:"impacts-on-compilers",text:"Impacts on Compilers",path:"/the-evolution-of-programming-languages/impacts-on-compilers"}],"applications-of-compiler-technology":[{name:"implementation-of-high-level-programming-languages",text:"Implementation of High-Level Programming Languages",hasIntroduction:!0,path:"/applications-of-compiler-technology/implementation-of-high-level-programming-languages"},{name:"optimizations-for-computer-architectures",text:"Optimizations for Computer Architectures",path:"/applications-of-compiler-technology/optimizations-for-computer-architectures"},{name:"program-translations",text:"Program Translations",path:"/applications-of-compiler-technology/program-translations"},{name:"software-productivity-tools",text:"Software Productivity Tools",path:"/applications-of-compiler-technology/software-productivity-tools"}],"programming-language-basics":ti,"a-simple-syntax-directed-translator":oi,"lexical-analysis":ai},methods:{isMenuItem:ri,isSubMenuItem:li,isFirstChildOfMenuItem:ci,haveSameParent:mi,willCloseMenuAfterNavigation:function(e,t){return ri(t.name)||li(e.name)&&li(t.name)&&(!ci(t.name,t.path)||mi(e.name,t.name))}},routes:{"programming-language-basics":function(e){return di(ti,e)},"a-simple-syntax-directed-translator":function(e){return di(oi,e)},"lexical-analysis":function(e){return di(ai,e)}}},fi={components:ei,name:"navigation-menu",mounted:function(){j.$on("menu_item.clicked",this.scrollToMenuTop)},methods:{scrollToMenuTop:function(){this.$refs.header.scrollTop=0},toggleTableOfContents:function(){var e=this;this.tableOfContentsTogglingLocked||(this.appState.tableOfContentsIsVisible=!this.appState.tableOfContentsIsVisible,this.tableOfContentsTogglingLocked=!0,setTimeout(function(){e.tableOfContentsTogglingLocked=!1},500))},isMenuActive:function(e){return this.getActiveMenuItem.name==e.name},getTitleClasses:function(){return{"navigation-menu__title":!0}},getSubtitleClasses:function(){return{"navigation-menu__subtitle":!0}},getSubMenuItems:function(e){return void 0!==this.subMenuItems[e]&&this.subMenuItems[e]},isPublic:function(e){return e.isPublic||this.wouldLoveToAccessCopyrightedMaterialsForNoCommercialUse}},computed:{wouldLoveToAccessCopyrightedMaterialsForNoCommercialUse:function(){return"peek"in this.$route.query},activeMenuItemHasIntroduction:function(){return this.aMenuItemHasBeenSelected&&this.getActiveMenuItem.introduction},showTableOfContents:function(){return this.appState.tableOfContentsIsVisible},getToggleMenuIcon:function(){return this.showTableOfContents?"arrow-alt-circle-down":"arrow-alt-circle-up"},getToggleMenuButtonLabel:function(){return this.showTableOfContents?"Hide Table of Contents":"Show Table of Contents"},shouldShowActiveMenuText:function(){return this.aMenuItemHasBeenSelected&&this.getActiveSubMenuItem&&this.getActiveSubMenuItem.text},shouldShowSubtitle:function(){return this.getActiveMenuItem.subtitle&&(!this.getActiveMenuItem.introduction||this.aMenuItemHasBeenSelected)},shouldShowIntroductionBeforeContent:function(){return this.aSubMenuItemHasBeenSelected&&this.getActiveMenuItem.introduction&&this.getActiveSubMenuItem.hasIntroduction},getMenuItems:function(){return this.menuItems},aMenuItemHasBeenSelected:function(){return hi.methods.isMenuItem(this.$route.name)},aSubMenuItemHasBeenSelected:function(){return hi.methods.isSubMenuItem(this.$route.name)},getActiveMenuItem:function(){var e=this.$route.name;if(void 0!==e){var t=this.menuItems.filter(function(t){return t.name===e});return 1===t.length?t[0]:1!==(t=this.menuItems.filter(function(t){return void 0!==t.subMenuNames&&-1!==t.subMenuNames.indexOf(e)})).length?(console.error('The submenu has a wrong definition for route with name "'.concat(e,'"')),t[0]):t[0]}},getActiveSubMenuItem:function(){var e=this.getActiveMenuItem;if(void 0!==e){var t=this.$route.name;if(void 0!==t&&void 0!==this.subMenuItems[e.name]){var n=this.subMenuItems[e.name].filter(function(e){return e.name===t});if(1!==n.length)throw'The submenu has a wrong definition for name "'.concat(e.name,'"');return n[0]}}}},data:function(){return E.state.tableOfContentsIsVisible=this.menuIsVisible,{appState:E.state,tableOfContentsTogglingLocked:!1}},props:{menuIsVisible:{type:Boolean,default:function(){return E.state.tableOfContentsIsVisible}},menuItems:{type:Array,default:function(){return hi.menuItems}},subMenuItems:{type:Object,default:function(){return hi.subMenuItems}}}},gi=n(129);var Ai={name:"browsable-content",components:{NavigationMenu:Object(g.a)(fi,function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"navigation-menu__container"},[n("button",{staticClass:"navigation-menu__button",on:{click:e.toggleTableOfContents,keyup:function(t){return("button"in t||191===t.keyCode)&&t.shiftKey?e.toggleTableOfContents(t):null}}},[n("font-awesome-icon",{staticClass:"navigation-menu__toggle-menu-icon",attrs:{icon:e.getToggleMenuIcon}}),e._v(" "),n("span",{staticClass:"navigation-menu__button-label"},[e._v("\n "+e._s(e.getToggleMenuButtonLabel)+"\n ")]),e._v(" "),n("font-awesome-icon",{staticClass:"navigation-menu__toggle-menu-icon",attrs:{icon:e.getToggleMenuIcon}})],1),e._v(" "),n("transition",{attrs:{name:"custom-classes-transition","enter-active-class":"animated slideInUp","leave-active-class":"animated slideOutDown"}},[e.showTableOfContents?n("header",{ref:"header",staticClass:"navigation-menu__header"},[n("div",{staticClass:"navigation-menu__overlay"}),e._v(" "),n("ul",{staticClass:"navigation-menu__menu"},[e._l(e.getMenuItems,function(t){return[e.isPublic(t)?n("router-link",{key:t.name,staticClass:"navigation-menu__menu-item",class:{"navigation-menu__menu-item--active":e.isMenuActive(t)},attrs:{to:t.path,"active-class":"navigation-menu__menu-item--active",tag:"li"}},[e._v("\n "+e._s(t.text)+"\n ")]):e._e(),e._v(" "),e.getSubMenuItems(t.name)&&e.isMenuActive(t)&&e.isPublic(t)?n("li",{staticClass:"navigation-menu__menu-item-sub-menu"},[n("ul",{staticClass:"navigation-menu__sub-menu"},e._l(e.getSubMenuItems(t.name),function(t){return n("router-link",{key:t.name,staticClass:"navigation-menu__sub-menu-item",attrs:{to:t.path,"active-class":"navigation-menu__sub-menu-item--active",tag:"li"}},[e._v("\n "+e._s(t.text)+"\n ")])}))]):e._e()]})],2),e._v(" "),n("div",{staticClass:"navigation-menu__overlay--right"})]):e._e()]),e._v(" "),n("transition",{attrs:{name:"custom-classes-transition","enter-active-class":"animated slideInUp","leave-active-class":"animated slideOutDown"}},[n("div",{staticClass:"navigation-menu__titles-introduction"},[n("h1",{class:e.getTitleClasses()},[e._v(e._s(e.getActiveMenuItem.text))]),e._v(" "),e.activeMenuItemHasIntroduction?n("div",{staticClass:"navigation-menu__introduction"},[n(e.getActiveMenuItem.introduction,{tag:"component"})],1):e._e(),e._v(" "),e.shouldShowActiveMenuText?n("h2",{class:e.getSubtitleClasses()},[e._v(e._s(e.getActiveSubMenuItem.text)+"\n ")]):e._e(),e._v(" "),e.shouldShowIntroductionBeforeContent?n("div",{staticClass:"navigation-menu__introduction"},[n(e.getActiveMenuItem.introduction,{tag:"component"})],1):e._e(),e._v(" "),e.shouldShowSubtitle?n("h2",{class:e.getSubtitleClasses()},[e._v(e._s(e.getActiveMenuItem.subtitle)+"\n ")]):e.aSubMenuItemHasBeenSelected?n("h2",{class:e.getSubtitleClasses()},[e._v(e._s(e.getActiveSubMenuItem.text)+"\n ")]):e._e()])])],1)},[],!1,function(e){this.$style=gi.default.locals||gi.default},null,null).exports},computed:{showContent:function(){return!this.appState.tableOfContentsIsVisible}},data:function(){return{appState:E.state}},props:{showNavigationMenu:{type:Boolean,default:!0}}},vi=n(128);var _i=Object(g.a)(Ai,function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"browsable-content"},[this.showNavigationMenu?[t("notifications",{attrs:{group:"actions",position:"top left",classes:"browsable-content__notifications"}}),this._v(" "),t("navigation-menu"),this._v(" "),t("transition",{attrs:{name:"browsable-content__fade"}},[this.showContent?[t("router-view")]:this._e()],2)]:t("div",{staticClass:"browsable-content__content"},[t("router-view",{attrs:{name:"content"}})],1)],2)},[],!1,function(e){this.$style=vi.default.locals||vi.default},null,null).exports,yi={};["programming-language-basics","a-simple-syntax-directed-translator","lexical-analysis"].reduce(function(e,t){return e[t]=function(e){return{path:e,component:_i,props:{showNavigationMenu:!1},children:hi.routes[e](e)}}(t),yi},yi);var bi,xi,Ci=[{path:"/",redirect:"/lexical-analysis/json-parser",component:_i,children:[{path:"introduction",name:"introduction",component:ei.Introduction},{path:"about",name:"about",components:{default:ei.About}},{path:"structure-of-a-compiler",component:_i,props:{showNavigationMenu:!1},children:[{path:"phases-of-a-compiler",name:"phases-of-a-compiler",components:{content:ei.StructureOfACompiler}},{path:"grouping-of-phases-into-passes",name:"grouping-of-phases-into-passes",components:{content:ei.GroupingOfPhasesIntoPasses}},{path:"compiler-construction-tools",name:"compiler-construction-tools",components:{content:ei.CompilerConstructionTools}}]},{path:"the-science-of-building-a-compiler",name:"the-science-of-building-a-compiler",components:{default:ei.TheScienceOfCodeOptimization}},{path:"the-evolution-of-programming-languages",component:_i,props:{showNavigationMenu:!1},children:[{path:"the-move-to-higher-level-languages",name:"the-move-to-higher-level-languages",components:{content:ei.TheMoveToHigherLevelLanguages}},{path:"impacts-on-compilers",name:"impacts-on-compilers",components:{content:ei.ImpactsOnCompilers}}]},{path:"applications-of-compiler-technology",component:_i,props:{showNavigationMenu:!1},children:[{path:"implementation-of-high-level-programming-languages",name:"implementation-of-high-level-programming-languages",components:{content:ei.ImplementationOfHighLevelProgrammingLanguages}},{path:"optimizations-for-computer-architectures",name:"optimizations-for-computer-architectures",components:{content:ei.OptimizationsForComputerArchitectures}},{path:"program-translations",name:"program-translations",components:{content:ei.ProgramTranslations}},{path:"software-productivity-tools",name:"software-productivity-tools",components:{content:ei.SoftwareProductivityTools}}]},yi["programming-language-basics"],yi["a-simple-syntax-directed-translator"],yi["lexical-analysis"]]},{path:"*",redirect:"/lexical-analysis/json-parser"}],wi=n(15),Bi=n.n(wi),ji={namespaced:!0,state:{visibilityOfDescriptions:{"lexical-analysis":!0,"syntax-analysis":!1,"semantic-analysis":!1,"intermediate-code-generation":!1,"code-optimization":!1,"code-generation":!1,"symbol-table-management":!1},visibleDescription:"lexical-analysis",exampleIsVisible:!1,sequence:"phases_of_a_compiler"},mutations:(bi={},Bi()(bi,Et,function(e){e.visibleDescription=null;var t=e.visibilityOfDescriptions;e.visibilityOfDescriptions=Bt()(t).reduce(function(e,t){return e[t]=!1,e},t)}),Bi()(bi,Mt,function(e,t){e.visibilityOfDescriptions[t]=!e.visibilityOfDescriptions[t],e.visibleDescription=t}),Bi()(bi,Tt,function(e){e.exampleIsVisible=!e.exampleIsVisible,e.exampleIsVisible?e.sequence="translation_of_a_an_assignment_statement":e.sequence="phases_of_a_compiler"}),bi),actions:Bi()({},Dt,function(e,t){var n=e.commit;n(Et),n(Mt,t)}),getters:{sequence:function(e){var t=e.sequence;return t},exampleIsVisible:function(e){var t=e.exampleIsVisible;return t},visibleDescription:function(e){var t=e.visibleDescription;return t},visibilityOfDescriptions:function(e){var t=e.visibilityOfDescriptions;return t}}},ki={namespaced:!0,state:{nodes:{}},mutations:(xi={},Bi()(xi,R,function(e,t){var n=t.uuid,o=t.value;e.nodes[n].value=o;var i=e.nodes[n];e.nodes[i.uuid].value=o}),Bi()(xi,U,function(e,t){var n=t.uuid;e.nodes[n].edited=!1}),Bi()(xi,L,function(e,t){var n=t.uuid;e.nodes[n].edited=!0}),Bi()(xi,$,function(e,t){e.nodes[t.uuid]={edited:!1,twinUuid:t.twinUuid,type:t.nodeType,uuid:t.uuid,value:t.value}}),xi),actions:Bi()({},le,function(e,t){var n=e.commit;n(R,t),n(U,t)}),getters:{nodeWithUuid:function(e){return function(t){return e.nodes[t]}},isNodeWithUuidBeingEdited:function(e){return function(t){return e.nodes[t].edited}},valueOfNodeWithUuid:function(e){return function(t){return e.nodes[t].value}}}};i.default.use(J.b);var Di=new J.b.Store({modules:{"structure-of-a-compiler":ji,"json-editor":ki},strict:!1}),Ti=n(170),Mi=n.n(Ti);a.library.add(s.b),a.library.add(s.a),a.library.add(s.c),a.library.add(s.d),a.library.add(s.e),i.default.component("font-awesome-icon",r.FontAwesomeIcon),i.default.config.productionTip=!1,i.default.use(o.a),i.default.use(c.a),i.default.use(p.a),E.productionMode&&m.a.config("https://[email protected]/1250682").addPlugin(h.a,i.default).install();var Ei=new o.a({routes:Ci,scrollBehavior:function(){return{x:0,y:0}}});Ei.afterEach(function(e,t){hi.methods.willCloseMenuAfterNavigation(t,e)?E.state.tableOfContentsIsVisible=!1:j.$emit("menu_item.clicked")}),Ei.beforeEach(function(e,t,n){void 0===t.query.peek||void 0!==e.query.peek?n():n({name:e.name,query:t.query})});var Si=new i.default({el:"#app",router:Ei,store:Di,styles:Mi.a,components:{app:A}});window.app=Si},,function(e,t,n){(t=e.exports=n(2)(!0)).push([e.i,"@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Dosis);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Montserrat);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Roboto:400,400i,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Niconne);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Libre+Baskerville);",""]),t.push([e.i,"\n.browsable-content{flex-wrap:wrap;position:relative\n}\n.browsable-content,.browsable-content__content{display:flex;justify-content:center;width:calc(100% - 1rem)\n}\n.browsable-content__content{margin-bottom:0\n}\n.browsable-content__fade-enter-active,.browsable-content__fade-leave-active{transition:opacity 1s\n}\n.browsable-content__fade-enter,.browsable-content__fade-leave-to{opacity:0\n}\n.browsable-content .notifications .notification-wrapper{margin:.5rem\n}\n.browsable-content .notifications .notification-wrapper:not(:first-child){margin-top:0\n}\n.browsable-content .notifications .browsable-content__notifications{background-color:#1e1e1e;border:1px solid #d4d4d4;border-top:0;cursor:pointer;padding:.5rem\n}\n.browsable-content .notifications .browsable-content__notifications .notification-title{border-bottom:1px dotted #d4d4d4;color:#569cd3;font-family:Libre Baskerville,serif;font-size:1rem;font-weight:700;margin-bottom:.5rem;padding-bottom:.2rem\n}\n.browsable-content .notifications .browsable-content__notifications .notification-content{color:#d4d4d4;display:flex;font-family:Roboto,sans-serif;font-size:.9rem;height:8rem;justify-content:flex-end;line-height:2rem;text-align:right\n}","",{version:3,sources:["/Users/labodev/repositories/learning-compilers/src/components/browsable-content/browsable-content.vue?vue&type=style&index=0&module=true&lang=css"],names:[],mappings:";AAOA,mBAAmB,eAAe,iBAAiB;CAClD;AACD,+CAA+C,aAAa,uBAAuB,uBAAuB;CACzG;AACD,4BAA4B,eAAe;CAC1C;AACD,4EAA4E,qBAAqB;CAChG;AACD,iEAAiE,SAAS;CACzE;AACD,wDAAwD,YAAY;CACnE;AACD,0EAA0E,YAAY;CACrF;AACD,oEAAoE,yBAAyB,yBAAyB,aAAa,eAAe,aAAa;CAC9J;AACD,wFAAwF,iCAAiC,cAAc,oCAAoC,eAAe,gBAAgB,oBAAoB,oBAAoB;CACjP;AACD,0FAA0F,cAAc,aAAa,8BAA8B,gBAAgB,YAAY,yBAAyB,iBAAiB,gBAAgB;CACxO",file:"browsable-content.vue?vue&type=style&index=0&module=true&lang=css",sourcesContent:['\n@import url("https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700");\n@import url("https://fonts.googleapis.com/css?family=Dosis");\n@import url("https://fonts.googleapis.com/css?family=Montserrat");\n@import url("https://fonts.googleapis.com/css?family=Roboto:400,400i,700");\n@import url("https://fonts.googleapis.com/css?family=Niconne");\n@import url("https://fonts.googleapis.com/css?family=Libre+Baskerville");\n.browsable-content{flex-wrap:wrap;position:relative\n}\n.browsable-content,.browsable-content__content{display:flex;justify-content:center;width:calc(100% - 1rem)\n}\n.browsable-content__content{margin-bottom:0\n}\n.browsable-content__fade-enter-active,.browsable-content__fade-leave-active{transition:opacity 1s\n}\n.browsable-content__fade-enter,.browsable-content__fade-leave-to{opacity:0\n}\n.browsable-content .notifications .notification-wrapper{margin:.5rem\n}\n.browsable-content .notifications .notification-wrapper:not(:first-child){margin-top:0\n}\n.browsable-content .notifications .browsable-content__notifications{background-color:#1e1e1e;border:1px solid #d4d4d4;border-top:0;cursor:pointer;padding:.5rem\n}\n.browsable-content .notifications .browsable-content__notifications .notification-title{border-bottom:1px dotted #d4d4d4;color:#569cd3;font-family:Libre Baskerville,serif;font-size:1rem;font-weight:700;margin-bottom:.5rem;padding-bottom:.2rem\n}\n.browsable-content .notifications .browsable-content__notifications .notification-content{color:#d4d4d4;display:flex;font-family:Roboto,sans-serif;font-size:.9rem;height:8rem;justify-content:flex-end;line-height:2rem;text-align:right\n}'],sourceRoot:""}])},function(e,t,n){(t=e.exports=n(2)(!0)).push([e.i,"@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Dosis);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Montserrat);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Roboto:400,400i,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Niconne);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Libre+Baskerville);",""]),t.push([e.i,"\n.navigation-menu__container{display:flex;position:relative;width:100%\n}\n.navigation-menu__header{background-color:#252526;border-top:1px dotted #d4d4d4;bottom:0;display:flex;flex-wrap:wrap;height:calc(100% - 40px - 3.5rem);justify-content:flex-start;margin-left:-1em;max-height:calc(100% - 40px - 3.5rem);overflow-y:scroll;position:fixed;width:calc(100% + 1em);z-index:4\n}\n.navigation-menu__fadeable-enter-active,.navigation-menu__fadeable-leave-active{transition:opacity 1s\n}\n.navigation-menu__fadeable-enter,.navigation-menu__fadeable-leave-to{opacity:0\n}\n.navigation-menu__menu{color:#ce9178;display:flex;flex-direction:column;font-family:Dosis,sans-serif;font-size:1.2em;list-style-type:none;margin:0;padding:0;position:relative;width:auto\n}\n.navigation-menu__toggle-menu-icon{display:flex\n}\n.navigation-menu__button{background-color:#252526;border:none;color:#b4cea8;cursor:pointer;display:flex;font-size:.8rem;height:2.5rem;justify-content:space-evenly;opacity:.8;outline:none;padding:.2rem;position:fixed;top:0;width:100%;z-index:3\n}\n.navigation-menu__button-label{margin-left:1rem;margin-right:1rem;width:200px\n}\n.navigation-menu__sub-menu{display:flex;flex-direction:column;left:100%;list-style-type:none;padding-left:0;position:absolute;top:0;width:200%\n}\n.navigation-menu__menu-item,.navigation-menu__sub-menu-item{color:#b4cea8;cursor:pointer;display:flex;flex-shrink:0;font-size:1.5rem;height:1.5rem;line-height:1.5rem;padding:1rem;text-decoration:underline\n}\n.navigation-menu__menu-item-sub-menu,.navigation-menu__sub-menu-item-sub-menu{display:flex;justify-content:center\n}\n.navigation-menu__menu-item:last-child,.navigation-menu__sub-menu-item:last-child{border:none\n}\n.navigation-menu__menu-item--active,.navigation-menu__sub-menu-item--active{color:#ce9178;cursor:default;font-weight:700;text-decoration:none\n}\n.navigation-menu__sub-menu-item{font-size:1.3rem\n}\n.navigation-menu__titles-introduction{display:flex;flex-direction:column;margin-top:2.5rem;width:100%\n}\n.navigation-menu__introduction{align-self:center;display:flex;width:500px\n}\n.navigation-menu__subtitle,.navigation-menu__title{align-self:center;color:#ce9178;display:flex;font-family:Libre Baskerville,serif;height:40px;justify-content:flex-end;margin-bottom:1rem;margin-left:0\n}\n.navigation-menu__title{margin-top:0\n}\n.navigation-menu__subtitle{color:#ce9178;display:flex;font-family:Libre Baskerville,serif;font-size:1.2em;margin-bottom:0;margin-top:1rem\n}\n.navigation-menu__subtitle:last-child{height:1.2rem;margin-top:0\n}","",{version:3,sources:["/Users/labodev/repositories/learning-compilers/src/components/navigation-menu.vue?vue&type=style&index=0&module=true&lang=css"],names:[],mappings:";AAOA,4BAA4B,aAAa,kBAAkB,UAAU;CACpE;AACD,yBAAyB,yBAAyB,8BAA8B,SAAS,aAAa,eAAe,kCAAkC,2BAA2B,iBAAiB,sCAAsC,kBAAkB,eAAe,uBAAuB,SAAS;CACzS;AACD,gFAAgF,qBAAqB;CACpG;AACD,qEAAqE,SAAS;CAC7E;AACD,uBAAuB,cAAc,aAAa,sBAAsB,6BAA6B,gBAAgB,qBAAqB,SAAS,UAAU,kBAAkB,UAAU;CACxL;AACD,mCAAmC,YAAY;CAC9C;AACD,yBAAyB,yBAAyB,YAAY,cAAc,eAAe,aAAa,gBAAgB,cAAc,6BAA6B,WAAW,aAAa,cAAc,eAAe,MAAM,WAAW,SAAS;CACjP;AACD,+BAA+B,iBAAiB,kBAAkB,WAAW;CAC5E;AACD,2BAA2B,aAAa,sBAAsB,UAAU,qBAAqB,eAAe,kBAAkB,MAAM,UAAU;CAC7I;AACD,4DAA4D,cAAc,eAAe,aAAa,cAAc,iBAAiB,cAAc,mBAAmB,aAAa,yBAAyB;CAC3M;AACD,8EAA8E,aAAa,sBAAsB;CAChH;AACD,kFAAkF,WAAW;CAC5F;AACD,4EAA4E,cAAc,eAAe,gBAAgB,oBAAoB;CAC5I;AACD,gCAAgC,gBAAgB;CAC/C;AACD,sCAAsC,aAAa,sBAAsB,kBAAkB,UAAU;CACpG;AACD,+BAA+B,kBAAkB,aAAa,WAAW;CACxE;AACD,mDAAmD,kBAAkB,cAAc,aAAa,oCAAoC,YAAY,yBAAyB,mBAAmB,aAAa;CACxM;AACD,wBAAwB,YAAY;CACnC;AACD,2BAA2B,cAAc,aAAa,oCAAoC,gBAAgB,gBAAgB,eAAe;CACxI;AACD,sCAAsC,cAAc,YAAY;CAC/D",file:"navigation-menu.vue?vue&type=style&index=0&module=true&lang=css",sourcesContent:['\n@import url("https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700");\n@import url("https://fonts.googleapis.com/css?family=Dosis");\n@import url("https://fonts.googleapis.com/css?family=Montserrat");\n@import url("https://fonts.googleapis.com/css?family=Roboto:400,400i,700");\n@import url("https://fonts.googleapis.com/css?family=Niconne");\n@import url("https://fonts.googleapis.com/css?family=Libre+Baskerville");\n.navigation-menu__container{display:flex;position:relative;width:100%\n}\n.navigation-menu__header{background-color:#252526;border-top:1px dotted #d4d4d4;bottom:0;display:flex;flex-wrap:wrap;height:calc(100% - 40px - 3.5rem);justify-content:flex-start;margin-left:-1em;max-height:calc(100% - 40px - 3.5rem);overflow-y:scroll;position:fixed;width:calc(100% + 1em);z-index:4\n}\n.navigation-menu__fadeable-enter-active,.navigation-menu__fadeable-leave-active{transition:opacity 1s\n}\n.navigation-menu__fadeable-enter,.navigation-menu__fadeable-leave-to{opacity:0\n}\n.navigation-menu__menu{color:#ce9178;display:flex;flex-direction:column;font-family:Dosis,sans-serif;font-size:1.2em;list-style-type:none;margin:0;padding:0;position:relative;width:auto\n}\n.navigation-menu__toggle-menu-icon{display:flex\n}\n.navigation-menu__button{background-color:#252526;border:none;color:#b4cea8;cursor:pointer;display:flex;font-size:.8rem;height:2.5rem;justify-content:space-evenly;opacity:.8;outline:none;padding:.2rem;position:fixed;top:0;width:100%;z-index:3\n}\n.navigation-menu__button-label{margin-left:1rem;margin-right:1rem;width:200px\n}\n.navigation-menu__sub-menu{display:flex;flex-direction:column;left:100%;list-style-type:none;padding-left:0;position:absolute;top:0;width:200%\n}\n.navigation-menu__menu-item,.navigation-menu__sub-menu-item{color:#b4cea8;cursor:pointer;display:flex;flex-shrink:0;font-size:1.5rem;height:1.5rem;line-height:1.5rem;padding:1rem;text-decoration:underline\n}\n.navigation-menu__menu-item-sub-menu,.navigation-menu__sub-menu-item-sub-menu{display:flex;justify-content:center\n}\n.navigation-menu__menu-item:last-child,.navigation-menu__sub-menu-item:last-child{border:none\n}\n.navigation-menu__menu-item--active,.navigation-menu__sub-menu-item--active{color:#ce9178;cursor:default;font-weight:700;text-decoration:none\n}\n.navigation-menu__sub-menu-item{font-size:1.3rem\n}\n.navigation-menu__titles-introduction{display:flex;flex-direction:column;margin-top:2.5rem;width:100%\n}\n.navigation-menu__introduction{align-self:center;display:flex;width:500px\n}\n.navigation-menu__subtitle,.navigation-menu__title{align-self:center;color:#ce9178;display:flex;font-family:Libre Baskerville,serif;height:40px;justify-content:flex-end;margin-bottom:1rem;margin-left:0\n}\n.navigation-menu__title{margin-top:0\n}\n.navigation-menu__subtitle{color:#ce9178;display:flex;font-family:Libre Baskerville,serif;font-size:1.2em;margin-bottom:0;margin-top:1rem\n}\n.navigation-menu__subtitle:last-child{height:1.2rem;margin-top:0\n}'],sourceRoot:""}])},function(e,t,n){(t=e.exports=n(2)(!0)).push([e.i,"@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Dosis);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Montserrat);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Roboto:400,400i,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Niconne);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Libre+Baskerville);",""]),t.push([e.i,"\n.json-parser{display:flex;flex-direction:column;flex-wrap:wrap;justify-content:center;width:auto\n}\n.json-parser .dictionaries{display:flex;flex-direction:row\n}\n.json-parser .dictionaries .dictionary-container{flex:0.5\n}\n.json-parser .input-area{height:20rem;margin-bottom:1rem\n}\n.json-parser .input-area__textarea{height:calc(20em - 2rem);width:728px\n}\n.json-parser .multimedia-content{width:auto\n}\n.json-parser .source-code{position:absolute;top:23em\n}\n.json-parser .dictionary-container,.json-parser .json__container{display:flex;min-width:calc(500px - 2rem);width:auto\n}\n.json-parser__input{display:flex\n}\n.json-parser__button{color:#b4cea8;cursor:pointer;font-size:1rem\n}\n.json-parser__icon-copy{align-self:center;color:#b4cea8;cursor:pointer;display:flex;font-size:10rem;justify-content:flex-end;margin-bottom:2rem;margin-left:2rem\n}","",{version:3,sources:["/Users/labodev/repositories/learning-compilers/src/components/content/3-lexical-analysis/json-parser/json-parser.vue?vue&type=style&index=0&module=true&lang=css"],names:[],mappings:";AAOA,aAAa,aAAa,sBAAsB,eAAe,uBAAuB,UAAU;CAC/F;AACD,2BAA2B,aAAa,kBAAkB;CACzD;AACD,iDAAiD,QAAQ;CACxD;AACD,yBAAyB,aAAa,kBAAkB;CACvD;AACD,mCAAmC,yBAAyB,WAAW;CACtE;AACD,iCAAiC,UAAU;CAC1C;AACD,0BAA0B,kBAAkB,QAAQ;CACnD;AACD,iEAAiE,aAAa,6BAA6B,UAAU;CACpH;AACD,oBAAoB,YAAY;CAC/B;AACD,qBAAqB,cAAc,eAAe,cAAc;CAC/D;AACD,wBAAwB,kBAAkB,cAAc,eAAe,aAAa,gBAAgB,yBAAyB,mBAAmB,gBAAgB;CAC/J",file:"json-parser.vue?vue&type=style&index=0&module=true&lang=css",sourcesContent:['\n@import url("https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700");\n@import url("https://fonts.googleapis.com/css?family=Dosis");\n@import url("https://fonts.googleapis.com/css?family=Montserrat");\n@import url("https://fonts.googleapis.com/css?family=Roboto:400,400i,700");\n@import url("https://fonts.googleapis.com/css?family=Niconne");\n@import url("https://fonts.googleapis.com/css?family=Libre+Baskerville");\n.json-parser{display:flex;flex-direction:column;flex-wrap:wrap;justify-content:center;width:auto\n}\n.json-parser .dictionaries{display:flex;flex-direction:row\n}\n.json-parser .dictionaries .dictionary-container{flex:0.5\n}\n.json-parser .input-area{height:20rem;margin-bottom:1rem\n}\n.json-parser .input-area__textarea{height:calc(20em - 2rem);width:728px\n}\n.json-parser .multimedia-content{width:auto\n}\n.json-parser .source-code{position:absolute;top:23em\n}\n.json-parser .dictionary-container,.json-parser .json__container{display:flex;min-width:calc(500px - 2rem);width:auto\n}\n.json-parser__input{display:flex\n}\n.json-parser__button{color:#b4cea8;cursor:pointer;font-size:1rem\n}\n.json-parser__icon-copy{align-self:center;color:#b4cea8;cursor:pointer;display:flex;font-size:10rem;justify-content:flex-end;margin-bottom:2rem;margin-left:2rem\n}'],sourceRoot:""}])},function(e,t,n){(t=e.exports=n(2)(!0)).push([e.i,"@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Dosis);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Montserrat);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Roboto:400,400i,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Niconne);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Libre+Baskerville);",""]),t.push([e.i,"\n.from-regular-expressions-to-automata{display:flex;flex-wrap:wrap;justify-content:center\n}\n.from-regular-expressions-to-automata .input-area,.from-regular-expressions-to-automata .multimedia-content{width:500px\n}\n.from-regular-expressions-to-automata a{outline:none\n}\n.from-regular-expressions-to-automata__visualizations{display:flex;flex-direction:column;justify-content:center;justify-self:center;min-width:calc(500px - 4em);padding-bottom:3em\n}\n.from-regular-expressions-to-automata__visualization{align-self:center;background-color:#fff;display:flex;min-width:calc(500px - 4em);padding-bottom:3em;padding-right:4em;padding-top:2.5em\n}\n.from-regular-expressions-to-automata__visualization--dfa{margin-top:1rem\n}","",{version:3,sources:["/Users/labodev/repositories/learning-compilers/src/components/content/3-lexical-analysis/from-regular-expressions-to-automata.vue?vue&type=style&index=0&lang=css"],names:[],mappings:";AAOA,sCAAsC,aAAa,eAAe,sBAAsB;CACvF;AACD,4GAA4G,WAAW;CACtH;AACD,wCAAwC,YAAY;CACnD;AACD,sDAAsD,aAAa,sBAAsB,uBAAuB,oBAAoB,4BAA4B,kBAAkB;CACjL;AACD,qDAAqD,kBAAkB,sBAAsB,aAAa,4BAA4B,mBAAmB,kBAAkB,iBAAiB;CAC3L;AACD,0DAA0D,eAAe;CACxE",file:"from-regular-expressions-to-automata.vue?vue&type=style&index=0&lang=css",sourcesContent:['\n@import url("https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700");\n@import url("https://fonts.googleapis.com/css?family=Dosis");\n@import url("https://fonts.googleapis.com/css?family=Montserrat");\n@import url("https://fonts.googleapis.com/css?family=Roboto:400,400i,700");\n@import url("https://fonts.googleapis.com/css?family=Niconne");\n@import url("https://fonts.googleapis.com/css?family=Libre+Baskerville");\n.from-regular-expressions-to-automata{display:flex;flex-wrap:wrap;justify-content:center\n}\n.from-regular-expressions-to-automata .input-area,.from-regular-expressions-to-automata .multimedia-content{width:500px\n}\n.from-regular-expressions-to-automata a{outline:none\n}\n.from-regular-expressions-to-automata__visualizations{display:flex;flex-direction:column;justify-content:center;justify-self:center;min-width:calc(500px - 4em);padding-bottom:3em\n}\n.from-regular-expressions-to-automata__visualization{align-self:center;background-color:#fff;display:flex;min-width:calc(500px - 4em);padding-bottom:3em;padding-right:4em;padding-top:2.5em\n}\n.from-regular-expressions-to-automata__visualization--dfa{margin-top:1rem\n}'],sourceRoot:""}])},function(e,t,n){"use strict";var o=n(69);n.n(o).a},function(e,t){},,,,,,,,function(e,t,n){(t=e.exports=n(2)(!0)).push([e.i,"@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Dosis);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Montserrat);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Roboto:400,400i,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Niconne);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Libre+Baskerville);",""]),t.push([e.i,"\n.transition-table[data-v-2e6beb09]{color:#d4d4d4;display:flex;flex-direction:column;font-family:Ubuntu Mono,monospace;margin-bottom:1rem\n}\n.transition-table__row[data-v-2e6beb09]{align-self:center;display:flex;flex-direction:row\n}\n.transition-table__row--header[data-v-2e6beb09]{font-weight:700\n}\n.transition-table__row--last[data-v-2e6beb09]{border-bottom:1px solid #d4d4d4\n}\n.transition-table__destination[data-v-2e6beb09],.transition-table__state[data-v-2e6beb09],.transition-table__symbol[data-v-2e6beb09]{border:none;border-left:1px solid #d4d4d4;border-top:1px solid #d4d4d4;display:flex;flex-direction:row;font-size:1rem;height:1.2rem;justify-content:center;padding:1rem;width:100px\n}\n.transition-table__destination[data-v-2e6beb09]:last-child,.transition-table__state[data-v-2e6beb09]:last-child,.transition-table__symbol[data-v-2e6beb09]:last-child{border-right:1px solid #d4d4d4\n}","",{version:3,sources:["/Users/labodev/repositories/learning-compilers/src/components/content/3-lexical-analysis/transition-table/transition-table.vue?vue&type=style&index=0&id=2e6beb09&scoped=true&lang=scss"],names:[],mappings:";AAOA,mCAAmC,cAAc,aAAa,sBAAsB,kCAAkC,kBAAkB;CACvI;AACD,wCAAwC,kBAAkB,aAAa,kBAAkB;CACxF;AACD,gDAAgD,eAAe;CAC9D;AACD,8CAA8C,+BAA+B;CAC5E;AACD,qIAAqI,YAAY,8BAA8B,6BAA6B,aAAa,mBAAmB,eAAe,cAAc,uBAAuB,aAAa,WAAW;CACvT;AACD,sKAAsK,8BAA8B;CACnM",file:"transition-table.vue?vue&type=style&index=0&id=2e6beb09&scoped=true&lang=scss",sourcesContent:['\n@import url("https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700");\n@import url("https://fonts.googleapis.com/css?family=Dosis");\n@import url("https://fonts.googleapis.com/css?family=Montserrat");\n@import url("https://fonts.googleapis.com/css?family=Roboto:400,400i,700");\n@import url("https://fonts.googleapis.com/css?family=Niconne");\n@import url("https://fonts.googleapis.com/css?family=Libre+Baskerville");\n.transition-table[data-v-2e6beb09]{color:#d4d4d4;display:flex;flex-direction:column;font-family:Ubuntu Mono,monospace;margin-bottom:1rem\n}\n.transition-table__row[data-v-2e6beb09]{align-self:center;display:flex;flex-direction:row\n}\n.transition-table__row--header[data-v-2e6beb09]{font-weight:700\n}\n.transition-table__row--last[data-v-2e6beb09]{border-bottom:1px solid #d4d4d4\n}\n.transition-table__destination[data-v-2e6beb09],.transition-table__state[data-v-2e6beb09],.transition-table__symbol[data-v-2e6beb09]{border:none;border-left:1px solid #d4d4d4;border-top:1px solid #d4d4d4;display:flex;flex-direction:row;font-size:1rem;height:1.2rem;justify-content:center;padding:1rem;width:100px\n}\n.transition-table__destination[data-v-2e6beb09]:last-child,.transition-table__state[data-v-2e6beb09]:last-child,.transition-table__symbol[data-v-2e6beb09]:last-child{border-right:1px solid #d4d4d4\n}'],sourceRoot:""}])},function(e,t,n){"use strict";var o=n(70);n.n(o).a},function(e,t,n){(t=e.exports=n(2)(!0)).push([e.i,"@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Dosis);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Montserrat);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Roboto:400,400i,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Niconne);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Libre+Baskerville);",""]),t.push([e.i,"\n.content--no-first-letter{margin-top:2rem;width:500px\n}\n.content--no-first-letter .input-area__textarea{padding:1rem;width:calc(100% - 2rem)\n}\n.content--no-first-letter .source-code{background-color:transparent;border:none;justify-self:flex-start;margin:0;padding:1rem;width:calc(100% - 2rem)\n}","",{version:3,sources:["/Users/labodev/repositories/learning-compilers/src/components/content/a-simple-syntax-directed-translator/lexical-analyzer.vue?vue&type=style&index=0&module=true&lang=css"],names:[],mappings:";AAOA,0BAA0B,gBAAgB,WAAW;CACpD;AACD,gDAAgD,aAAa,uBAAuB;CACnF;AACD,uCAAuC,6BAA6B,YAAY,wBAAwB,SAAS,aAAa,uBAAuB;CACpJ",file:"lexical-analyzer.vue?vue&type=style&index=0&module=true&lang=css",sourcesContent:['\n@import url("https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700");\n@import url("https://fonts.googleapis.com/css?family=Dosis");\n@import url("https://fonts.googleapis.com/css?family=Montserrat");\n@import url("https://fonts.googleapis.com/css?family=Roboto:400,400i,700");\n@import url("https://fonts.googleapis.com/css?family=Niconne");\n@import url("https://fonts.googleapis.com/css?family=Libre+Baskerville");\n.content--no-first-letter{margin-top:2rem;width:500px\n}\n.content--no-first-letter .input-area__textarea{padding:1rem;width:calc(100% - 2rem)\n}\n.content--no-first-letter .source-code{background-color:transparent;border:none;justify-self:flex-start;margin:0;padding:1rem;width:calc(100% - 2rem)\n}'],sourceRoot:""}])},function(e,t,n){(t=e.exports=n(2)(!0)).push([e.i,"@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Dosis);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Montserrat);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Roboto:400,400i,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Niconne);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Libre+Baskerville);",""]),t.push([e.i,"\n.content--no-first-letter{margin-top:2rem;width:500px\n}\n.content--no-first-letter .input-area__textarea{padding:1rem;width:calc(100% - 2rem)\n}\n.content--no-first-letter .source-code{background-color:transparent;border:none;justify-self:flex-start;margin:0;padding:1rem;width:calc(100% - 2rem)\n}","",{version:3,sources:["/Users/labodev/repositories/learning-compilers/src/components/content/a-simple-syntax-directed-translator/a-translator-for-simple-expressions.vue?vue&type=style&index=0&module=true&lang=css"],names:[],mappings:";AAOA,0BAA0B,gBAAgB,WAAW;CACpD;AACD,gDAAgD,aAAa,uBAAuB;CACnF;AACD,uCAAuC,6BAA6B,YAAY,wBAAwB,SAAS,aAAa,uBAAuB;CACpJ",file:"a-translator-for-simple-expressions.vue?vue&type=style&index=0&module=true&lang=css",sourcesContent:['\n@import url("https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700");\n@import url("https://fonts.googleapis.com/css?family=Dosis");\n@import url("https://fonts.googleapis.com/css?family=Montserrat");\n@import url("https://fonts.googleapis.com/css?family=Roboto:400,400i,700");\n@import url("https://fonts.googleapis.com/css?family=Niconne");\n@import url("https://fonts.googleapis.com/css?family=Libre+Baskerville");\n.content--no-first-letter{margin-top:2rem;width:500px\n}\n.content--no-first-letter .input-area__textarea{padding:1rem;width:calc(100% - 2rem)\n}\n.content--no-first-letter .source-code{background-color:transparent;border:none;justify-self:flex-start;margin:0;padding:1rem;width:calc(100% - 2rem)\n}'],sourceRoot:""}])},function(e,t,n){(t=e.exports=n(2)(!0)).push([e.i,"@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Dosis);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Montserrat);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Roboto:400,400i,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Niconne);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Libre+Baskerville);",""]),t.push([e.i,"\n.content--no-first-letter{margin-top:2rem;width:500px\n}\n.content--no-first-letter .input-area__textarea{padding:1rem;width:calc(100% - 2rem)\n}\n.content--no-first-letter .source-code{background-color:transparent;border:none;justify-self:flex-start;margin:0;padding:1rem;width:calc(100% - 2rem)\n}","",{version:3,sources:["/Users/labodev/repositories/learning-compilers/src/components/content/a-simple-syntax-directed-translator/associativity-of-operators.vue?vue&type=style&index=0&module=true&lang=css"],names:[],mappings:";AAOA,0BAA0B,gBAAgB,WAAW;CACpD;AACD,gDAAgD,aAAa,uBAAuB;CACnF;AACD,uCAAuC,6BAA6B,YAAY,wBAAwB,SAAS,aAAa,uBAAuB;CACpJ",file:"associativity-of-operators.vue?vue&type=style&index=0&module=true&lang=css",sourcesContent:['\n@import url("https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700");\n@import url("https://fonts.googleapis.com/css?family=Dosis");\n@import url("https://fonts.googleapis.com/css?family=Montserrat");\n@import url("https://fonts.googleapis.com/css?family=Roboto:400,400i,700");\n@import url("https://fonts.googleapis.com/css?family=Niconne");\n@import url("https://fonts.googleapis.com/css?family=Libre+Baskerville");\n.content--no-first-letter{margin-top:2rem;width:500px\n}\n.content--no-first-letter .input-area__textarea{padding:1rem;width:calc(100% - 2rem)\n}\n.content--no-first-letter .source-code{background-color:transparent;border:none;justify-self:flex-start;margin:0;padding:1rem;width:calc(100% - 2rem)\n}'],sourceRoot:""}])},function(e,t,n){(t=e.exports=n(2)(!0)).push([e.i,"@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Dosis);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Montserrat);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Roboto:400,400i,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Niconne);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Libre+Baskerville);",""]),t.push([e.i,"\n.formal-notation[data-v-7a389c60]{color:#d4d4d4;display:inline-flex;font-family:Ubuntu Mono,monospace;font-size:1rem;line-height:1.5rem;margin:.5rem;padding:.5rem;text-align:left;white-space:pre;width:100%\n}\n.formal-notation__imply[data-v-7a389c60]{margin-right:1rem\n}","",{version:3,sources:["/Users/labodev/repositories/learning-compilers/src/components/formal-notation/formal-notation.vue?vue&type=style&index=0&id=7a389c60&scoped=true&lang=scss"],names:[],mappings:";AAOA,kCAAkC,cAAc,oBAAoB,kCAAkC,eAAe,mBAAmB,aAAa,cAAc,gBAAgB,gBAAgB,UAAU;CAC5M;AACD,yCAAyC,iBAAiB;CACzD",file:"formal-notation.vue?vue&type=style&index=0&id=7a389c60&scoped=true&lang=scss",sourcesContent:['\n@import url("https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700");\n@import url("https://fonts.googleapis.com/css?family=Dosis");\n@import url("https://fonts.googleapis.com/css?family=Montserrat");\n@import url("https://fonts.googleapis.com/css?family=Roboto:400,400i,700");\n@import url("https://fonts.googleapis.com/css?family=Niconne");\n@import url("https://fonts.googleapis.com/css?family=Libre+Baskerville");\n.formal-notation[data-v-7a389c60]{color:#d4d4d4;display:inline-flex;font-family:Ubuntu Mono,monospace;font-size:1rem;line-height:1.5rem;margin:.5rem;padding:.5rem;text-align:left;white-space:pre;width:100%\n}\n.formal-notation__imply[data-v-7a389c60]{margin-right:1rem\n}'],sourceRoot:""}])},function(e,t,n){"use strict";var o=n(74);n.n(o).a},function(e,t,n){(t=e.exports=n(2)(!0)).push([e.i,"@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Dosis);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Montserrat);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Roboto:400,400i,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Niconne);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Libre+Baskerville);",""]),t.push([e.i,"\n.expr[data-v-63f3dd2c]{color:#d4d4d4;display:inline-flex;font-family:Ubuntu Mono,monospace;font-size:1.1rem;line-height:1.5rem;margin:0;text-align:left;white-space:pre\n}","",{version:3,sources:["/Users/labodev/repositories/learning-compilers/src/components/expr/expr.vue?vue&type=style&index=0&id=63f3dd2c&scoped=true&lang=scss"],names:[],mappings:";AAOA,uBAAuB,cAAc,oBAAoB,kCAAkC,iBAAiB,mBAAmB,SAAS,gBAAgB,eAAe;CACtK",file:"expr.vue?vue&type=style&index=0&id=63f3dd2c&scoped=true&lang=scss",sourcesContent:['\n@import url("https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700");\n@import url("https://fonts.googleapis.com/css?family=Dosis");\n@import url("https://fonts.googleapis.com/css?family=Montserrat");\n@import url("https://fonts.googleapis.com/css?family=Roboto:400,400i,700");\n@import url("https://fonts.googleapis.com/css?family=Niconne");\n@import url("https://fonts.googleapis.com/css?family=Libre+Baskerville");\n.expr[data-v-63f3dd2c]{color:#d4d4d4;display:inline-flex;font-family:Ubuntu Mono,monospace;font-size:1.1rem;line-height:1.5rem;margin:0;text-align:left;white-space:pre\n}'],sourceRoot:""}])},function(e,t,n){"use strict";var o=n(75);n.n(o).a},function(e,t,n){(t=e.exports=n(2)(!0)).push([e.i,"@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Dosis);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Montserrat);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Roboto:400,400i,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Niconne);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Libre+Baskerville);",""]),t.push([e.i,'\n.multimedia-content{display:flex;flex-direction:column;height:auto;width:500px\n}\n.multimedia-content h3{color:#ce9178;display:block;font-family:Libre Baskerville,serif;font-size:1rem;margin-bottom:.5rem;margin-top:1rem;text-align:center\n}\n.multimedia-content em{color:#d4d4d4\n}\n.multimedia-content li br{margin-bottom:0\n}\n.multimedia-content__paragraph.paragraph{padding:1rem;text-align:left;white-space:normal\n}\n.multimedia-content__paragraph.paragraph:first-letter{margin-left:1rem\n}\n.multimedia-content__paragraph.paragraph:first-child{margin-bottom:0\n}\n.multimedia-content__paragraph.paragraph:not(:first-child){margin-bottom:0;margin-top:0;padding-top:0\n}\n.multimedia-content br{content:" ";display:block;margin-bottom:1rem\n}\n.multimedia-content strong{color:#d4d4d4;font-weight:600\n}',"",{version:3,sources:["/Users/labodev/repositories/learning-compilers/src/components/multimedia-content.vue?vue&type=style&index=0&module=true&lang=css"],names:[],mappings:";AAOA,oBAAoB,aAAa,sBAAsB,YAAY,WAAW;CAC7E;AACD,uBAAuB,cAAc,cAAc,oCAAoC,eAAe,oBAAoB,gBAAgB,iBAAiB;CAC1J;AACD,uBAAuB,aAAa;CACnC;AACD,0BAA0B,eAAe;CACxC;AACD,yCAAyC,aAAa,gBAAgB,kBAAkB;CACvF;AACD,sDAAsD,gBAAgB;CACrE;AACD,qDAAqD,eAAe;CACnE;AACD,2DAA2D,gBAAgB,aAAa,aAAa;CACpG;AACD,uBAAuB,YAAY,cAAc,kBAAkB;CAClE;AACD,2BAA2B,cAAc,eAAe;CACvD",file:"multimedia-content.vue?vue&type=style&index=0&module=true&lang=css",sourcesContent:['\n@import url("https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700");\n@import url("https://fonts.googleapis.com/css?family=Dosis");\n@import url("https://fonts.googleapis.com/css?family=Montserrat");\n@import url("https://fonts.googleapis.com/css?family=Roboto:400,400i,700");\n@import url("https://fonts.googleapis.com/css?family=Niconne");\n@import url("https://fonts.googleapis.com/css?family=Libre+Baskerville");\n.multimedia-content{display:flex;flex-direction:column;height:auto;width:500px\n}\n.multimedia-content h3{color:#ce9178;display:block;font-family:Libre Baskerville,serif;font-size:1rem;margin-bottom:.5rem;margin-top:1rem;text-align:center\n}\n.multimedia-content em{color:#d4d4d4\n}\n.multimedia-content li br{margin-bottom:0\n}\n.multimedia-content__paragraph.paragraph{padding:1rem;text-align:left;white-space:normal\n}\n.multimedia-content__paragraph.paragraph:first-letter{margin-left:1rem\n}\n.multimedia-content__paragraph.paragraph:first-child{margin-bottom:0\n}\n.multimedia-content__paragraph.paragraph:not(:first-child){margin-bottom:0;margin-top:0;padding-top:0\n}\n.multimedia-content br{content:" ";display:block;margin-bottom:1rem\n}\n.multimedia-content strong{color:#d4d4d4;font-weight:600\n}'],sourceRoot:""}])},function(e,t,n){(t=e.exports=n(2)(!0)).push([e.i,"@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Dosis);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Montserrat);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Roboto:400,400i,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Niconne);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Libre+Baskerville);",""]),t.push([e.i,"\n.structure-of-a-compiler[data-v-b564ca5c]{display:flex;justify-content:center;width:calc(50% + 400px)\n}\n.structure-of-a-compiler .structure-of-a-compiler__separator[data-v-b564ca5c]{margin-bottom:1rem;width:50%\n}\n.structure-of-a-compiler__fadeable-enter-active[data-v-b564ca5c],.structure-of-a-compiler__fadeable-leave-active[data-v-b564ca5c]{transition:opacity 1s\n}\n.structure-of-a-compiler__fadeable-enter[data-v-b564ca5c],.structure-of-a-compiler__fadeable-leave-to[data-v-b564ca5c]{opacity:0\n}\n.structure-of-a-compiler__scrollable[data-v-b564ca5c]{bottom:0;display:block;height:calc(100% - 40px - 4.5rem - 40px);overflow:scroll;overflow-y:scroll;position:fixed;z-index:3\n}\n.structure-of-a-compiler__left-column[data-v-b564ca5c]{display:flex;flex:0.5;flex-wrap:wrap;justify-content:center;max-width:400px\n}\n.structure-of-a-compiler__right-column[data-v-b564ca5c]{flex:0.5;flex-direction:column;padding-left:3rem;position:relative;visibility:hidden\n}\n.structure-of-a-compiler__right-column--visible[data-v-b564ca5c]{display:flex;visibility:visible\n}\n.structure-of-a-compiler__right-column--hidden[data-v-b564ca5c]{display:none\n}\n.structure-of-a-compiler__phase[data-v-b564ca5c]{display:flex;flex-direction:column;justify-content:center;width:400px\n}\n.structure-of-a-compiler__example[data-v-b564ca5c]{align-self:center;background-color:#1e1e1e;border:1px dotted #ce9178;border-radius:0;color:#ce9178;cursor:pointer;font-size:1.1rem;margin-bottom:1rem;outline:none;padding:1rem\n}\n.structure-of-a-compiler__example[data-v-b564ca5c]:hover{border:1px dotted #dab988;color:#dab988\n}","",{version:3,sources:["/Users/labodev/repositories/learning-compilers/src/components/content/structure-of-a-compiler.vue?vue&type=style&index=0&id=b564ca5c&scoped=true&lang=scss"],names:[],mappings:";AAOA,0CAA0C,aAAa,uBAAuB,uBAAuB;CACpG;AACD,8EAA8E,mBAAmB,SAAS;CACzG;AACD,kIAAkI,qBAAqB;CACtJ;AACD,uHAAuH,SAAS;CAC/H;AACD,sDAAsD,SAAS,cAAc,yCAAyC,gBAAgB,kBAAkB,eAAe,SAAS;CAC/K;AACD,uDAAuD,aAAa,SAAS,eAAe,uBAAuB,eAAe;CACjI;AACD,wDAAwD,SAAS,sBAAsB,kBAAkB,kBAAkB,iBAAiB;CAC3I;AACD,iEAAiE,aAAa,kBAAkB;CAC/F;AACD,gEAAgE,YAAY;CAC3E;AACD,iDAAiD,aAAa,sBAAsB,uBAAuB,WAAW;CACrH;AACD,mDAAmD,kBAAkB,yBAAyB,0BAA0B,gBAAgB,cAAc,eAAe,iBAAiB,mBAAmB,aAAa,YAAY;CACjO;AACD,yDAAyD,0BAA0B,aAAa;CAC/F",file:"structure-of-a-compiler.vue?vue&type=style&index=0&id=b564ca5c&scoped=true&lang=scss",sourcesContent:['\n@import url("https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700");\n@import url("https://fonts.googleapis.com/css?family=Dosis");\n@import url("https://fonts.googleapis.com/css?family=Montserrat");\n@import url("https://fonts.googleapis.com/css?family=Roboto:400,400i,700");\n@import url("https://fonts.googleapis.com/css?family=Niconne");\n@import url("https://fonts.googleapis.com/css?family=Libre+Baskerville");\n.structure-of-a-compiler[data-v-b564ca5c]{display:flex;justify-content:center;width:calc(50% + 400px)\n}\n.structure-of-a-compiler .structure-of-a-compiler__separator[data-v-b564ca5c]{margin-bottom:1rem;width:50%\n}\n.structure-of-a-compiler__fadeable-enter-active[data-v-b564ca5c],.structure-of-a-compiler__fadeable-leave-active[data-v-b564ca5c]{transition:opacity 1s\n}\n.structure-of-a-compiler__fadeable-enter[data-v-b564ca5c],.structure-of-a-compiler__fadeable-leave-to[data-v-b564ca5c]{opacity:0\n}\n.structure-of-a-compiler__scrollable[data-v-b564ca5c]{bottom:0;display:block;height:calc(100% - 40px - 4.5rem - 40px);overflow:scroll;overflow-y:scroll;position:fixed;z-index:3\n}\n.structure-of-a-compiler__left-column[data-v-b564ca5c]{display:flex;flex:0.5;flex-wrap:wrap;justify-content:center;max-width:400px\n}\n.structure-of-a-compiler__right-column[data-v-b564ca5c]{flex:0.5;flex-direction:column;padding-left:3rem;position:relative;visibility:hidden\n}\n.structure-of-a-compiler__right-column--visible[data-v-b564ca5c]{display:flex;visibility:visible\n}\n.structure-of-a-compiler__right-column--hidden[data-v-b564ca5c]{display:none\n}\n.structure-of-a-compiler__phase[data-v-b564ca5c]{display:flex;flex-direction:column;justify-content:center;width:400px\n}\n.structure-of-a-compiler__example[data-v-b564ca5c]{align-self:center;background-color:#1e1e1e;border:1px dotted #ce9178;border-radius:0;color:#ce9178;cursor:pointer;font-size:1.1rem;margin-bottom:1rem;outline:none;padding:1rem\n}\n.structure-of-a-compiler__example[data-v-b564ca5c]:hover{border:1px dotted #dab988;color:#dab988\n}'],sourceRoot:""}])},function(e,t,n){"use strict";var o=n(77);n.n(o).a},function(e,t,n){(t=e.exports=n(2)(!0)).push([e.i,"@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Dosis);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Montserrat);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Roboto:400,400i,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Niconne);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Libre+Baskerville);",""]),t.push([e.i,"\n.symbol-table-management[data-v-25361da9]{display:flex\n}","",{version:3,sources:["/Users/labodev/repositories/learning-compilers/src/components/content/symbol-table-management.vue?vue&type=style&index=0&id=25361da9&scoped=true&lang=scss"],names:[],mappings:";AAOA,0CAA0C,YAAY;CACrD",file:"symbol-table-management.vue?vue&type=style&index=0&id=25361da9&scoped=true&lang=scss",sourcesContent:['\n@import url("https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700");\n@import url("https://fonts.googleapis.com/css?family=Dosis");\n@import url("https://fonts.googleapis.com/css?family=Montserrat");\n@import url("https://fonts.googleapis.com/css?family=Roboto:400,400i,700");\n@import url("https://fonts.googleapis.com/css?family=Niconne");\n@import url("https://fonts.googleapis.com/css?family=Libre+Baskerville");\n.symbol-table-management[data-v-25361da9]{display:flex\n}'],sourceRoot:""}])},function(e,t,n){"use strict";var o=n(78);n.n(o).a},function(e,t,n){(t=e.exports=n(2)(!0)).push([e.i,"@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Dosis);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Montserrat);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Roboto:400,400i,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Niconne);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Libre+Baskerville);",""]),t.push([e.i,"\n.code-generation[data-v-3f158687]{display:flex\n}\n.code-generation em[data-v-3f158687]{color:#d4d4d4\n}\n.code-generation strong[data-v-3f158687]{color:#d4d4d4;font-weight:700\n}\n.code-generation code[data-v-3f158687]{color:#d4d4d4;font-family:Ubuntu Mono,monospace\n}","",{version:3,sources:["/Users/labodev/repositories/learning-compilers/src/components/content/code-generation.vue?vue&type=style&index=0&id=3f158687&scoped=true&lang=scss"],names:[],mappings:";AAOA,kCAAkC,YAAY;CAC7C;AACD,qCAAqC,aAAa;CACjD;AACD,yCAAyC,cAAc,eAAe;CACrE;AACD,uCAAuC,cAAc,iCAAiC;CACrF",file:"code-generation.vue?vue&type=style&index=0&id=3f158687&scoped=true&lang=scss",sourcesContent:['\n@import url("https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700");\n@import url("https://fonts.googleapis.com/css?family=Dosis");\n@import url("https://fonts.googleapis.com/css?family=Montserrat");\n@import url("https://fonts.googleapis.com/css?family=Roboto:400,400i,700");\n@import url("https://fonts.googleapis.com/css?family=Niconne");\n@import url("https://fonts.googleapis.com/css?family=Libre+Baskerville");\n.code-generation[data-v-3f158687]{display:flex\n}\n.code-generation em[data-v-3f158687]{color:#d4d4d4\n}\n.code-generation strong[data-v-3f158687]{color:#d4d4d4;font-weight:700\n}\n.code-generation code[data-v-3f158687]{color:#d4d4d4;font-family:Ubuntu Mono,monospace\n}'],sourceRoot:""}])},function(e,t,n){"use strict";var o=n(79);n.n(o).a},function(e,t,n){(t=e.exports=n(2)(!0)).push([e.i,"@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Dosis);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Montserrat);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Roboto:400,400i,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Niconne);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Libre+Baskerville);",""]),t.push([e.i,"\n.code-optimization[data-v-568d3694]{display:flex\n}\n.code-optimization em[data-v-568d3694]{color:#d4d4d4\n}\n.code-optimization strong[data-v-568d3694]{color:#d4d4d4;font-weight:700\n}\n.code-optimization code[data-v-568d3694]{color:#d4d4d4;font-family:Ubuntu Mono,monospace\n}","",{version:3,sources:["/Users/labodev/repositories/learning-compilers/src/components/content/code-optimization.vue?vue&type=style&index=0&id=568d3694&scoped=true&lang=scss"],names:[],mappings:";AAOA,oCAAoC,YAAY;CAC/C;AACD,uCAAuC,aAAa;CACnD;AACD,2CAA2C,cAAc,eAAe;CACvE;AACD,yCAAyC,cAAc,iCAAiC;CACvF",file:"code-optimization.vue?vue&type=style&index=0&id=568d3694&scoped=true&lang=scss",sourcesContent:['\n@import url("https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700");\n@import url("https://fonts.googleapis.com/css?family=Dosis");\n@import url("https://fonts.googleapis.com/css?family=Montserrat");\n@import url("https://fonts.googleapis.com/css?family=Roboto:400,400i,700");\n@import url("https://fonts.googleapis.com/css?family=Niconne");\n@import url("https://fonts.googleapis.com/css?family=Libre+Baskerville");\n.code-optimization[data-v-568d3694]{display:flex\n}\n.code-optimization em[data-v-568d3694]{color:#d4d4d4\n}\n.code-optimization strong[data-v-568d3694]{color:#d4d4d4;font-weight:700\n}\n.code-optimization code[data-v-568d3694]{color:#d4d4d4;font-family:Ubuntu Mono,monospace\n}'],sourceRoot:""}])},function(e,t,n){"use strict";var o=n(80);n.n(o).a},function(e,t,n){(t=e.exports=n(2)(!0)).push([e.i,"@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Dosis);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Montserrat);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Roboto:400,400i,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Niconne);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Libre+Baskerville);",""]),t.push([e.i,"\n.intermediate-code-generation[data-v-f2fa7bc8]{display:flex\n}\n.intermediate-code-generation em[data-v-f2fa7bc8]{color:#d4d4d4\n}","",{version:3,sources:["/Users/labodev/repositories/learning-compilers/src/components/content/intermediate-code-generation.vue?vue&type=style&index=0&id=f2fa7bc8&scoped=true&lang=scss"],names:[],mappings:";AAOA,+CAA+C,YAAY;CAC1D;AACD,kDAAkD,aAAa;CAC9D",file:"intermediate-code-generation.vue?vue&type=style&index=0&id=f2fa7bc8&scoped=true&lang=scss",sourcesContent:['\n@import url("https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700");\n@import url("https://fonts.googleapis.com/css?family=Dosis");\n@import url("https://fonts.googleapis.com/css?family=Montserrat");\n@import url("https://fonts.googleapis.com/css?family=Roboto:400,400i,700");\n@import url("https://fonts.googleapis.com/css?family=Niconne");\n@import url("https://fonts.googleapis.com/css?family=Libre+Baskerville");\n.intermediate-code-generation[data-v-f2fa7bc8]{display:flex\n}\n.intermediate-code-generation em[data-v-f2fa7bc8]{color:#d4d4d4\n}'],sourceRoot:""}])},function(e,t,n){"use strict";var o=n(81);n.n(o).a},function(e,t,n){(t=e.exports=n(2)(!0)).push([e.i,"@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Dosis);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Montserrat);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Roboto:400,400i,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Niconne);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Libre+Baskerville);",""]),t.push([e.i,"\n.semantic-analysis[data-v-e1b48bca]{display:flex\n}\n.semantic-analysis em[data-v-e1b48bca]{color:#d4d4d4\n}\n.semantic-analysis strong[data-v-e1b48bca]{color:#d4d4d4;font-weight:700\n}","",{version:3,sources:["/Users/labodev/repositories/learning-compilers/src/components/content/semantic-analysis.vue?vue&type=style&index=0&id=e1b48bca&scoped=true&lang=scss"],names:[],mappings:";AAOA,oCAAoC,YAAY;CAC/C;AACD,uCAAuC,aAAa;CACnD;AACD,2CAA2C,cAAc,eAAe;CACvE",file:"semantic-analysis.vue?vue&type=style&index=0&id=e1b48bca&scoped=true&lang=scss",sourcesContent:['\n@import url("https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700");\n@import url("https://fonts.googleapis.com/css?family=Dosis");\n@import url("https://fonts.googleapis.com/css?family=Montserrat");\n@import url("https://fonts.googleapis.com/css?family=Roboto:400,400i,700");\n@import url("https://fonts.googleapis.com/css?family=Niconne");\n@import url("https://fonts.googleapis.com/css?family=Libre+Baskerville");\n.semantic-analysis[data-v-e1b48bca]{display:flex\n}\n.semantic-analysis em[data-v-e1b48bca]{color:#d4d4d4\n}\n.semantic-analysis strong[data-v-e1b48bca]{color:#d4d4d4;font-weight:700\n}'],sourceRoot:""}])},function(e,t,n){"use strict";var o=n(82);n.n(o).a},function(e,t,n){(t=e.exports=n(2)(!0)).push([e.i,"@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Dosis);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Montserrat);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Roboto:400,400i,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Niconne);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Libre+Baskerville);",""]),t.push([e.i,"\n.syntax-analysis[data-v-ace56b84]{display:flex\n}\n.syntax-analysis em[data-v-ace56b84]{color:#d4d4d4\n}","",{version:3,sources:["/Users/labodev/repositories/learning-compilers/src/components/content/syntax-analysis.vue?vue&type=style&index=0&id=ace56b84&scoped=true&lang=scss"],names:[],mappings:";AAOA,kCAAkC,YAAY;CAC7C;AACD,qCAAqC,aAAa;CACjD",file:"syntax-analysis.vue?vue&type=style&index=0&id=ace56b84&scoped=true&lang=scss",sourcesContent:['\n@import url("https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700");\n@import url("https://fonts.googleapis.com/css?family=Dosis");\n@import url("https://fonts.googleapis.com/css?family=Montserrat");\n@import url("https://fonts.googleapis.com/css?family=Roboto:400,400i,700");\n@import url("https://fonts.googleapis.com/css?family=Niconne");\n@import url("https://fonts.googleapis.com/css?family=Libre+Baskerville");\n.syntax-analysis[data-v-ace56b84]{display:flex\n}\n.syntax-analysis em[data-v-ace56b84]{color:#d4d4d4\n}'],sourceRoot:""}])},function(e,t,n){"use strict";var o=n(83);n.n(o).a},function(e,t,n){(t=e.exports=n(2)(!0)).push([e.i,"@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Dosis);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Montserrat);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Roboto:400,400i,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Niconne);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Libre+Baskerville);",""]),t.push([e.i,"\n.lexical-analysis[data-v-d379ab78]{display:flex;flex-direction:column\n}\n.lexical-analysis em[data-v-d379ab78]{color:#d4d4d4\n}","",{version:3,sources:["/Users/labodev/repositories/learning-compilers/src/components/content/lexical-analysis.vue?vue&type=style&index=0&id=d379ab78&scoped=true&lang=scss"],names:[],mappings:";AAOA,mCAAmC,aAAa,qBAAqB;CACpE;AACD,sCAAsC,aAAa;CAClD",file:"lexical-analysis.vue?vue&type=style&index=0&id=d379ab78&scoped=true&lang=scss",sourcesContent:['\n@import url("https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700");\n@import url("https://fonts.googleapis.com/css?family=Dosis");\n@import url("https://fonts.googleapis.com/css?family=Montserrat");\n@import url("https://fonts.googleapis.com/css?family=Roboto:400,400i,700");\n@import url("https://fonts.googleapis.com/css?family=Niconne");\n@import url("https://fonts.googleapis.com/css?family=Libre+Baskerville");\n.lexical-analysis[data-v-d379ab78]{display:flex;flex-direction:column\n}\n.lexical-analysis em[data-v-d379ab78]{color:#d4d4d4\n}'],sourceRoot:""}])},function(e,t,n){"use strict";var o=n(84);n.n(o).a},function(e,t,n){(t=e.exports=n(2)(!0)).push([e.i,"@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Dosis);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Montserrat);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Roboto:400,400i,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Niconne);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Libre+Baskerville);",""]),t.push([e.i,"\n.description[data-v-3af8f276]{display:flex;flex-direction:column;height:auto;min-width:500px\n}\n.description__paragraph[data-v-3af8f276]{align-self:flex-start\n}","",{version:3,sources:["/Users/labodev/repositories/learning-compilers/src/components/description.vue?vue&type=style&index=0&id=3af8f276&scoped=true&lang=scss"],names:[],mappings:";AAOA,8BAA8B,aAAa,sBAAsB,YAAY,eAAe;CAC3F;AACD,yCAAyC,qBAAqB;CAC7D",file:"description.vue?vue&type=style&index=0&id=3af8f276&scoped=true&lang=scss",sourcesContent:['\n@import url("https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700");\n@import url("https://fonts.googleapis.com/css?family=Dosis");\n@import url("https://fonts.googleapis.com/css?family=Montserrat");\n@import url("https://fonts.googleapis.com/css?family=Roboto:400,400i,700");\n@import url("https://fonts.googleapis.com/css?family=Niconne");\n@import url("https://fonts.googleapis.com/css?family=Libre+Baskerville");\n.description[data-v-3af8f276]{display:flex;flex-direction:column;height:auto;min-width:500px\n}\n.description__paragraph[data-v-3af8f276]{align-self:flex-start\n}'],sourceRoot:""}])},function(e,t,n){"use strict";var o=n(85);n.n(o).a},function(e,t,n){(t=e.exports=n(2)(!0)).push([e.i,"@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Dosis);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Montserrat);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Roboto:400,400i,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Niconne);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Libre+Baskerville);",""]),t.push([e.i,"\n.code-sample[data-v-63875389]{display:flex;flex-direction:column;width:120px\n}\n.code-sample__line[data-v-63875389]{background-color:transparent;border:0;justify-content:flex-start;margin:0 auto;padding:0;width:100%\n}","",{version:3,sources:["/Users/labodev/repositories/learning-compilers/src/components/structure-of-a-compiler/code-sample.vue?vue&type=style&index=0&id=63875389&scoped=true&lang=scss"],names:[],mappings:";AAOA,8BAA8B,aAAa,sBAAsB,WAAW;CAC3E;AACD,oCAAoC,6BAA6B,SAAS,2BAA2B,cAAc,UAAU,UAAU;CACtI",file:"code-sample.vue?vue&type=style&index=0&id=63875389&scoped=true&lang=scss",sourcesContent:['\n@import url("https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700");\n@import url("https://fonts.googleapis.com/css?family=Dosis");\n@import url("https://fonts.googleapis.com/css?family=Montserrat");\n@import url("https://fonts.googleapis.com/css?family=Roboto:400,400i,700");\n@import url("https://fonts.googleapis.com/css?family=Niconne");\n@import url("https://fonts.googleapis.com/css?family=Libre+Baskerville");\n.code-sample[data-v-63875389]{display:flex;flex-direction:column;width:120px\n}\n.code-sample__line[data-v-63875389]{background-color:transparent;border:0;justify-content:flex-start;margin:0 auto;padding:0;width:100%\n}'],sourceRoot:""}])},function(e,t,n){"use strict";var o=n(86);n.n(o).a},function(e,t,n){(t=e.exports=n(2)(!0)).push([e.i,"@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Dosis);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Montserrat);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Roboto:400,400i,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Niconne);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Libre+Baskerville);",""]),t.push([e.i,"\n.node-tree[data-v-0108d572]{display:flex;justify-content:center;margin-bottom:.5rem\n}\n.node-tree__root[data-v-0108d572]{margin-bottom:0;margin-top:.5rem\n}\n.node-tree__edge-container[data-v-0108d572]{display:flex;flex-direction:column;justify-content:center\n}\n.node-tree__edge[data-v-0108d572]{align-self:center;background-color:#d4d4d4;display:flex;height:10px;margin:1rem;width:2px\n}\n.node-tree__edge--bottom[data-v-0108d572]{margin-bottom:0;margin-top:.4rem\n}\n.node-tree__edge--top[data-v-0108d572]{margin-bottom:.1rem;margin-top:0\n}\n.node-tree__tip[data-v-0108d572]{align-self:center;border:10px solid transparent;border-top-color:#d4d4d4;display:flex;height:0;margin-top:0;width:0\n}","",{version:3,sources:["/Users/labodev/repositories/learning-compilers/src/components/structure-of-a-compiler/node-tree.vue?vue&type=style&index=0&id=0108d572&scoped=true&lang=scss"],names:[],mappings:";AAOA,4BAA4B,aAAa,uBAAuB,mBAAmB;CAClF;AACD,kCAAkC,gBAAgB,gBAAgB;CACjE;AACD,4CAA4C,aAAa,sBAAsB,sBAAsB;CACpG;AACD,kCAAkC,kBAAkB,yBAAyB,aAAa,YAAY,YAAY,SAAS;CAC1H;AACD,0CAA0C,gBAAgB,gBAAgB;CACzE;AACD,uCAAuC,oBAAoB,YAAY;CACtE;AACD,iCAAiC,kBAAkB,8BAA8B,yBAAyB,aAAa,SAAS,aAAa,OAAO;CACnJ",file:"node-tree.vue?vue&type=style&index=0&id=0108d572&scoped=true&lang=scss",sourcesContent:['\n@import url("https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700");\n@import url("https://fonts.googleapis.com/css?family=Dosis");\n@import url("https://fonts.googleapis.com/css?family=Montserrat");\n@import url("https://fonts.googleapis.com/css?family=Roboto:400,400i,700");\n@import url("https://fonts.googleapis.com/css?family=Niconne");\n@import url("https://fonts.googleapis.com/css?family=Libre+Baskerville");\n.node-tree[data-v-0108d572]{display:flex;justify-content:center;margin-bottom:.5rem\n}\n.node-tree__root[data-v-0108d572]{margin-bottom:0;margin-top:.5rem\n}\n.node-tree__edge-container[data-v-0108d572]{display:flex;flex-direction:column;justify-content:center\n}\n.node-tree__edge[data-v-0108d572]{align-self:center;background-color:#d4d4d4;display:flex;height:10px;margin:1rem;width:2px\n}\n.node-tree__edge--bottom[data-v-0108d572]{margin-bottom:0;margin-top:.4rem\n}\n.node-tree__edge--top[data-v-0108d572]{margin-bottom:.1rem;margin-top:0\n}\n.node-tree__tip[data-v-0108d572]{align-self:center;border:10px solid transparent;border-top-color:#d4d4d4;display:flex;height:0;margin-top:0;width:0\n}'],sourceRoot:""}])},function(e,t,n){"use strict";var o=n(87);n.n(o).a},function(e,t,n){(t=e.exports=n(2)(!0)).push([e.i,"@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Dosis);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Montserrat);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Roboto:400,400i,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Niconne);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Libre+Baskerville);",""]),t.push([e.i,"\n.triple-node__children[data-v-4d8249b6],.triple-node__parent[data-v-4d8249b6]{color:#d4d4d4;display:flex;justify-content:center\n}\n.triple-node__left-child[data-v-4d8249b6],.triple-node__right-child[data-v-4d8249b6]{display:flex;justify-content:center;white-space:nowrap\n}\n.triple-node__right-child[data-v-4d8249b6]{padding-left:1rem\n}\n.triple-node__right-child[data-v-4d8249b6]>:first-child{margin-left:75%\n}\n.triple-node__arrows[data-v-4d8249b6]{display:flex\n}\n.triple-node__arrows--only-child[data-v-4d8249b6]{justify-content:center\n}\n.triple-node__arrow[data-v-4d8249b6]{display:flex;margin:.5rem 0\n}\n.triple-node__left-arrow[data-v-4d8249b6]{-webkit-transform:rotate(45deg);transform:rotate(45deg)\n}\n.triple-node__right-arrow[data-v-4d8249b6]{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)\n}\n.triple-node__left-arrow[data-v-4d8249b6],.triple-node__right-arrow[data-v-4d8249b6]{display:flex;flex:66%;flex-direction:column;justify-content:center\n}\n.triple-node__arrow-edge[data-v-4d8249b6],.triple-node__left-arrow-edge[data-v-4d8249b6],.triple-node__right-arrow-edge[data-v-4d8249b6]{align-self:center;background-color:#d4d4d4;display:flex;height:15px;width:1px\n}\n.triple-node__left-arrow-tip[data-v-4d8249b6],.triple-node__right-arrow-tip[data-v-4d8249b6]{align-self:center;border:5px solid transparent;display:flex;height:0;width:0\n}","",{version:3,sources:["/Users/labodev/repositories/learning-compilers/src/components/structure-of-a-compiler/triple-node.vue?vue&type=style&index=0&id=4d8249b6&scoped=true&lang=scss"],names:[],mappings:";AAOA,8EAA8E,cAAc,aAAa,sBAAsB;CAC9H;AACD,qFAAqF,aAAa,uBAAuB,kBAAkB;CAC1I;AACD,2CAA2C,iBAAiB;CAC3D;AACD,wDAAwD,eAAe;CACtE;AACD,sCAAsC,YAAY;CACjD;AACD,kDAAkD,sBAAsB;CACvE;AACD,qCAAqC,aAAa,cAAc;CAC/D;AACD,0CAA0C,gCAAgC,uBAAuB;CAChG;AACD,2CAA2C,iCAAiC,wBAAwB;CACnG;AACD,qFAAqF,aAAa,SAAS,sBAAsB,sBAAsB;CACtJ;AACD,yIAAyI,kBAAkB,yBAAyB,aAAa,YAAY,SAAS;CACrN;AACD,6FAA6F,kBAAkB,6BAA6B,aAAa,SAAS,OAAO;CACxK",file:"triple-node.vue?vue&type=style&index=0&id=4d8249b6&scoped=true&lang=scss",sourcesContent:['\n@import url("https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700");\n@import url("https://fonts.googleapis.com/css?family=Dosis");\n@import url("https://fonts.googleapis.com/css?family=Montserrat");\n@import url("https://fonts.googleapis.com/css?family=Roboto:400,400i,700");\n@import url("https://fonts.googleapis.com/css?family=Niconne");\n@import url("https://fonts.googleapis.com/css?family=Libre+Baskerville");\n.triple-node__children[data-v-4d8249b6],.triple-node__parent[data-v-4d8249b6]{color:#d4d4d4;display:flex;justify-content:center\n}\n.triple-node__left-child[data-v-4d8249b6],.triple-node__right-child[data-v-4d8249b6]{display:flex;justify-content:center;white-space:nowrap\n}\n.triple-node__right-child[data-v-4d8249b6]{padding-left:1rem\n}\n.triple-node__right-child[data-v-4d8249b6]>:first-child{margin-left:75%\n}\n.triple-node__arrows[data-v-4d8249b6]{display:flex\n}\n.triple-node__arrows--only-child[data-v-4d8249b6]{justify-content:center\n}\n.triple-node__arrow[data-v-4d8249b6]{display:flex;margin:.5rem 0\n}\n.triple-node__left-arrow[data-v-4d8249b6]{-webkit-transform:rotate(45deg);transform:rotate(45deg)\n}\n.triple-node__right-arrow[data-v-4d8249b6]{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)\n}\n.triple-node__left-arrow[data-v-4d8249b6],.triple-node__right-arrow[data-v-4d8249b6]{display:flex;flex:66%;flex-direction:column;justify-content:center\n}\n.triple-node__arrow-edge[data-v-4d8249b6],.triple-node__left-arrow-edge[data-v-4d8249b6],.triple-node__right-arrow-edge[data-v-4d8249b6]{align-self:center;background-color:#d4d4d4;display:flex;height:15px;width:1px\n}\n.triple-node__left-arrow-tip[data-v-4d8249b6],.triple-node__right-arrow-tip[data-v-4d8249b6]{align-self:center;border:5px solid transparent;display:flex;height:0;width:0\n}'],sourceRoot:""}])},function(e,t,n){"use strict";var o=n(88);n.n(o).a},function(e,t,n){(t=e.exports=n(2)(!0)).push([e.i,"@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Dosis);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Montserrat);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Roboto:400,400i,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Niconne);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Libre+Baskerville);",""]),t.push([e.i,"\n.symbol-table[data-v-329fe102]{color:#d4d4d4;display:flex;flex-direction:column;font-family:Ubuntu Mono,monospace;margin-bottom:1rem\n}\n.symbol-table__row[data-v-329fe102]{align-self:center;display:flex;flex-direction:row\n}\n.symbol-table__index[data-v-329fe102]{border:0;width:30px\n}\n.symbol-table__ellipsis[data-v-329fe102],.symbol-table__name[data-v-329fe102]{border:1px solid #d4d4d4;height:1.2rem;width:100px\n}\n.symbol-table__ellipsis[data-v-329fe102]{border-left:none\n}","",{version:3,sources:["/Users/labodev/repositories/learning-compilers/src/components/structure-of-a-compiler/symbol-table.vue?vue&type=style&index=0&id=329fe102&scoped=true&lang=scss"],names:[],mappings:";AAOA,+BAA+B,cAAc,aAAa,sBAAsB,kCAAkC,kBAAkB;CACnI;AACD,oCAAoC,kBAAkB,aAAa,kBAAkB;CACpF;AACD,sCAAsC,SAAS,UAAU;CACxD;AACD,8EAA8E,yBAAyB,cAAc,WAAW;CAC/H;AACD,yCAAyC,gBAAgB;CACxD",file:"symbol-table.vue?vue&type=style&index=0&id=329fe102&scoped=true&lang=scss",sourcesContent:['\n@import url("https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700");\n@import url("https://fonts.googleapis.com/css?family=Dosis");\n@import url("https://fonts.googleapis.com/css?family=Montserrat");\n@import url("https://fonts.googleapis.com/css?family=Roboto:400,400i,700");\n@import url("https://fonts.googleapis.com/css?family=Niconne");\n@import url("https://fonts.googleapis.com/css?family=Libre+Baskerville");\n.symbol-table[data-v-329fe102]{color:#d4d4d4;display:flex;flex-direction:column;font-family:Ubuntu Mono,monospace;margin-bottom:1rem\n}\n.symbol-table__row[data-v-329fe102]{align-self:center;display:flex;flex-direction:row\n}\n.symbol-table__index[data-v-329fe102]{border:0;width:30px\n}\n.symbol-table__ellipsis[data-v-329fe102],.symbol-table__name[data-v-329fe102]{border:1px solid #d4d4d4;height:1.2rem;width:100px\n}\n.symbol-table__ellipsis[data-v-329fe102]{border-left:none\n}'],sourceRoot:""}])},function(e,t,n){"use strict";var o=n(89);n.n(o).a},function(e,t,n){(t=e.exports=n(2)(!0)).push([e.i,"@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Dosis);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Montserrat);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Roboto:400,400i,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Niconne);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Libre+Baskerville);",""]),t.push([e.i,"\n.box[data-v-1c6e3dbe]{align-self:center;background-color:transparent;border:1px solid #d4d4d4;border-radius:0;color:#d4d4d4;flex-shrink:0;font-family:Ubuntu Mono,monospace;font-size:1.2rem;justify-content:center;margin-bottom:1rem;outline:none;padding:1rem\n}\n.box[data-v-1c6e3dbe],.box__container[data-v-1c6e3dbe]{display:flex;width:400px\n}\n.box__translatable-enter-active[data-v-1c6e3dbe],.box__translatable-leave-active[data-v-1c6e3dbe]{transition:opacity 1s\n}\n.box__translatable-enter[data-v-1c6e3dbe],.box__translatable-leave-to[data-v-1c6e3dbe]{opacity:0\n}\n.box__highlighted[data-v-1c6e3dbe]{cursor:pointer\n}\n.box__highlighted[data-v-1c6e3dbe],.box__highlighted[data-v-1c6e3dbe]:hover{border-color:#ce9178;color:#ce9178\n}\n.box__highlightable[data-v-1c6e3dbe]{border:1px solid #d4d4d4!important;color:#d4d4d4!important;cursor:pointer\n}\n.box__highlightable[data-v-1c6e3dbe]:hover{border-color:#ce9178!important;color:#ce9178!important\n}\n.box__arrow[data-v-1c6e3dbe]{align-self:center;border:10px solid transparent;border-left-color:#ce9178;display:flex;height:0;margin-top:-1rem;width:0\n}","",{version:3,sources:["/Users/labodev/repositories/learning-compilers/src/components/structure-of-a-compiler/box.vue?vue&type=style&index=0&id=1c6e3dbe&scoped=true&lang=scss"],names:[],mappings:";AAOA,sBAAsB,kBAAkB,6BAA6B,yBAAyB,gBAAgB,cAAc,cAAc,kCAAkC,iBAAiB,uBAAuB,mBAAmB,aAAa,YAAY;CAC/P;AACD,uDAAuD,aAAa,WAAW;CAC9E;AACD,kGAAkG,qBAAqB;CACtH;AACD,uFAAuF,SAAS;CAC/F;AACD,mCAAmC,cAAc;CAChD;AACD,4EAA4E,qBAAqB,aAAa;CAC7G;AACD,qCAAqC,mCAAmC,wBAAwB,cAAc;CAC7G;AACD,2CAA2C,+BAA+B,uBAAuB;CAChG;AACD,6BAA6B,kBAAkB,8BAA8B,0BAA0B,aAAa,SAAS,iBAAiB,OAAO;CACpJ",file:"box.vue?vue&type=style&index=0&id=1c6e3dbe&scoped=true&lang=scss",sourcesContent:['\n@import url("https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700");\n@import url("https://fonts.googleapis.com/css?family=Dosis");\n@import url("https://fonts.googleapis.com/css?family=Montserrat");\n@import url("https://fonts.googleapis.com/css?family=Roboto:400,400i,700");\n@import url("https://fonts.googleapis.com/css?family=Niconne");\n@import url("https://fonts.googleapis.com/css?family=Libre+Baskerville");\n.box[data-v-1c6e3dbe]{align-self:center;background-color:transparent;border:1px solid #d4d4d4;border-radius:0;color:#d4d4d4;flex-shrink:0;font-family:Ubuntu Mono,monospace;font-size:1.2rem;justify-content:center;margin-bottom:1rem;outline:none;padding:1rem\n}\n.box[data-v-1c6e3dbe],.box__container[data-v-1c6e3dbe]{display:flex;width:400px\n}\n.box__translatable-enter-active[data-v-1c6e3dbe],.box__translatable-leave-active[data-v-1c6e3dbe]{transition:opacity 1s\n}\n.box__translatable-enter[data-v-1c6e3dbe],.box__translatable-leave-to[data-v-1c6e3dbe]{opacity:0\n}\n.box__highlighted[data-v-1c6e3dbe]{cursor:pointer\n}\n.box__highlighted[data-v-1c6e3dbe],.box__highlighted[data-v-1c6e3dbe]:hover{border-color:#ce9178;color:#ce9178\n}\n.box__highlightable[data-v-1c6e3dbe]{border:1px solid #d4d4d4!important;color:#d4d4d4!important;cursor:pointer\n}\n.box__highlightable[data-v-1c6e3dbe]:hover{border-color:#ce9178!important;color:#ce9178!important\n}\n.box__arrow[data-v-1c6e3dbe]{align-self:center;border:10px solid transparent;border-left-color:#ce9178;display:flex;height:0;margin-top:-1rem;width:0\n}'],sourceRoot:""}])},function(e,t,n){"use strict";var o=n(90);n.n(o).a},function(e,t,n){(t=e.exports=n(2)(!0)).push([e.i,"@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Dosis);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Montserrat);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Roboto:400,400i,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Niconne);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Libre+Baskerville);",""]),t.push([e.i,"\n.arrow[data-v-3879de74]{flex-direction:column;max-width:400px\n}\n.arrow[data-v-3879de74],.arrow__edge[data-v-3879de74]{align-self:center;display:flex\n}\n.arrow__edge[data-v-3879de74]{background-color:#d4d4d4;height:10px;margin:1rem;width:2px\n}\n.arrow__edge--bottom[data-v-3879de74]{margin-bottom:0;margin-top:.4rem\n}\n.arrow__edge--top[data-v-3879de74]{margin-bottom:.1rem;margin-top:0\n}\n.arrow__text[data-v-3879de74]{color:#d4d4d4;font-family:Ubuntu Mono,monospace;font-size:.9rem;line-height:.9rem;margin:.5rem auto;text-align:center\n}\n.arrow__tip[data-v-3879de74]{align-self:center;border:10px solid transparent;border-top-color:#d4d4d4;display:flex;height:0;margin-bottom:calc(1rem - 10px);margin-top:0;width:0\n}","",{version:3,sources:["/Users/labodev/repositories/learning-compilers/src/components/structure-of-a-compiler/arrow.vue?vue&type=style&index=0&id=3879de74&scoped=true&lang=scss"],names:[],mappings:";AAOA,wBAAwB,sBAAsB,eAAe;CAC5D;AACD,sDAAsD,kBAAkB,YAAY;CACnF;AACD,8BAA8B,yBAAyB,YAAY,YAAY,SAAS;CACvF;AACD,sCAAsC,gBAAgB,gBAAgB;CACrE;AACD,mCAAmC,oBAAoB,YAAY;CAClE;AACD,8BAA8B,cAAc,kCAAkC,gBAAgB,kBAAkB,kBAAkB,iBAAiB;CAClJ;AACD,6BAA6B,kBAAkB,8BAA8B,yBAAyB,aAAa,SAAS,gCAAgC,aAAa,OAAO;CAC/K",file:"arrow.vue?vue&type=style&index=0&id=3879de74&scoped=true&lang=scss",sourcesContent:['\n@import url("https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700");\n@import url("https://fonts.googleapis.com/css?family=Dosis");\n@import url("https://fonts.googleapis.com/css?family=Montserrat");\n@import url("https://fonts.googleapis.com/css?family=Roboto:400,400i,700");\n@import url("https://fonts.googleapis.com/css?family=Niconne");\n@import url("https://fonts.googleapis.com/css?family=Libre+Baskerville");\n.arrow[data-v-3879de74]{flex-direction:column;max-width:400px\n}\n.arrow[data-v-3879de74],.arrow__edge[data-v-3879de74]{align-self:center;display:flex\n}\n.arrow__edge[data-v-3879de74]{background-color:#d4d4d4;height:10px;margin:1rem;width:2px\n}\n.arrow__edge--bottom[data-v-3879de74]{margin-bottom:0;margin-top:.4rem\n}\n.arrow__edge--top[data-v-3879de74]{margin-bottom:.1rem;margin-top:0\n}\n.arrow__text[data-v-3879de74]{color:#d4d4d4;font-family:Ubuntu Mono,monospace;font-size:.9rem;line-height:.9rem;margin:.5rem auto;text-align:center\n}\n.arrow__tip[data-v-3879de74]{align-self:center;border:10px solid transparent;border-top-color:#d4d4d4;display:flex;height:0;margin-bottom:calc(1rem - 10px);margin-top:0;width:0\n}'],sourceRoot:""}])},function(e,t,n){"use strict";var o=n(91);n.n(o).a},function(e,t,n){(t=e.exports=n(2)(!0)).push([e.i,"@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Dosis);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Montserrat);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Roboto:400,400i,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Niconne);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Libre+Baskerville);",""]),t.push([e.i,"\n.introduction__container{display:flex;flex-direction:column;flex-wrap:wrap;margin-bottom:0;width:50%\n}\n.introduction__question-set{align-items:flex-start;display:flex;flex-direction:row;flex-wrap:wrap;margin:auto;width:500px\n}\n.introduction__subtitle{align-self:center;color:#ce9178;display:flex;font-family:Libre Baskerville,serif;font-size:1.2em;padding-left:1rem\n}","",{version:3,sources:["/Users/labodev/repositories/learning-compilers/src/components/content/introduction.vue?vue&type=style&index=0&module=true&lang=scss"],names:[],mappings:";AAOA,yBAAyB,aAAa,sBAAsB,eAAe,gBAAgB,SAAS;CACnG;AACD,4BAA4B,uBAAuB,aAAa,mBAAmB,eAAe,YAAY,WAAW;CACxH;AACD,wBAAwB,kBAAkB,cAAc,aAAa,oCAAoC,gBAAgB,iBAAiB;CACzI",file:"introduction.vue?vue&type=style&index=0&module=true&lang=scss",sourcesContent:['\n@import url("https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700");\n@import url("https://fonts.googleapis.com/css?family=Dosis");\n@import url("https://fonts.googleapis.com/css?family=Montserrat");\n@import url("https://fonts.googleapis.com/css?family=Roboto:400,400i,700");\n@import url("https://fonts.googleapis.com/css?family=Niconne");\n@import url("https://fonts.googleapis.com/css?family=Libre+Baskerville");\n.introduction__container{display:flex;flex-direction:column;flex-wrap:wrap;margin-bottom:0;width:50%\n}\n.introduction__question-set{align-items:flex-start;display:flex;flex-direction:row;flex-wrap:wrap;margin:auto;width:500px\n}\n.introduction__subtitle{align-self:center;color:#ce9178;display:flex;font-family:Libre Baskerville,serif;font-size:1.2em;padding-left:1rem\n}'],sourceRoot:""}])},function(e,t,n){(t=e.exports=n(2)(!0)).push([e.i,"@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Dosis);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Montserrat);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Roboto:400,400i,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Niconne);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Libre+Baskerville);",""]),t.push([e.i,"\n.question[data-v-747b4307]{cursor:pointer;display:flex;flex-direction:column;width:100%\n}\n.question__question[data-v-747b4307]{align-self:flex-start;margin-bottom:0;padding-top:0;width:calc(50% - 2rem)\n}\n.question__question[data-v-747b4307]:first-child{margin-top:1rem\n}\n.question__answer[data-v-747b4307]{align-self:flex-start;color:#d4d4d4;padding-bottom:0;padding-top:0;width:400px\n}\n.question__answer[data-v-747b4307]:first-letter{font-size:1rem\n}","",{version:3,sources:["/Users/labodev/repositories/learning-compilers/src/components/question.vue?vue&type=style&index=0&id=747b4307&scoped=true&lang=scss"],names:[],mappings:";AAOA,2BAA2B,eAAe,aAAa,sBAAsB,UAAU;CACtF;AACD,qCAAqC,sBAAsB,gBAAgB,cAAc,sBAAsB;CAC9G;AACD,iDAAiD,eAAe;CAC/D;AACD,mCAAmC,sBAAsB,cAAc,iBAAiB,cAAc,WAAW;CAChH;AACD,gDAAgD,cAAc;CAC7D",file:"question.vue?vue&type=style&index=0&id=747b4307&scoped=true&lang=scss",sourcesContent:['\n@import url("https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700");\n@import url("https://fonts.googleapis.com/css?family=Dosis");\n@import url("https://fonts.googleapis.com/css?family=Montserrat");\n@import url("https://fonts.googleapis.com/css?family=Roboto:400,400i,700");\n@import url("https://fonts.googleapis.com/css?family=Niconne");\n@import url("https://fonts.googleapis.com/css?family=Libre+Baskerville");\n.question[data-v-747b4307]{cursor:pointer;display:flex;flex-direction:column;width:100%\n}\n.question__question[data-v-747b4307]{align-self:flex-start;margin-bottom:0;padding-top:0;width:calc(50% - 2rem)\n}\n.question__question[data-v-747b4307]:first-child{margin-top:1rem\n}\n.question__answer[data-v-747b4307]{align-self:flex-start;color:#d4d4d4;padding-bottom:0;padding-top:0;width:400px\n}\n.question__answer[data-v-747b4307]:first-letter{font-size:1rem\n}'],sourceRoot:""}])},function(e,t,n){"use strict";var o=n(93);n.n(o).a},function(e,t,n){(t=e.exports=n(2)(!0)).push([e.i,"@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Dosis);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Montserrat);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Roboto:400,400i,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Niconne);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Libre+Baskerville);",""]),t.push([e.i,"\n.about__container[data-v-8be625a0]{display:flex;flex-direction:row;flex-wrap:wrap;margin-bottom:0\n}\n.about__left-column[data-v-8be625a0]{display:flex;flex:0.5;flex-shrink:0;justify-content:flex-end\n}\n.about__right-column[data-v-8be625a0]{display:flex;flex:0.5;position:relative\n}\n.about__content[data-v-8be625a0]{margin-top:1rem\n}\n.about__content[data-v-8be625a0],.about__example[data-v-8be625a0]{display:flex;flex-direction:column;justify-content:flex-start\n}\n.about__example[data-v-8be625a0]{flex-wrap:wrap;position:-webkit-sticky;position:sticky;top:3rem\n}\n.about__example .source-code[data-v-8be625a0]{background-color:transparent;border:none;color:#cf4647;margin-left:0;margin-top:1rem;padding:0\n}","",{version:3,sources:["/Users/labodev/repositories/learning-compilers/src/components/content/about.vue?vue&type=style&index=0&id=8be625a0&scoped=true&lang=scss"],names:[],mappings:";AAOA,mCAAmC,aAAa,mBAAmB,eAAe,eAAe;CAChG;AACD,qCAAqC,aAAa,SAAS,cAAc,wBAAwB;CAChG;AACD,sCAAsC,aAAa,SAAS,iBAAiB;CAC5E;AACD,iCAAiC,eAAe;CAC/C;AACD,kEAAkE,aAAa,sBAAsB,0BAA0B;CAC9H;AACD,iCAAiC,eAAe,wBAAwB,gBAAgB,QAAQ;CAC/F;AACD,8CAA8C,6BAA6B,YAAY,cAAc,cAAc,gBAAgB,SAAS;CAC3I",file:"about.vue?vue&type=style&index=0&id=8be625a0&scoped=true&lang=scss",sourcesContent:['\n@import url("https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700");\n@import url("https://fonts.googleapis.com/css?family=Dosis");\n@import url("https://fonts.googleapis.com/css?family=Montserrat");\n@import url("https://fonts.googleapis.com/css?family=Roboto:400,400i,700");\n@import url("https://fonts.googleapis.com/css?family=Niconne");\n@import url("https://fonts.googleapis.com/css?family=Libre+Baskerville");\n.about__container[data-v-8be625a0]{display:flex;flex-direction:row;flex-wrap:wrap;margin-bottom:0\n}\n.about__left-column[data-v-8be625a0]{display:flex;flex:0.5;flex-shrink:0;justify-content:flex-end\n}\n.about__right-column[data-v-8be625a0]{display:flex;flex:0.5;position:relative\n}\n.about__content[data-v-8be625a0]{margin-top:1rem\n}\n.about__content[data-v-8be625a0],.about__example[data-v-8be625a0]{display:flex;flex-direction:column;justify-content:flex-start\n}\n.about__example[data-v-8be625a0]{flex-wrap:wrap;position:-webkit-sticky;position:sticky;top:3rem\n}\n.about__example .source-code[data-v-8be625a0]{background-color:transparent;border:none;color:#cf4647;margin-left:0;margin-top:1rem;padding:0\n}'],sourceRoot:""}])},function(e,t,n){"use strict";var o=n(94);n.n(o).a},function(e,t,n){(t=e.exports=n(2)(!0)).push([e.i,"@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Dosis);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Montserrat);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Roboto:400,400i,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Niconne);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Libre+Baskerville);",""]),t.push([e.i,"\n.source-code[data-v-5a8e7960]{background-color:#1e1e1e;border:1px solid #d4d4d4;color:#d4d4d4;cursor:pointer;display:inline-flex;font-family:Ubuntu Mono,monospace;font-size:1rem;line-height:1.5rem;margin:.5rem;padding:.5rem;text-align:left;white-space:pre\n}\n.source-code__wrap[data-v-5a8e7960]{white-space:normal;width:250px;word-wrap:break-word\n}\n.source-code--color-clickable[data-v-5a8e7960]{border-color:#b4cea8;color:#b4cea8\n}","",{version:3,sources:["/Users/labodev/repositories/learning-compilers/src/components/source-code.vue?vue&type=style&index=0&id=5a8e7960&scoped=true&lang=scss"],names:[],mappings:";AAOA,8BAA8B,yBAAyB,yBAAyB,cAAc,eAAe,oBAAoB,kCAAkC,eAAe,mBAAmB,aAAa,cAAc,gBAAgB,eAAe;CAC9P;AACD,oCAAoC,mBAAmB,YAAY,oBAAoB;CACtF;AACD,+CAA+C,qBAAqB,aAAa;CAChF",file:"source-code.vue?vue&type=style&index=0&id=5a8e7960&scoped=true&lang=scss",sourcesContent:['\n@import url("https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700");\n@import url("https://fonts.googleapis.com/css?family=Dosis");\n@import url("https://fonts.googleapis.com/css?family=Montserrat");\n@import url("https://fonts.googleapis.com/css?family=Roboto:400,400i,700");\n@import url("https://fonts.googleapis.com/css?family=Niconne");\n@import url("https://fonts.googleapis.com/css?family=Libre+Baskerville");\n.source-code[data-v-5a8e7960]{background-color:#1e1e1e;border:1px solid #d4d4d4;color:#d4d4d4;cursor:pointer;display:inline-flex;font-family:Ubuntu Mono,monospace;font-size:1rem;line-height:1.5rem;margin:.5rem;padding:.5rem;text-align:left;white-space:pre\n}\n.source-code__wrap[data-v-5a8e7960]{white-space:normal;width:250px;word-wrap:break-word\n}\n.source-code--color-clickable[data-v-5a8e7960]{border-color:#b4cea8;color:#b4cea8\n}'],sourceRoot:""}])},function(e,t,n){"use strict";var o=n(95);n.n(o).a},function(e,t,n){(t=e.exports=n(2)(!0)).push([e.i,"@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Dosis);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Montserrat);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Roboto:400,400i,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Niconne);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Libre+Baskerville);",""]),t.push([e.i,'\n.dictionary[data-v-58f9e113]{border-left:1px solid #ced4d4;color:#d4d4d4;font-family:Ubuntu Mono,monospace;margin-top:1rem;padding:1rem;width:20em\n}\n.dictionary-container[data-v-58f9e113]{justify-content:flex-start;width:20em\n}\n.dictionary__key-value[data-v-58f9e113]{padding:0\n}\n.dictionary__key-value[data-v-58f9e113]:not(:last-child){display:inline-block\n}\n.dictionary__key-value[data-v-58f9e113]:not(:last-child):after{content:","\n}\n.dictionary__key-value[data-v-58f9e113]:first-child{display:inline-block\n}\n.dictionary__key-value[data-v-58f9e113]:first-child:before{content:"{" "\\A";padding-top:1em;white-space:pre\n}\n.dictionary__key-value[data-v-58f9e113]:last-child{display:inline-block\n}\n.dictionary__key-value[data-v-58f9e113]:last-child:after{content:"\\A" "}";margin-right:1em;white-space:pre\n}\n.dictionary__key[data-v-58f9e113]{color:#569cd3;display:inline-flex;font-weight:700;line-height:1em;padding:.25em 0 .25em .25em\n}\n.dictionary__key[data-v-58f9e113]:before{content:" ";white-space:pre\n}\n.dictionary__key[data-v-58f9e113]:after{content:":";white-space:pre\n}\n.dictionary__value[data-v-58f9e113]{color:#ce9178;display:inline-flex;line-height:1em;padding:.25em 0\n}\n.dictionary__value--string[data-v-58f9e113]:after,.dictionary__value--string[data-v-58f9e113]:before{content:\'"\'\n}',"",{version:3,sources:["/Users/labodev/repositories/learning-compilers/src/components/dictionary.vue?vue&type=style&index=0&id=58f9e113&scoped=true&lang=scss"],names:[],mappings:";AAOA,6BAA6B,8BAA8B,cAAc,kCAAkC,gBAAgB,aAAa,UAAU;CACjJ;AACD,uCAAuC,2BAA2B,UAAU;CAC3E;AACD,wCAAwC,SAAS;CAChD;AACD,yDAAyD,oBAAoB;CAC5E;AACD,+DAA+D,WAAW;CACzE;AACD,oDAAoD,oBAAoB;CACvE;AACD,2DAA2D,iBAAiB,gBAAgB,eAAe;CAC1G;AACD,mDAAmD,oBAAoB;CACtE;AACD,yDAAyD,iBAAiB,iBAAiB,eAAe;CACzG;AACD,kCAAkC,cAAc,oBAAoB,gBAAgB,gBAAgB,2BAA2B;CAC9H;AACD,yCAAyC,YAAY,eAAe;CACnE;AACD,wCAAwC,YAAY,eAAe;CAClE;AACD,oCAAoC,cAAc,oBAAoB,gBAAgB,eAAe;CACpG;AACD,qGAAqG,WAAW;CAC/G",file:"dictionary.vue?vue&type=style&index=0&id=58f9e113&scoped=true&lang=scss",sourcesContent:['\n@import url("https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700");\n@import url("https://fonts.googleapis.com/css?family=Dosis");\n@import url("https://fonts.googleapis.com/css?family=Montserrat");\n@import url("https://fonts.googleapis.com/css?family=Roboto:400,400i,700");\n@import url("https://fonts.googleapis.com/css?family=Niconne");\n@import url("https://fonts.googleapis.com/css?family=Libre+Baskerville");\n.dictionary[data-v-58f9e113]{border-left:1px solid #ced4d4;color:#d4d4d4;font-family:Ubuntu Mono,monospace;margin-top:1rem;padding:1rem;width:20em\n}\n.dictionary-container[data-v-58f9e113]{justify-content:flex-start;width:20em\n}\n.dictionary__key-value[data-v-58f9e113]{padding:0\n}\n.dictionary__key-value[data-v-58f9e113]:not(:last-child){display:inline-block\n}\n.dictionary__key-value[data-v-58f9e113]:not(:last-child):after{content:","\n}\n.dictionary__key-value[data-v-58f9e113]:first-child{display:inline-block\n}\n.dictionary__key-value[data-v-58f9e113]:first-child:before{content:"{" "\\a";padding-top:1em;white-space:pre\n}\n.dictionary__key-value[data-v-58f9e113]:last-child{display:inline-block\n}\n.dictionary__key-value[data-v-58f9e113]:last-child:after{content:"\\a" "}";margin-right:1em;white-space:pre\n}\n.dictionary__key[data-v-58f9e113]{color:#569cd3;display:inline-flex;font-weight:700;line-height:1em;padding:.25em 0 .25em .25em\n}\n.dictionary__key[data-v-58f9e113]:before{content:" ";white-space:pre\n}\n.dictionary__key[data-v-58f9e113]:after{content:":";white-space:pre\n}\n.dictionary__value[data-v-58f9e113]{color:#ce9178;display:inline-flex;line-height:1em;padding:.25em 0\n}\n.dictionary__value--string[data-v-58f9e113]:after,.dictionary__value--string[data-v-58f9e113]:before{content:\'"\'\n}'],sourceRoot:""}])},function(e,t,n){"use strict";var o=n(96);n.n(o).a},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){(t=e.exports=n(2)(!0)).push([e.i,"@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Dosis);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Montserrat);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Roboto:400,400i,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Niconne);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Libre+Baskerville);",""]),t.push([e.i,"\n.json-editor .json__panels{display:flex;flex-direction:row\n}\n.json-editor .dynamic-json,.json-editor .editable-json{min-width:500px\n}\n.json-editor .dynamic-json .json__pair---button,.json-editor .editable-json .json__pair---button{background-color:transparent;border:none;cursor:pointer;display:none;font-size:1rem;outline:unset\n}\n.json-editor .editable-json.editable-json--ready .json__pair---button{display:inline\n}","",{version:3,sources:["/Users/labodev/repositories/learning-compilers/src/components/json/json-editor/json-editor.vue?vue&type=style&index=0&module=true&lang=css"],names:[],mappings:";AAOA,2BAA2B,aAAa,kBAAkB;CACzD;AACD,uDAAuD,eAAe;CACrE;AACD,iGAAiG,6BAA6B,YAAY,eAAe,aAAa,eAAe,aAAa;CACjM;AACD,sEAAsE,cAAc;CACnF",file:"json-editor.vue?vue&type=style&index=0&module=true&lang=css",sourcesContent:['\n@import url("https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700");\n@import url("https://fonts.googleapis.com/css?family=Dosis");\n@import url("https://fonts.googleapis.com/css?family=Montserrat");\n@import url("https://fonts.googleapis.com/css?family=Roboto:400,400i,700");\n@import url("https://fonts.googleapis.com/css?family=Niconne");\n@import url("https://fonts.googleapis.com/css?family=Libre+Baskerville");\n.json-editor .json__panels{display:flex;flex-direction:row\n}\n.json-editor .dynamic-json,.json-editor .editable-json{min-width:500px\n}\n.json-editor .dynamic-json .json__pair---button,.json-editor .editable-json .json__pair---button{background-color:transparent;border:none;cursor:pointer;display:none;font-size:1rem;outline:unset\n}\n.json-editor .editable-json.editable-json--ready .json__pair---button{display:inline\n}'],sourceRoot:""}])},,,,,function(e,t,n){(t=e.exports=n(2)(!0)).push([e.i,"@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Dosis);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Montserrat);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Roboto:400,400i,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Niconne);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Libre+Baskerville);",""]),t.push([e.i,'\n.json{flex-wrap:wrap\n}\n.json__container{border-left:1px solid #ced4d4;color:#d4d4d4;font-family:Ubuntu Mono,monospace;margin-top:1rem;padding:1rem;width:20em\n}\n.json__container .dynamic-json.with-punctuation .json__comma{display:inline-flex\n}\n.json__container .dynamic-json.with-punctuation .json__array>[is-visible]:last-child>.json__value--array-item>.json__comma,.json__container .dynamic-json.with-punctuation .json__object>div:last-child>.json__pair>.json__comma{display:none\n}\n.json__container .dynamic-json.with-punctuation .json__parentheses--left,.json__container .dynamic-json.with-punctuation .json__square-bracket--left{display:inline-flex\n}\n.json__container .dynamic-json.with-punctuation .json__pair .json__colon:after,.json__container .dynamic-json.with-punctuation .json__parentheses--right:after,.json__container .dynamic-json.with-punctuation .json__square-bracket--right:after{content:none\n}\n.json__container .dynamic-json.with-punctuation .json__pair{display:inline-flex\n}\n.json__container .dynamic-json.with-punctuation .json__pair---button{color:#b4cea8\n}\n.json__container .dynamic-json.with-punctuation .json__pair .json__colon{color:#d4d4d4\n}\n.json__container .dynamic-json.with-punctuation .json__pair .json__colon:after{content:""\n}\n.json__container .dynamic-json.with-punctuation .json__pair--array>.json__key-value>.json__colon:after,.json__container .dynamic-json.with-punctuation .json__pair--no-children .json__value:after,.json__container .dynamic-json.with-punctuation .json__pair--object>.json__key-value>.json__colon:after{content:none\n}\n.json__container .editable-json .json__value--editable{cursor:pointer\n}\n.json__container .editable-json .json__value--edited{border-bottom:1px solid #d4d4d4;color:#d4d4d4;cursor:auto;outline:unset\n}\n.json__key{color:#569cd3;font-weight:700;padding-right:0\n}\n.json__comma,.json__key,.json__value{display:inline-flex;line-height:1.4em;padding-left:0\n}\n.json__value{color:#ce9178\n}\n.json__value--boolean{color:#2aa19b\n}\n.json__value--null{color:#cf4647\n}\n.json__value--array-item{display:inline-flex\n}\n.json__comma{display:none\n}\n.json__array,.json__object{display:flex;flex-direction:column\n}\n.json__array-container,.json__object-container{display:flex;flex-direction:column;flex-wrap:wrap;margin-left:2rem\n}\n.json__key-value{display:flex-inline;line-height:1.4em;padding:0\n}\n.json__key-value:not(:last-child){display:inline-block\n}\n.json__key-value:first-child,.json__key-value:last-child{display:inline-flex\n}\n.json__key-value>span{font-size:1em\n}\n.json__key-value>span.json__array-container,.json__key-value>span.json__object-container{display:flex;flex-wrap:wrap\n}\n.json__key-value .json__array,.json__key-value .json__object{display:inline-flex;flex-direction:column\n}\n.json__colon{margin-right:.5em\n}\n.json__parentheses,.json__square-bracket{color:#d4d4d4;display:flex;width:100%\n}\n.json__parentheses:last-child,.json__square-bracket:last-child{display:inline-flex\n}\n.json__parentheses--left,.json__square-bracket--left{display:none\n}\n.json__parentheses--right,.json__square-bracket--right{display:inline\n}\n.json__parentheses--right:after,.json__square-bracket--right:after{content:", "\n}\n.json__parentheses--right{margin-left:-2rem\n}\n.json>.json__object-container{margin-left:0\n}\n.json>.json__object-container>.json__parentheses--left,.json>.json__object-container>.json__square-bracket--left{display:flex\n}\n.json>.json__object-container>.json__parentheses--right,.json>.json__object-container>.json__square-bracket--right{margin-left:0\n}\n.json>.json__object-container>.json__parentheses--right:after,.json>.json__object-container>.json__square-bracket--right:after{content:""\n}\n.json>.json__object-container>.json__object{margin-left:2rem\n}\n.json .json__array>.json__value>.json__object-container .json__parentheses--left{display:flex\n}\n.json .json__array>.json__value>.json__object-container>.json__parentheses--right,.json .json__pair>.json__value>.json__array-container{margin-left:0\n}\n.json .json__pair>.json__value>.json__array-container>.json__array{margin-left:2rem\n}\n.json .json__pair>.json__value>.json__array-container>.json__array>.json__value>.json__object-container{margin-left:0\n}\n.json .json__pair>.json__value>.json__array-container>.json__array>.json__value>.json__object-container>.json__object{margin-left:2rem\n}\n.json__pair{display:inline-flex\n}\n.json__pair---button{color:#b4cea8\n}\n.json__pair .json__colon{color:#d4d4d4\n}\n.json__pair .json__colon:after{content:""\n}\n.json__pair--no-children .json__value:after{content:","\n}\n.json__pair--array,.json__pair--object{display:flex;flex-direction:column;flex-wrap:wrap;line-height:1.4em;padding:0 .25em 0 0\n}\n.json__pair--array>.json__key-value>.json__colon,.json__pair--object>.json__key-value>.json__colon{color:#d4d4d4\n}\n.json__pair--array>.json__key-value>.json__colon:after,.json__pair--object>.json__key-value>.json__colon:after{color:#d4d4d4;content:"{"\n}\n.json__pair--array>.json__key-value>.json__colon:after{content:"["\n}',"",{version:3,sources:["/Users/labodev/repositories/learning-compilers/src/components/json/json/json.vue?vue&type=style&index=0&lang=scss"],names:[],mappings:";AAOA,MAAM,cAAc;CACnB;AACD,iBAAiB,8BAA8B,cAAc,kCAAkC,gBAAgB,aAAa,UAAU;CACrI;AACD,6DAA6D,mBAAmB;CAC/E;AACD,iOAAiO,YAAY;CAC5O;AACD,qJAAqJ,mBAAmB;CACvK;AACD,kPAAkP,YAAY;CAC7P;AACD,4DAA4D,mBAAmB;CAC9E;AACD,qEAAqE,aAAa;CACjF;AACD,yEAAyE,aAAa;CACrF;AACD,+EAA+E,UAAU;CACxF;AACD,2SAA2S,YAAY;CACtT;AACD,uDAAuD,cAAc;CACpE;AACD,qDAAqD,gCAAgC,cAAc,YAAY,aAAa;CAC3H;AACD,WAAW,cAAc,gBAAgB,eAAe;CACvD;AACD,qCAAqC,oBAAoB,kBAAkB,cAAc;CACxF;AACD,aAAa,aAAa;CACzB;AACD,sBAAsB,aAAa;CAClC;AACD,mBAAmB,aAAa;CAC/B;AACD,yBAAyB,mBAAmB;CAC3C;AACD,aAAa,YAAY;CACxB;AACD,2BAA2B,aAAa,qBAAqB;CAC5D;AACD,+CAA+C,aAAa,sBAAsB,eAAe,gBAAgB;CAChH;AACD,iBAAiB,oBAAoB,kBAAkB,SAAS;CAC/D;AACD,kCAAkC,oBAAoB;CACrD;AACD,yDAAyD,mBAAmB;CAC3E;AACD,sBAAsB,aAAa;CAClC;AACD,yFAAyF,aAAa,cAAc;CACnH;AACD,6DAA6D,oBAAoB,qBAAqB;CACrG;AACD,aAAa,iBAAiB;CAC7B;AACD,yCAAyC,cAAc,aAAa,UAAU;CAC7E;AACD,+DAA+D,mBAAmB;CACjF;AACD,qDAAqD,YAAY;CAChE;AACD,uDAAuD,cAAc;CACpE;AACD,mEAAmE,YAAY;CAC9E;AACD,0BAA0B,iBAAiB;CAC1C;AACD,8BAA8B,aAAa;CAC1C;AACD,iHAAiH,YAAY;CAC5H;AACD,mHAAmH,aAAa;CAC/H;AACD,+HAA+H,UAAU;CACxI;AACD,4CAA4C,gBAAgB;CAC3D;AACD,iFAAiF,YAAY;CAC5F;AACD,wIAAwI,aAAa;CACpJ;AACD,mEAAmE,gBAAgB;CAClF;AACD,wGAAwG,aAAa;CACpH;AACD,sHAAsH,gBAAgB;CACrI;AACD,YAAY,mBAAmB;CAC9B;AACD,qBAAqB,aAAa;CACjC;AACD,yBAAyB,aAAa;CACrC;AACD,+BAA+B,UAAU;CACxC;AACD,4CAA4C,WAAW;CACtD;AACD,uCAAuC,aAAa,sBAAsB,eAAe,kBAAkB,mBAAmB;CAC7H;AACD,mGAAmG,aAAa;CAC/G;AACD,+GAA+G,cAAc,WAAW;CACvI;AACD,uDAAuD,WAAW;CACjE",file:"json.vue?vue&type=style&index=0&lang=scss",sourcesContent:['\n@import url("https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700");\n@import url("https://fonts.googleapis.com/css?family=Dosis");\n@import url("https://fonts.googleapis.com/css?family=Montserrat");\n@import url("https://fonts.googleapis.com/css?family=Roboto:400,400i,700");\n@import url("https://fonts.googleapis.com/css?family=Niconne");\n@import url("https://fonts.googleapis.com/css?family=Libre+Baskerville");\n.json{flex-wrap:wrap\n}\n.json__container{border-left:1px solid #ced4d4;color:#d4d4d4;font-family:Ubuntu Mono,monospace;margin-top:1rem;padding:1rem;width:20em\n}\n.json__container .dynamic-json.with-punctuation .json__comma{display:inline-flex\n}\n.json__container .dynamic-json.with-punctuation .json__array>[is-visible]:last-child>.json__value--array-item>.json__comma,.json__container .dynamic-json.with-punctuation .json__object>div:last-child>.json__pair>.json__comma{display:none\n}\n.json__container .dynamic-json.with-punctuation .json__parentheses--left,.json__container .dynamic-json.with-punctuation .json__square-bracket--left{display:inline-flex\n}\n.json__container .dynamic-json.with-punctuation .json__pair .json__colon:after,.json__container .dynamic-json.with-punctuation .json__parentheses--right:after,.json__container .dynamic-json.with-punctuation .json__square-bracket--right:after{content:none\n}\n.json__container .dynamic-json.with-punctuation .json__pair{display:inline-flex\n}\n.json__container .dynamic-json.with-punctuation .json__pair---button{color:#b4cea8\n}\n.json__container .dynamic-json.with-punctuation .json__pair .json__colon{color:#d4d4d4\n}\n.json__container .dynamic-json.with-punctuation .json__pair .json__colon:after{content:""\n}\n.json__container .dynamic-json.with-punctuation .json__pair--array>.json__key-value>.json__colon:after,.json__container .dynamic-json.with-punctuation .json__pair--no-children .json__value:after,.json__container .dynamic-json.with-punctuation .json__pair--object>.json__key-value>.json__colon:after{content:none\n}\n.json__container .editable-json .json__value--editable{cursor:pointer\n}\n.json__container .editable-json .json__value--edited{border-bottom:1px solid #d4d4d4;color:#d4d4d4;cursor:auto;outline:unset\n}\n.json__key{color:#569cd3;font-weight:700;padding-right:0\n}\n.json__comma,.json__key,.json__value{display:inline-flex;line-height:1.4em;padding-left:0\n}\n.json__value{color:#ce9178\n}\n.json__value--boolean{color:#2aa19b\n}\n.json__value--null{color:#cf4647\n}\n.json__value--array-item{display:inline-flex\n}\n.json__comma{display:none\n}\n.json__array,.json__object{display:flex;flex-direction:column\n}\n.json__array-container,.json__object-container{display:flex;flex-direction:column;flex-wrap:wrap;margin-left:2rem\n}\n.json__key-value{display:flex-inline;line-height:1.4em;padding:0\n}\n.json__key-value:not(:last-child){display:inline-block\n}\n.json__key-value:first-child,.json__key-value:last-child{display:inline-flex\n}\n.json__key-value>span{font-size:1em\n}\n.json__key-value>span.json__array-container,.json__key-value>span.json__object-container{display:flex;flex-wrap:wrap\n}\n.json__key-value .json__array,.json__key-value .json__object{display:inline-flex;flex-direction:column\n}\n.json__colon{margin-right:.5em\n}\n.json__parentheses,.json__square-bracket{color:#d4d4d4;display:flex;width:100%\n}\n.json__parentheses:last-child,.json__square-bracket:last-child{display:inline-flex\n}\n.json__parentheses--left,.json__square-bracket--left{display:none\n}\n.json__parentheses--right,.json__square-bracket--right{display:inline\n}\n.json__parentheses--right:after,.json__square-bracket--right:after{content:", "\n}\n.json__parentheses--right{margin-left:-2rem\n}\n.json>.json__object-container{margin-left:0\n}\n.json>.json__object-container>.json__parentheses--left,.json>.json__object-container>.json__square-bracket--left{display:flex\n}\n.json>.json__object-container>.json__parentheses--right,.json>.json__object-container>.json__square-bracket--right{margin-left:0\n}\n.json>.json__object-container>.json__parentheses--right:after,.json>.json__object-container>.json__square-bracket--right:after{content:""\n}\n.json>.json__object-container>.json__object{margin-left:2rem\n}\n.json .json__array>.json__value>.json__object-container .json__parentheses--left{display:flex\n}\n.json .json__array>.json__value>.json__object-container>.json__parentheses--right,.json .json__pair>.json__value>.json__array-container{margin-left:0\n}\n.json .json__pair>.json__value>.json__array-container>.json__array{margin-left:2rem\n}\n.json .json__pair>.json__value>.json__array-container>.json__array>.json__value>.json__object-container{margin-left:0\n}\n.json .json__pair>.json__value>.json__array-container>.json__array>.json__value>.json__object-container>.json__object{margin-left:2rem\n}\n.json__pair{display:inline-flex\n}\n.json__pair---button{color:#b4cea8\n}\n.json__pair .json__colon{color:#d4d4d4\n}\n.json__pair .json__colon:after{content:""\n}\n.json__pair--no-children .json__value:after{content:","\n}\n.json__pair--array,.json__pair--object{display:flex;flex-direction:column;flex-wrap:wrap;line-height:1.4em;padding:0 .25em 0 0\n}\n.json__pair--array>.json__key-value>.json__colon,.json__pair--object>.json__key-value>.json__colon{color:#d4d4d4\n}\n.json__pair--array>.json__key-value>.json__colon:after,.json__pair--object>.json__key-value>.json__colon:after{color:#d4d4d4;content:"{"\n}\n.json__pair--array>.json__key-value>.json__colon:after{content:"["\n}'],sourceRoot:""}])},function(e,t,n){"use strict";var o=n(98);n.n(o).a},,,,,,,,function(e,t,n){(t=e.exports=n(2)(!0)).push([e.i,"@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Dosis);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Montserrat);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Roboto:400,400i,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Niconne);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Libre+Baskerville);",""]),t.push([e.i,"\n.input-area[data-v-277f45c1]{align-self:center;border:0;display:flex;font-family:Ubuntu Mono,monospace;font-size:1em;margin:0;padding:0\n}\n.input-area__textarea[data-v-277f45c1]{background-color:#1e1e1e;border:1px solid #ced4d4;color:#d4d4d3;display:inline-block;font-size:1rem;height:10em;outline:none;padding:1em;width:20em\n}\n.input-area__textarea--error[data-v-277f45c1]{border-color:#94151b\n}","",{version:3,sources:["/Users/labodev/repositories/learning-compilers/src/components/input-area.vue?vue&type=style&index=0&id=277f45c1&scoped=true&lang=scss"],names:[],mappings:";AAOA,6BAA6B,kBAAkB,SAAS,aAAa,kCAAkC,cAAc,SAAS,SAAS;CACtI;AACD,uCAAuC,yBAAyB,yBAAyB,cAAc,qBAAqB,eAAe,YAAY,aAAa,YAAY,UAAU;CACzL;AACD,8CAA8C,oBAAoB;CACjE",file:"input-area.vue?vue&type=style&index=0&id=277f45c1&scoped=true&lang=scss",sourcesContent:['\n@import url("https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700");\n@import url("https://fonts.googleapis.com/css?family=Dosis");\n@import url("https://fonts.googleapis.com/css?family=Montserrat");\n@import url("https://fonts.googleapis.com/css?family=Roboto:400,400i,700");\n@import url("https://fonts.googleapis.com/css?family=Niconne");\n@import url("https://fonts.googleapis.com/css?family=Libre+Baskerville");\n.input-area[data-v-277f45c1]{align-self:center;border:0;display:flex;font-family:Ubuntu Mono,monospace;font-size:1em;margin:0;padding:0\n}\n.input-area__textarea[data-v-277f45c1]{background-color:#1e1e1e;border:1px solid #ced4d4;color:#d4d4d3;display:inline-block;font-size:1rem;height:10em;outline:none;padding:1em;width:20em\n}\n.input-area__textarea--error[data-v-277f45c1]{border-color:#94151b\n}'],sourceRoot:""}])},function(e,t,n){"use strict";var o=n(99);n.n(o).a},function(e,t,n){(t=e.exports=n(2)(!0)).push([e.i,"@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Dosis);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Montserrat);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Roboto:400,400i,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Niconne);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Libre+Baskerville);",""]),t.push([e.i,"\n.link[data-v-13b875c3]{display:inline;font-size:1rem;line-height:1rem\n}\n.link[data-v-13b875c3]:active,.link[data-v-13b875c3]:hover,.link[data-v-13b875c3]:link,.link[data-v-13b875c3]:visited{color:#b4cea8;font-size:1rem;line-height:1rem;text-decoration:underline\n}","",{version:3,sources:["/Users/labodev/repositories/learning-compilers/src/components/browsable-link.vue?vue&type=style&index=0&id=13b875c3&scoped=true&lang=scss"],names:[],mappings:";AAOA,uBAAuB,eAAe,eAAe,gBAAgB;CACpE;AACD,sHAAsH,cAAc,eAAe,iBAAiB,yBAAyB;CAC5L",file:"browsable-link.vue?vue&type=style&index=0&id=13b875c3&scoped=true&lang=scss",sourcesContent:['\n@import url("https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700");\n@import url("https://fonts.googleapis.com/css?family=Dosis");\n@import url("https://fonts.googleapis.com/css?family=Montserrat");\n@import url("https://fonts.googleapis.com/css?family=Roboto:400,400i,700");\n@import url("https://fonts.googleapis.com/css?family=Niconne");\n@import url("https://fonts.googleapis.com/css?family=Libre+Baskerville");\n.link[data-v-13b875c3]{display:inline;font-size:1rem;line-height:1rem\n}\n.link[data-v-13b875c3]:active,.link[data-v-13b875c3]:hover,.link[data-v-13b875c3]:link,.link[data-v-13b875c3]:visited{color:#b4cea8;font-size:1rem;line-height:1rem;text-decoration:underline\n}'],sourceRoot:""}])},function(e,t,n){"use strict";var o=n(100);n.n(o).a},function(e,t,n){(t=e.exports=n(2)(!0)).push([e.i,"@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Dosis);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Montserrat);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Roboto:400,400i,700);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Niconne);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Libre+Baskerville);",""]),t.push([e.i,"\n.paragraph[data-v-dcef856c]{align-self:center;color:#ce9178;display:inline-block;font-family:Roboto,sans-serif;font-size:1rem;font-weight:100;line-height:1.5rem;margin-top:0;padding:1rem;text-align:left;white-space:pre\n}\n.paragraph--align-right[data-v-dcef856c]{text-align:right\n}\n.paragraph[data-v-dcef856c]:first-letter{font-family:Libre Baskerville,serif;font-size:1.2rem\n}","",{version:3,sources:["/Users/labodev/repositories/learning-compilers/src/components/paragraph.vue?vue&type=style&index=0&id=dcef856c&scoped=true&lang=scss"],names:[],mappings:";AAOA,4BAA4B,kBAAkB,cAAc,qBAAqB,8BAA8B,eAAe,gBAAgB,mBAAmB,aAAa,aAAa,gBAAgB,eAAe;CACzN;AACD,yCAAyC,gBAAgB;CACxD;AACD,yCAAyC,oCAAoC,gBAAgB;CAC5F",file:"paragraph.vue?vue&type=style&index=0&id=dcef856c&scoped=true&lang=scss",sourcesContent:['\n@import url("https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700");\n@import url("https://fonts.googleapis.com/css?family=Dosis");\n@import url("https://fonts.googleapis.com/css?family=Montserrat");\n@import url("https://fonts.googleapis.com/css?family=Roboto:400,400i,700");\n@import url("https://fonts.googleapis.com/css?family=Niconne");\n@import url("https://fonts.googleapis.com/css?family=Libre+Baskerville");\n.paragraph[data-v-dcef856c]{align-self:center;color:#ce9178;display:inline-block;font-family:Roboto,sans-serif;font-size:1rem;font-weight:100;line-height:1.5rem;margin-top:0;padding:1rem;text-align:left;white-space:pre\n}\n.paragraph--align-right[data-v-dcef856c]{text-align:right\n}\n.paragraph[data-v-dcef856c]:first-letter{font-family:Libre Baskerville,serif;font-size:1.2rem\n}'],sourceRoot:""}])},function(e,t,n){"use strict";var o=n(101);n.n(o).a}]),[[179,0,2,1]]]); | //# sourceMappingURL=main.fece870af48b381a14c7.bundle.js.map |
|
apply_patch_test.go | package operations
import (
"context"
"fmt"
"io"
"io/ioutil"
"os"
"strings"
"testing"
"testing/iotest"
"github.com/stretchr/testify/require"
"gitlab.com/gitlab-org/gitaly/internal/git/log"
"gitlab.com/gitlab-org/gitaly/internal/gitaly/config"
"gitlab.com/gitlab-org/gitaly/internal/testhelper"
"gitlab.com/gitlab-org/gitaly/proto/go/gitalypb"
"gitlab.com/gitlab-org/gitaly/streamio"
"google.golang.org/grpc/codes"
)
func TestSuccessfulUserApplyPatch(t *testing.T) {
ctx, cancel := testhelper.Context()
defer cancel()
testSuccessfulUserApplyPatch(t, ctx)
}
func testSuccessfulUserApplyPatch(t *testing.T, ctx context.Context) {
serverSocketPath, stop := runOperationServiceServer(t)
defer stop()
client, conn := newOperationClient(t, serverSocketPath)
defer conn.Close()
testRepo, testRepoPath, cleanupFn := testhelper.NewTestRepo(t)
defer cleanupFn()
testPatchReadme := "testdata/0001-A-commit-from-a-patch.patch"
testPatchFeature := "testdata/0001-This-does-not-apply-to-the-feature-branch.patch"
testCases := []struct {
desc string
branchName string
branchCreated bool
patches []string
commitMessages []string
}{
{
desc: "a new branch",
branchName: "patched-branch",
branchCreated: true,
patches: []string{testPatchReadme},
commitMessages: []string{"A commit from a patch"},
},
{
desc: "an existing branch",
branchName: "feature",
branchCreated: false,
patches: []string{testPatchReadme},
commitMessages: []string{"A commit from a patch"},
},
{
desc: "multiple patches",
branchName: "branch-with-multiple-patches",
branchCreated: true,
patches: []string{testPatchReadme, testPatchFeature},
commitMessages: []string{"A commit from a patch", "This does not apply to the `feature` branch"},
},
}
for _, testCase := range testCases {
t.Run(testCase.desc, func(t *testing.T) {
stream, err := client.UserApplyPatch(ctx)
require.NoError(t, err)
headerRequest := applyPatchHeaderRequest(testRepo, testhelper.TestUser, testCase.branchName)
require.NoError(t, stream.Send(headerRequest))
writer := streamio.NewWriter(func(p []byte) error {
patchRequest := applyPatchPatchesRequest(p)
return stream.Send(patchRequest)
})
for _, patchFileName := range testCase.patches {
func() {
file, err := os.Open(patchFileName)
require.NoError(t, err)
defer file.Close()
byteReader := iotest.OneByteReader(file)
_, err = io.Copy(writer, byteReader)
require.NoError(t, err)
}()
}
response, err := stream.CloseAndRecv()
require.NoError(t, err)
response.GetBranchUpdate()
require.Equal(t, testCase.branchCreated, response.GetBranchUpdate().GetBranchCreated())
branches := testhelper.MustRunCommand(t, nil, "git", "-C", testRepoPath, "branch")
require.Contains(t, string(branches), testCase.branchName)
maxCount := fmt.Sprintf("--max-count=%d", len(testCase.commitMessages))
gitArgs := []string{
"-C",
testRepoPath,
"log",
testCase.branchName,
"--format=%H",
maxCount,
"--reverse",
}
output := testhelper.MustRunCommand(t, nil, "git", gitArgs...)
shas := strings.Split(string(output), "\n")
// Throw away the last element, as that's going to be
// an empty string.
if len(shas) > 0 {
shas = shas[:len(shas)-1]
}
for index, sha := range shas {
locator := config.NewLocator(config.Config)
commit, err := log.GetCommit(ctx, locator, testRepo, sha)
require.NoError(t, err)
require.NotNil(t, commit)
require.Equal(t, string(commit.Subject), testCase.commitMessages[index])
require.Equal(t, string(commit.Author.Email), "[email protected]")
require.Equal(t, string(commit.Committer.Email), string(testhelper.TestUser.Email))
}
})
}
}
func TestFailedPatchApplyPatch(t *testing.T) {
serverSocketPath, stop := runOperationServiceServer(t)
defer stop()
client, conn := newOperationClient(t, serverSocketPath)
defer conn.Close()
testRepo, _, cleanupFn := testhelper.NewTestRepo(t)
defer cleanupFn()
ctx, cancel := testhelper.Context()
defer cancel()
testPatch, err := ioutil.ReadFile("testdata/0001-This-does-not-apply-to-the-feature-branch.patch")
require.NoError(t, err)
stream, err := client.UserApplyPatch(ctx) | headerRequest := applyPatchHeaderRequest(testRepo, testhelper.TestUser, "feature")
require.NoError(t, stream.Send(headerRequest))
patchRequest := applyPatchPatchesRequest(testPatch)
require.NoError(t, stream.Send(patchRequest))
_, err = stream.CloseAndRecv()
testhelper.RequireGrpcError(t, err, codes.FailedPrecondition)
}
func TestFailedValidationUserApplyPatch(t *testing.T) {
testRepo, _, cleanupFn := testhelper.NewTestRepo(t)
defer cleanupFn()
testCases := []struct {
desc string
errorMessage string
repo *gitalypb.Repository
user *gitalypb.User
branchName string
}{
{
desc: "missing Repository",
errorMessage: "missing Repository",
branchName: "new-branch",
user: testhelper.TestUser,
},
{
desc: "missing Branch",
errorMessage: "missing Branch",
repo: testRepo,
user: testhelper.TestUser,
},
{
desc: "empty BranchName",
errorMessage: "missing Branch",
repo: testRepo,
user: testhelper.TestUser,
branchName: "",
},
{
desc: "missing User",
errorMessage: "missing User",
branchName: "new-branch",
repo: testRepo,
},
}
for _, testCase := range testCases {
t.Run(testCase.desc, func(t *testing.T) {
request := applyPatchHeaderRequest(testCase.repo, testCase.user, testCase.branchName)
err := validateUserApplyPatchHeader(request.GetHeader())
require.Contains(t, err.Error(), testCase.errorMessage)
})
}
}
func applyPatchHeaderRequest(repo *gitalypb.Repository, user *gitalypb.User, branch string) *gitalypb.UserApplyPatchRequest {
header := &gitalypb.UserApplyPatchRequest_Header_{
Header: &gitalypb.UserApplyPatchRequest_Header{
Repository: repo,
User: user,
TargetBranch: []byte(branch),
},
}
return &gitalypb.UserApplyPatchRequest{
UserApplyPatchRequestPayload: header,
}
}
func applyPatchPatchesRequest(patches []byte) *gitalypb.UserApplyPatchRequest {
requestPatches := &gitalypb.UserApplyPatchRequest_Patches{
Patches: patches,
}
return &gitalypb.UserApplyPatchRequest{
UserApplyPatchRequestPayload: requestPatches,
}
} | require.NoError(t, err)
|
conf.py | # -*- coding: utf-8 -*-
#
# clan documentation build configuration file, created by
# sphinx-quickstart on Fri Apr 15 21:52:09 2011.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
import os
import sys
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.abspath('..'))
# -- General configuration -----------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx']
autodoc_member_order = 'bysource'
intersphinx_mapping = {
'python': ('http://docs.python.org/2.7', None)
}
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix of source filenames.
source_suffix = '.rst'
# The encoding of source files.
#source_encoding = 'utf-8-sig'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = u'clan'
copyright = u'2014, Christopher Groskopf'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '0.2.4'
# The full version, including alpha/beta/rc tags.
release = '0.2.4 (beta)'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['_build']
# The reST default role (used for this markup: `text`) to use for all documents.
#default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
# -- Options for HTML output ---------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'default'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None
| # Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['examples']
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}
# If false, no module index is generated.
#html_domain_indices = True
# If false, no index is generated.
#html_use_index = True
# If true, the index is split into individual pages for each letter.
#html_split_index = False
# If true, links to the reST sources are added to the pages.
#html_show_sourcelink = True
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#html_show_sphinx = True
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
#html_show_copyright = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
#html_use_opensearch = ''
# This is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = None
# Output file base name for HTML help builder.
htmlhelp_basename = 'clandoc'
# -- Options for LaTeX output --------------------------------------------------
# The paper size ('letter' or 'a4').
#latex_paper_size = 'letter'
# The font size ('10pt', '11pt' or '12pt').
#latex_font_size = '10pt'
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index', 'clan.tex', u'clan Documentation',
u'Christopher Groskopf', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = False
# If true, show page references after internal links.
#latex_show_pagerefs = False
# If true, show URL addresses after external links.
#latex_show_urls = False
# Additional stuff for the LaTeX preamble.
#latex_preamble = ''
# Documents to append as an appendix to all manuals.
#latex_appendices = []
# If false, no module index is generated.
#latex_domain_indices = True
# -- Options for manual page output --------------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
# ('scripts/csvcut', 'csvcut', u'csvcut Documentation',
# [u'Christopher Groskopf'], 1),
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.